@devtron-labs/devtron-fe-common-lib 1.19.0-pre-6 → 1.19.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-C4ZrS_SZ.js → @code-editor-CIWrAu92.js} +8352 -8405
- package/dist/{@common-rjsf-CJeMTP5a.js → @common-rjsf-BtyeBkM1.js} +1 -1
- package/dist/Common/Common.service.d.ts +1 -1
- package/dist/Common/Constants.d.ts +0 -3
- package/dist/Common/ErrorPage.d.ts +1 -1
- package/dist/Common/ErrorScreenManager.d.ts +1 -1
- package/dist/Common/Helper.d.ts +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/index.d.ts +0 -1
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +0 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/RJSF/utils.d.ts +1 -1
- package/dist/Common/Types.d.ts +5 -13
- package/dist/Common/index.d.ts +0 -1
- package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +8 -8
- package/dist/Shared/Components/Backdrop/types.d.ts +2 -11
- package/dist/Shared/Components/Button/Button.component.d.ts +68 -68
- package/dist/Shared/Components/CodeEditor/utils.d.ts +1 -1
- package/dist/Shared/Components/DTFocusTrap/DTFocusTrap.d.ts +1 -1
- package/dist/Shared/Components/DTFocusTrap/types.d.ts +9 -0
- package/dist/Shared/Components/GenericModal/types.d.ts +1 -1
- package/dist/Shared/Components/Header/utils.d.ts +2 -2
- package/dist/Shared/Components/Icon/Icon.d.ts +1 -12
- package/dist/Shared/Components/Illustration/Illustration.d.ts +0 -1
- package/dist/Shared/Components/License/DevtronLicenseCard.d.ts +1 -1
- package/dist/Shared/Components/License/constants.d.ts +1 -0
- package/dist/Shared/Components/License/types.d.ts +4 -2
- package/dist/Shared/Components/License/utils.d.ts +2 -2
- package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +1 -1
- package/dist/Shared/Components/MaterialHistory/types.d.ts +2 -1
- package/dist/Shared/Components/Popover/utils.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
- package/dist/Shared/Components/Table/TableContent.d.ts +1 -1
- package/dist/Shared/Components/Table/types.d.ts +4 -8
- package/dist/Shared/Components/Table/utils.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/Hooks/useUserPreferences/service.d.ts +1 -1
- package/dist/Shared/Hooks/useUserPreferences/types.d.ts +2 -31
- package/dist/Shared/Services/ToastManager/ToastContent.d.ts +1 -2
- package/dist/Shared/Services/ToastManager/constants.d.ts +2 -2
- package/dist/Shared/Services/ToastManager/toastManager.service.d.ts +1 -1
- package/dist/Shared/Services/ToastManager/types.d.ts +3 -23
- package/dist/Shared/Services/app.service.d.ts +3 -3
- package/dist/Shared/types.d.ts +9 -2
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-upgrade-enterprise.49cbd888.svg +320 -0
- package/dist/index.js +899 -903
- package/package.json +1 -1
- package/dist/Common/InteractiveCellText/InteractiveCellText.d.ts +0 -27
- package/dist/Common/InteractiveCellText/index.d.ts +0 -2
- package/dist/Common/InteractiveCellText/types.d.ts +0 -10
- package/dist/Shared/Components/KeyboardShortcut/KeyboardShortcut.component.d.ts +0 -3
- package/dist/Shared/Components/KeyboardShortcut/index.d.ts +0 -1
- package/dist/Shared/Components/KeyboardShortcut/types.d.ts +0 -4
- package/dist/assets/ic-diff-added.6ef6f938.svg +0 -3
- package/dist/assets/ic-diff-deleted.54eb24dd.svg +0 -3
- package/dist/assets/ic-diff-updated.294b925e.svg +0 -4
- package/dist/assets/ic-group-filter-applied.2cdb11e7.svg +0 -20
- package/dist/assets/ic-group-filter.ed1869f5.svg +0 -19
- package/dist/assets/ic-input.57281408.svg +0 -3
- package/dist/assets/ic-locked.dd40e181.svg +0 -3
- package/dist/assets/ic-storage.03f282b6.svg +0 -21
- package/dist/assets/ic-tag.5fdc7834.svg +0 -3
- package/dist/assets/ic-warning-fill.bfea8b38.svg +0 -4
- package/dist/assets/img-mechanical-operation.04a318d6.svg +0 -17
@@ -67,9 +67,6 @@ export declare const iconMap: {
|
|
67
67
|
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
68
68
|
'ic-devtron-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
69
69
|
'ic-devtron': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
70
|
-
'ic-diff-added': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
71
|
-
'ic-diff-deleted': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
72
|
-
'ic-diff-updated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
73
70
|
'ic-disconnect': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
74
71
|
'ic-discord-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
75
72
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -111,8 +108,6 @@ export declare const iconMap: {
|
|
111
108
|
'ic-google-gke': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
112
109
|
'ic-google': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
113
110
|
'ic-grid-view': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
114
|
-
'ic-group-filter-applied': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
115
|
-
'ic-group-filter': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
116
111
|
'ic-hand-pointing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
117
112
|
'ic-heart-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
118
113
|
'ic-heart-red-animated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -127,7 +122,6 @@ export declare const iconMap: {
|
|
127
122
|
'ic-info-filled-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
128
123
|
'ic-info-filled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
129
124
|
'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
130
|
-
'ic-input': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
131
125
|
'ic-install': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
132
126
|
'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
133
127
|
'ic-k3s': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -144,7 +138,6 @@ export declare const iconMap: {
|
|
144
138
|
'ic-linked-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
145
139
|
'ic-list-bullets': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
146
140
|
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
147
|
-
'ic-locked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
148
141
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
149
142
|
'ic-logs': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
150
143
|
'ic-magnifying-glass': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -195,7 +188,6 @@ export declare const iconMap: {
|
|
195
188
|
'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
196
189
|
'ic-stamp': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
197
190
|
'ic-stop-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
198
|
-
'ic-storage': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
199
191
|
'ic-strategy-blue-green-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
200
192
|
'ic-strategy-blue-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
201
193
|
'ic-strategy-canary-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -207,7 +199,6 @@ export declare const iconMap: {
|
|
207
199
|
'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
208
200
|
'ic-sun': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
209
201
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
210
|
-
'ic-tag': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
211
202
|
'ic-tata1mg': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
212
203
|
'ic-terminal-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
213
204
|
'ic-terminal': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -221,13 +212,11 @@ export declare const iconMap: {
|
|
221
212
|
'ic-two-cubes': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
222
213
|
'ic-ubuntu': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
223
214
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
215
|
+
'ic-upgrade-enterprise': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
224
216
|
'ic-user-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
225
217
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
226
218
|
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
227
219
|
'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
228
|
-
'ic-visibility-off': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
229
|
-
'ic-visibility-on': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
230
|
-
'ic-warning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
231
220
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
232
221
|
'ic-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
233
222
|
'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { IllustrationBaseProps } from './types';
|
2
2
|
export declare const illustrationMap: {
|
3
|
-
'img-mechanical-operation': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
4
3
|
'img-code': string;
|
5
4
|
'img-man-on-rocket': string;
|
6
5
|
'img-no-result': string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DevtronLicenseCardProps } from './types';
|
2
|
-
export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, ttl, appTheme, handleCopySuccess, }: DevtronLicenseCardProps) => JSX.Element;
|
2
|
+
export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, isFreemium, ttl, appTheme, handleCopySuccess, licenseStatusError, }: DevtronLicenseCardProps) => JSX.Element;
|
3
3
|
export default DevtronLicenseCard;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const ALLOWED_CLUSTER_IN_FREEMIUM = 2;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AppThemeType } from '../../Providers';
|
2
|
-
import { DevtronLicenseBaseDTO, DevtronLicenseDTO } from '../../types';
|
2
|
+
import { DevtronLicenseBaseDTO, DevtronLicenseDTO, LicenseErrorStruct } from '../../types';
|
3
3
|
export declare enum LicenseStatus {
|
4
4
|
ACTIVE = "ACTIVE",
|
5
5
|
EXPIRED = "EXPIRED",
|
@@ -11,7 +11,9 @@ export type DevtronLicenseCardProps = {
|
|
11
11
|
ttl: number;
|
12
12
|
licenseStatus: LicenseStatus;
|
13
13
|
isTrial: boolean;
|
14
|
+
isFreemium: boolean;
|
14
15
|
appTheme: AppThemeType;
|
16
|
+
licenseStatusError: LicenseErrorStruct;
|
15
17
|
} & ({
|
16
18
|
licenseKey: string;
|
17
19
|
handleCopySuccess?: () => void;
|
@@ -21,7 +23,7 @@ export type DevtronLicenseCardProps = {
|
|
21
23
|
handleCopySuccess?: never;
|
22
24
|
licenseSuffix: string;
|
23
25
|
});
|
24
|
-
export type DevtronLicenseInfo = Omit<DevtronLicenseCardProps, 'appTheme'> & Pick<DevtronLicenseDTO, 'fingerprint' | 'showLicenseData' | 'licenseStatusError'>;
|
26
|
+
export type DevtronLicenseInfo = Omit<DevtronLicenseCardProps, 'appTheme'> & Pick<DevtronLicenseDTO, 'fingerprint' | 'showLicenseData' | 'licenseStatusError' | 'moduleLimits'>;
|
25
27
|
export interface ActivateLicenseDialogProps extends Pick<DevtronLicenseBaseDTO, 'fingerprint'> {
|
26
28
|
enterpriseName: string;
|
27
29
|
handleClose?: () => void;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DevtronLicenseDTO } from '../../types';
|
2
|
-
import { DevtronLicenseCardProps, DevtronLicenseInfo
|
3
|
-
export declare const getLicenseColorsAccordingToStatus: (licenseStatus:
|
2
|
+
import { DevtronLicenseCardProps, DevtronLicenseInfo } from './types';
|
3
|
+
export declare const getLicenseColorsAccordingToStatus: ({ isFreemium, licenseStatus, licenseStatusError, }: Pick<DevtronLicenseCardProps, "licenseStatus" | "isFreemium" | "licenseStatusError">) => {
|
4
4
|
bgColor: string;
|
5
5
|
textColor: string;
|
6
6
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { MaterialHistoryProps } from './types';
|
2
|
-
declare const MaterialHistory: ({ material, pipelineName, selectCommit, isCommitInfoModal }: MaterialHistoryProps) => JSX.Element;
|
2
|
+
declare const MaterialHistory: ({ material, pipelineName, ciPipelineId, selectCommit, isCommitInfoModal, }: MaterialHistoryProps) => JSX.Element;
|
3
3
|
export default MaterialHistory;
|
@@ -2,6 +2,7 @@ import { CIMaterialType } from '../../Services/app.types';
|
|
2
2
|
export interface MaterialHistoryProps {
|
3
3
|
material: CIMaterialType;
|
4
4
|
pipelineName: string;
|
5
|
-
|
5
|
+
ciPipelineId?: string;
|
6
|
+
selectCommit?: (materialId: string, commit: string, ciPipelineId?: string) => void;
|
6
7
|
isCommitInfoModal?: boolean;
|
7
8
|
}
|
@@ -87,6 +87,6 @@ export declare const getPopoverActualPositionAlignment: ({ position, alignment,
|
|
87
87
|
triggerRect: DOMRect;
|
88
88
|
popoverRect: DOMRect;
|
89
89
|
}) => {
|
90
|
-
fallbackPosition: "top" | "
|
90
|
+
fallbackPosition: "top" | "bottom" | "right" | "left";
|
91
91
|
fallbackAlignment: "start" | "middle" | "end";
|
92
92
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { SEVERITIES } from './constants';
|
2
2
|
import { GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, ScanResultDTO, SeveritiesDTO, VulnerabilityCountType } from './types';
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
4
|
-
color: "var(--
|
4
|
+
color: "var(--R500)" | "var(--N300)" | "var(--G500)" | "var(--Y500)" | "var(--R700)" | "var(--O500)";
|
5
5
|
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
6
6
|
value: number;
|
7
7
|
}[];
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FiltersTypeEnum, TableContentProps } from './types';
|
2
|
-
declare const TableContent: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ filterData, rows, resizableConfig, additionalProps, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent, pageSizeOptions, filteredRows, areFilteredRowsLoading,
|
2
|
+
declare const TableContent: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ filterData, rows, resizableConfig, additionalProps, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent, pageSizeOptions, filteredRows, areFilteredRowsLoading, }: TableContentProps<RowData, FilterVariant, AdditionalProps>) => JSX.Element;
|
3
3
|
export default TableContent;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Dispatch, FunctionComponent, MouseEvent, PropsWithChildren, SetStateAction } from 'react';
|
2
2
|
import { GenericFilterEmptyStateProps } from '../../../Common/EmptyState/types';
|
3
3
|
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps, UseUrlFiltersReturnType } from '../../../Common/Hooks';
|
4
|
-
import {
|
4
|
+
import { GenericEmptyStateType } from '../../../Common/index';
|
5
5
|
import { PageSizeOption } from '../../../Common/Pagination/types';
|
6
6
|
import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
|
7
7
|
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
|
@@ -105,7 +105,7 @@ export interface ConfigurableColumnsType<RowData extends unknown, FilterVariant
|
|
105
105
|
interface GetRowsProps extends Pick<UseFiltersReturnType, 'offset' | 'pageSize' | 'searchKey' | 'sortBy' | 'sortOrder'> {
|
106
106
|
}
|
107
107
|
type AdditionalFilterPropsType<T extends FiltersTypeEnum> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey' | 'defaultPageSize'> : T extends FiltersTypeEnum.STATE ? Pick<UseStateFiltersProps<string>, 'initialSortKey' | 'defaultPageSize'> : never;
|
108
|
-
export type ViewWrapperProps<RowData extends unknown = unknown, FilterVariant extends FiltersTypeEnum = FiltersTypeEnum.NONE, AdditionalProps extends Record<string, any> = {}> = PropsWithChildren<(FilterVariant extends FiltersTypeEnum.NONE ? {} : Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'
|
108
|
+
export type ViewWrapperProps<RowData extends unknown = unknown, FilterVariant extends FiltersTypeEnum = FiltersTypeEnum.NONE, AdditionalProps extends Record<string, any> = {}> = PropsWithChildren<(FilterVariant extends FiltersTypeEnum.NONE ? {} : Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'>) & AdditionalProps & Partial<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>> & {
|
109
109
|
areRowsLoading: boolean;
|
110
110
|
filteredRows: RowsType<RowData> | null;
|
111
111
|
rows: RowsType<RowData> | null;
|
@@ -177,10 +177,7 @@ export type InternalTableProps<RowData extends unknown, FilterVariant extends Fi
|
|
177
177
|
} | {
|
178
178
|
rows?: never;
|
179
179
|
/** NOTE: Sorting on frontend is only handled if rows is provided instead of getRows */
|
180
|
-
getRows: (props: GetRowsProps
|
181
|
-
rows: RowsType<RowData>;
|
182
|
-
totalRows: number;
|
183
|
-
}>;
|
180
|
+
getRows: (props: GetRowsProps) => Promise<RowsType<RowData>>;
|
184
181
|
}) & ({
|
185
182
|
paginationVariant: PaginationEnum.PAGINATED;
|
186
183
|
pageSizeOptions?: PageSizeOption[];
|
@@ -206,9 +203,8 @@ export interface GetFilteringPromiseProps<RowData extends unknown> {
|
|
206
203
|
searchSortTimeoutRef: React.MutableRefObject<number>;
|
207
204
|
callback: () => Promise<RowsType<RowData>> | RowsType<RowData>;
|
208
205
|
}
|
209
|
-
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions'
|
206
|
+
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions'> {
|
210
207
|
filteredRows: RowsType<RowData>;
|
211
208
|
areFilteredRowsLoading: boolean;
|
212
|
-
totalRows: number;
|
213
209
|
}
|
214
210
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Column, ConfigurableColumnsType, FiltersTypeEnum, GetFilteringPromiseProps, RowsType, TableProps, UseFiltersReturnType } from './types';
|
2
|
-
export declare const searchAndSortRows: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>(rows: TableProps<RowData, FilterVariant, AdditionalProps>["rows"], filter: TableProps<RowData, FilterVariant, AdditionalProps>["filter"], filterData: UseFiltersReturnType, comparator?: Column<RowData, FilterVariant, AdditionalProps>["comparator"]) =>
|
2
|
+
export declare const searchAndSortRows: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>(rows: TableProps<RowData, FilterVariant, AdditionalProps>["rows"], filter: TableProps<RowData, FilterVariant, AdditionalProps>["filter"], filterData: UseFiltersReturnType, comparator?: Column<RowData, FilterVariant, AdditionalProps>["comparator"]) => RowsType<RowData>;
|
3
3
|
export declare const getVisibleColumnsFromLocalStorage: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ allColumns, id, }: Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, "allColumns"> & Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "id">) => Column<RowData, FilterVariant, AdditionalProps>[];
|
4
4
|
export declare const setVisibleColumnsToLocalStorage: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ id, visibleColumns, }: Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, "visibleColumns"> & Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "id">) => void;
|
5
5
|
export declare const getVisibleColumns: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ areColumnsConfigurable, columns, id, }: Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "areColumnsConfigurable" | "columns" | "id">) => Column<RowData, FilterVariant, AdditionalProps>[];
|
@@ -59,7 +59,6 @@ export * from './ImageWithFallback';
|
|
59
59
|
export * from './InfoBlock';
|
60
60
|
export * from './InfoIconTippy';
|
61
61
|
export * from './InvalidYAMLTippy';
|
62
|
-
export * from './KeyboardShortcut';
|
63
62
|
export * from './KeyValueTable';
|
64
63
|
export * from './License';
|
65
64
|
export { default as LoadingCard } from './LoadingCard';
|
@@ -4,7 +4,7 @@ import { PreferredResourceKindType, UserPreferenceFilteredListTypes, UserPrefere
|
|
4
4
|
* @description This function fetches the user preferences from the server. It uses the `get` method to make a request to the server and retrieves the user preferences based on the `USER_PREFERENCES_ATTRIBUTE_KEY`. The result is parsed and returned as a `UserPreferencesType` object.
|
5
5
|
* @throws Will throw an error if the request fails or if the result is not in the expected format.
|
6
6
|
*/
|
7
|
-
export declare const getUserPreferences: (
|
7
|
+
export declare const getUserPreferences: () => Promise<UserPreferencesType>;
|
8
8
|
export declare const updateUserPreferences: ({ path, value, resourceKind, shouldThrowError, userPreferencesResponse, }: UserPreferenceResourceProps) => Promise<boolean>;
|
9
9
|
/**
|
10
10
|
* Optimized function to get updated user preferences with resource filtering
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants';
|
2
2
|
import { AppThemeType, ThemeConfigType, ThemePreferenceType } from '../../Providers/ThemeProvider/types';
|
3
3
|
import { ResourceKindType } from '../../types';
|
4
|
-
export type NavigationItemID = 'application-management-overview' | 'application-management-applications' | 'application-management-application-groups' | 'application-management-chart-store' | 'application-management-bulk-edit' | 'application-management-configurations' | 'application-management-policies' | 'application-management-others' | 'infrastructure-management-overview' | 'infrastructure-management-resource-browser' | 'infrastructure-management-intercepted-changes' | 'infrastructure-management-resource-watcher' | 'infrastructure-management-catalog-framework' | 'software-release-management-overview' | 'software-release-management-software-release' | 'cost-visibility-overview' | 'cost-visibility-trends' | 'cost-visibility-cost-breakdown' | 'cost-visibility-configurations' | 'security-center-overview' | 'security-center-application-security' | 'security-center-security-policies' | 'automation-and-enablement-jobs' | 'automation-and-enablement-alerting' | 'automation-and-enablement-incident-response' | 'automation-and-enablement-api-portal' | 'automation-and-enablement-runbook-automation' | 'global-configuration-sso-login-services' | 'global-configuration-host-urls' | 'global-configuration-cluster-and-environments' | 'global-configuration-container-oci-registry' | 'global-configuration-authorization';
|
5
|
-
export type NavigationSubMenuItemID = 'application-management-configurations-gitops' | 'application-management-configurations-git-accounts' | 'application-management-configurations-external-links' | 'application-management-configurations-chart-repository' | 'application-management-configurations-deployment-charts' | 'application-management-configurations-notifications' | 'application-management-configurations-catalog-frameworks' | 'application-management-configurations-scoped-variables' | 'application-management-configurations-build-infra' | 'application-management-policies-deployment-window' | 'application-management-policies-approval-policy' | 'application-management-policies-plugin-policy' | 'application-management-policies-pull-image-digest' | 'application-management-policies-tag-policy' | 'application-management-policies-filter-conditions' | 'application-management-policies-lock-deployment-configuration' | 'application-management-others-application-templates' | 'application-management-others-projects' | 'cost-visibility-cost-breakdown-clusters' | 'cost-visibility-cost-breakdown-environments' | 'cost-visibility-cost-breakdown-projects' | 'cost-visibility-cost-breakdown-applications' | 'global-configuration-authorization-user-permissions' | 'global-configuration-authorization-permission-groups' | 'global-configuration-authorization-api-tokens';
|
6
4
|
export interface GetUserPreferencesQueryParamsType {
|
7
5
|
key: typeof USER_PREFERENCES_ATTRIBUTE_KEY;
|
8
6
|
}
|
@@ -38,18 +36,13 @@ export interface GetUserPreferencesParsedDTO {
|
|
38
36
|
*
|
39
37
|
*/
|
40
38
|
resources?: UserPreferenceResourceType;
|
41
|
-
commandBar: {
|
42
|
-
recentNavigationActions: {
|
43
|
-
id: NavigationItemID | NavigationSubMenuItemID;
|
44
|
-
}[];
|
45
|
-
};
|
46
39
|
}
|
47
40
|
export interface UserPreferencesPayloadValueType extends GetUserPreferencesParsedDTO {
|
48
41
|
}
|
49
42
|
export interface UpdateUserPreferencesPayloadType extends Pick<GetUserPreferencesQueryParamsType, 'key'> {
|
50
43
|
value: string;
|
51
44
|
}
|
52
|
-
export interface UserPreferencesType
|
45
|
+
export interface UserPreferencesType {
|
53
46
|
/**
|
54
47
|
* Preferred theme for the user
|
55
48
|
* If null, would forcibly show user theme switcher dialog for user to select
|
@@ -76,7 +69,7 @@ export interface UseUserPreferencesProps {
|
|
76
69
|
migrateUserPreferences?: (userPreferencesResponse: UserPreferencesType) => Promise<UserPreferencesType>;
|
77
70
|
recentlyVisitedFetchConfig?: RecentlyVisitedFetchConfigType;
|
78
71
|
}
|
79
|
-
type UserPathValueMapType = {
|
72
|
+
export type UserPathValueMapType = {
|
80
73
|
path: 'themePreference';
|
81
74
|
value: Required<Pick<UpdatedUserPreferencesType, 'themePreference' | 'appTheme'>>;
|
82
75
|
resourceKind?: never;
|
@@ -91,28 +84,7 @@ type UserPathValueMapType = {
|
|
91
84
|
value: Required<BaseRecentlyVisitedEntitiesTypes[]>;
|
92
85
|
resourceKind: PreferredResourceKindType;
|
93
86
|
userPreferencesResponse?: UserPreferencesType;
|
94
|
-
} | {
|
95
|
-
path: 'commandBar.recentNavigationActions';
|
96
|
-
value: UserPreferencesType['commandBar']['recentNavigationActions'];
|
97
|
-
resourceKind?: never;
|
98
|
-
userPreferencesResponse?: never;
|
99
87
|
};
|
100
|
-
export type GetUserPreferencePayloadParams = {
|
101
|
-
userPreferencesResponse: UserPreferencesType;
|
102
|
-
resourceKind?: PreferredResourceKindType;
|
103
|
-
} & ({
|
104
|
-
path: 'themePreference';
|
105
|
-
value: Required<Pick<UpdatedUserPreferencesType, 'themePreference' | 'appTheme'>>;
|
106
|
-
} | {
|
107
|
-
path: 'pipelineRBACViewSelectedTab';
|
108
|
-
value: Required<Pick<UserPreferencesType, 'pipelineRBACViewSelectedTab'>>;
|
109
|
-
} | {
|
110
|
-
path: 'resources';
|
111
|
-
value: Required<BaseRecentlyVisitedEntitiesTypes[]>;
|
112
|
-
} | {
|
113
|
-
path: 'commandBar.recentNavigationActions';
|
114
|
-
value: UserPreferencesType['commandBar']['recentNavigationActions'];
|
115
|
-
});
|
116
88
|
export type UserPreferenceResourceProps = UserPathValueMapType & {
|
117
89
|
shouldThrowError?: boolean;
|
118
90
|
userPreferencesResponse?: UserPreferencesType;
|
@@ -120,4 +92,3 @@ export type UserPreferenceResourceProps = UserPathValueMapType & {
|
|
120
92
|
export interface UserPreferenceFilteredListTypes extends UserPreferenceRecentlyVisitedAppsTypes {
|
121
93
|
userPreferencesResponse?: UserPreferencesType;
|
122
94
|
}
|
123
|
-
export {};
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import { ToastProps } from './types';
|
2
2
|
export declare const ToastContent: ({ title, description, buttonProps, }: Pick<ToastProps, "title" | "description" | "buttonProps">) => JSX.Element;
|
3
|
-
export declare const ShortcutToastContent: ({ shortcuts, text }: ShortcutToastContentProps) => JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ToastContainerProps, ToastOptions } from 'react-toastify';
|
2
|
-
import {
|
2
|
+
import { ToastProps, ToastVariantType } from './types';
|
3
3
|
export declare const TOAST_BASE_CONFIG: ToastContainerProps;
|
4
|
-
export declare const TOAST_VARIANT_TO_CONFIG_MAP: Record<
|
4
|
+
export declare const TOAST_VARIANT_TO_CONFIG_MAP: Record<ToastVariantType, Required<Pick<ToastProps, 'icon' | 'title' | 'progressBarBg'>> & Pick<ToastOptions, 'type'>>;
|
@@ -65,7 +65,7 @@ declare class ToastManager {
|
|
65
65
|
/**
|
66
66
|
* Handler for showing the toast
|
67
67
|
*/
|
68
|
-
showToast: ({ variant, icon: customIcon, title, description, buttonProps, progressBarBg: customProgressBarBg,
|
68
|
+
showToast: ({ variant, icon: customIcon, title, description, buttonProps, progressBarBg: customProgressBarBg, }: ToastProps, options?: Pick<ToastOptions, "autoClose">) => import('react-toastify').Id;
|
69
69
|
/**
|
70
70
|
* Handler for dismissing an existing toast
|
71
71
|
*/
|
@@ -1,28 +1,13 @@
|
|
1
1
|
import { ReactElement } from 'react';
|
2
|
-
import { SupportedKeyboardKeysType } from '../../../Common/Hooks';
|
3
2
|
import { ButtonComponentType, ButtonProps } from '../../Components';
|
4
3
|
export declare enum ToastVariantType {
|
5
4
|
info = "info",
|
6
5
|
success = "success",
|
7
6
|
error = "error",
|
8
7
|
warn = "warn",
|
9
|
-
notAuthorized = "notAuthorized"
|
10
|
-
shortcut = "shortcut"
|
8
|
+
notAuthorized = "notAuthorized"
|
11
9
|
}
|
12
|
-
export interface
|
13
|
-
variant: ToastVariantType.shortcut;
|
14
|
-
/**
|
15
|
-
* Text to display along the shortcuts in the toast
|
16
|
-
* Example: "Press [S] to switch context"
|
17
|
-
*/
|
18
|
-
text: string;
|
19
|
-
/**
|
20
|
-
* The shortcuts to be displayed in the toast
|
21
|
-
* Note: The shortcuts should be in the format of `['Ctrl', 'A']
|
22
|
-
*/
|
23
|
-
shortcuts: SupportedKeyboardKeysType[];
|
24
|
-
}
|
25
|
-
export interface BaseToastProps {
|
10
|
+
export interface ToastProps {
|
26
11
|
/**
|
27
12
|
* Title for the toast
|
28
13
|
* If not provided, defaults to a value based on the selected variant
|
@@ -41,7 +26,7 @@ export interface BaseToastProps {
|
|
41
26
|
*
|
42
27
|
* @default ToastVariantType.info
|
43
28
|
*/
|
44
|
-
variant?:
|
29
|
+
variant?: ToastVariantType;
|
45
30
|
/**
|
46
31
|
* Props for the action button to be displayed in the toast
|
47
32
|
*
|
@@ -53,8 +38,3 @@ export interface BaseToastProps {
|
|
53
38
|
*/
|
54
39
|
progressBarBg?: string;
|
55
40
|
}
|
56
|
-
export type ToastProps = (BaseToastProps & Partial<Record<Exclude<keyof ShortcutToastProps, 'variant'>, never>>) | (ShortcutToastProps & Partial<Record<Exclude<keyof BaseToastProps, 'variant'>, never>>);
|
57
|
-
export interface ShortcutToastContentProps {
|
58
|
-
text: string;
|
59
|
-
shortcuts: SupportedKeyboardKeysType[];
|
60
|
-
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { AppConfigProps } from '../../Pages/index';
|
2
2
|
import { ResponseType } from '../../Common';
|
3
|
-
import { AppEnvDeploymentConfigDTO, AppEnvDeploymentConfigPayloadType,
|
4
|
-
export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<
|
3
|
+
import { AppEnvDeploymentConfigDTO, AppEnvDeploymentConfigPayloadType, CIMaterialInfoType, GetCITriggerInfoParamsType } from './app.types';
|
4
|
+
export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<CIMaterialInfoType>;
|
5
5
|
/**
|
6
6
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
7
7
|
*/
|
8
|
-
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, "ciArtifactId">) => Promise<
|
8
|
+
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, "ciArtifactId">) => Promise<CIMaterialInfoType>;
|
9
9
|
export declare const getAppEnvDeploymentConfig: ({ params, signal, isTemplateView, appId, }: {
|
10
10
|
params: AppEnvDeploymentConfigPayloadType;
|
11
11
|
signal?: AbortSignal;
|
package/dist/Shared/types.d.ts
CHANGED
@@ -935,7 +935,8 @@ export declare enum LicensingErrorCodes {
|
|
935
935
|
InstallationModeMismatch = "11005",
|
936
936
|
LicKeyMismatch = "11006",
|
937
937
|
NoCertFound = "11007",
|
938
|
-
LicKeyNotFound = "11008"
|
938
|
+
LicKeyNotFound = "11008",
|
939
|
+
ClusterLimitExceeded = "11011"
|
939
940
|
}
|
940
941
|
export interface LicenseErrorStruct {
|
941
942
|
code: LicensingErrorCodes;
|
@@ -944,6 +945,7 @@ export interface LicenseErrorStruct {
|
|
944
945
|
export interface DevtronLicenseBaseDTO {
|
945
946
|
fingerprint: string | null;
|
946
947
|
isTrial: boolean | null;
|
948
|
+
isFreemium: boolean | null;
|
947
949
|
/**
|
948
950
|
* In timestamp format
|
949
951
|
*/
|
@@ -971,10 +973,15 @@ export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = Devt
|
|
971
973
|
} | null;
|
972
974
|
showLicenseData?: never;
|
973
975
|
licenseStatusError?: never;
|
976
|
+
moduleLimits?: never;
|
974
977
|
} : {
|
975
978
|
claimedByUserDetails?: never;
|
976
979
|
showLicenseData: boolean;
|
977
980
|
licenseStatusError?: LicenseErrorStruct;
|
981
|
+
moduleLimits: {
|
982
|
+
allAllowed: boolean;
|
983
|
+
maxAllowedClusters: number;
|
984
|
+
};
|
978
985
|
});
|
979
986
|
export type CountryISO2Type = ParsedCountry['iso2'];
|
980
987
|
export declare enum ResponseHeaders {
|
@@ -984,7 +991,7 @@ export declare enum InstallationClusterType {
|
|
984
991
|
EKS_AUTO_CLUSTER = "eksAutoCluster",
|
985
992
|
EKS_MANUAL_CLUSTER = "eksManualCluster"
|
986
993
|
}
|
987
|
-
export type IconBaseSizeType = 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 28 | 30 | 32 | 34 | 36 | 40 | 42 | 44 | 48 | 72 | 80;
|
994
|
+
export type IconBaseSizeType = 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 28 | 30 | 32 | 34 | 36 | 40 | 42 | 44 | 48 | 64 | 72 | 80;
|
988
995
|
export type IconBaseColorType = `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50' | '0'}` | 'white' | 'black' | null;
|
989
996
|
export interface GetTimeDifferenceParamsType {
|
990
997
|
startTime: string;
|