@devtron-labs/devtron-fe-common-lib 1.16.0-beta-1 → 1.16.0-beta-5
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-DxJTBxC3.js → @code-editor-b_sdr086.js} +9421 -9083
- package/dist/{@common-rjsf-BP_R1OLj.js → @common-rjsf-Bs6LFW3z.js} +6 -6
- package/dist/{@framer-motion-DAmKhMSi.js → @framer-motion-j6RIjEIR.js} +20 -20
- package/dist/{@moment-C_WeV3Af.js → @moment-CGWt8tF2.js} +12 -1
- package/dist/{@react-dates-D5kydtW-.js → @react-dates-BVyHiOGU.js} +2065 -2140
- package/dist/{@react-select-Cmser7OI.js → @react-select-BQNFZu0Y.js} +6 -6
- package/dist/{@react-virtualized-sticky-tree-DMnFy9PE.js → @react-virtualized-sticky-tree-CuElh0mS.js} +1 -1
- package/dist/{@vendor-STJ9h0oI.js → @vendor-DbxoIktR.js} +29809 -29542
- package/dist/Common/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/GenericDescription/GenericDescription.d.ts +1 -1
- package/dist/Common/GenericDescription/types.d.ts +4 -1
- package/dist/Common/GenericDescription/utils.d.ts +1 -0
- package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcutProvider.d.ts +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +19 -0
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/Hooks/useStateFilters/types.d.ts +2 -2
- package/dist/Common/Hooks/useStateFilters/useStateFilters.d.ts +1 -1
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +2 -1
- package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
- package/dist/Common/Modals/VisibleModal.d.ts +1 -0
- package/dist/Common/Modals/VisibleModal2.d.ts +1 -0
- package/dist/Common/Pagination/constants.d.ts +4 -0
- package/dist/Common/Pagination/index.d.ts +1 -0
- package/dist/Common/PopupMenu.d.ts +2 -1
- package/dist/Common/Tooltip/types.d.ts +1 -1
- package/dist/Common/Types.d.ts +2 -2
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -0
- package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/constants.d.ts +8 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +1 -1
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +46 -2
- package/dist/Pages/ResourceBrowser/constants.d.ts +2 -0
- package/dist/Pages/ResourceBrowser/service.d.ts +1 -1
- package/dist/Shared/Components/AboutDevtron/AboutDevtronBody.d.ts +1 -3
- package/dist/Shared/Components/AboutDevtron/AboutDevtronDialog.d.ts +1 -2
- package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +1 -1
- package/dist/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.d.ts +1 -1
- package/dist/Shared/Components/AnimatedDeployButton/types.d.ts +5 -9
- package/dist/Shared/Components/AppStatusModal/service.d.ts +1 -1
- package/dist/Shared/Components/AppStatusModal/types.d.ts +1 -2
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/index.d.ts +1 -0
- package/dist/Shared/Components/Backdrop/types.d.ts +28 -2
- package/dist/Shared/Components/Backdrop/utils.d.ts +1 -0
- package/dist/Shared/Components/Badge/Badge.d.ts +3 -0
- package/dist/Shared/Components/Badge/index.d.ts +2 -0
- package/dist/Shared/Components/Badge/types.d.ts +18 -0
- package/dist/Shared/Components/Badge/utils.d.ts +7 -0
- package/dist/Shared/Components/BulkOperations/types.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/types.d.ts +1 -9
- package/dist/Shared/Components/Button/types.d.ts +2 -2
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/types.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentStatusBreakdown.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +1 -2
- package/dist/Shared/Components/CodeEditor/CodeEditor.constants.d.ts +1 -1
- package/dist/Shared/Components/DeploymentStatusBreakdown/constants.d.ts +1 -2
- package/dist/Shared/Components/DeploymentStatusBreakdown/utils.d.ts +1 -2
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +1 -1
- package/dist/Shared/Components/GenericInfoCard/types.d.ts +1 -1
- package/dist/Shared/Components/GenericModal/GenericModal.component.d.ts +9 -0
- package/dist/Shared/Components/GenericModal/GenericModal.context.d.ts +6 -0
- package/dist/Shared/Components/GenericModal/constants.d.ts +2 -0
- package/dist/Shared/Components/GenericModal/index.d.ts +2 -0
- package/dist/Shared/Components/GenericModal/types.d.ts +37 -0
- package/dist/Shared/Components/GettingStartedCard/GettingStarted.d.ts +1 -1
- package/dist/Shared/Components/GettingStartedCard/types.d.ts +0 -3
- package/dist/Shared/Components/Header/HeaderWithCreateButton/types.d.ts +1 -1
- package/dist/Shared/Components/Header/HelpButton.d.ts +1 -1
- package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
- package/dist/Shared/Components/Header/types.d.ts +1 -3
- package/dist/Shared/Components/Icon/Icon.d.ts +18 -1
- package/dist/Shared/Components/InfoBlock/constants.d.ts +2 -1
- package/dist/Shared/Components/InvalidYAMLTippy/types.d.ts +1 -1
- package/dist/Shared/Components/Popover/types.d.ts +3 -2
- package/dist/Shared/Components/Popover/utils.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +7 -7
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +1 -1
- package/dist/Shared/Components/Security/SeverityChip.d.ts +6 -0
- package/dist/Shared/Components/Security/Vulnerabilities/types.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +2 -2
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +1 -1
- package/dist/Shared/Components/Table/BulkSelectionActionWidget.d.ts +1 -1
- package/dist/Shared/Components/Table/InternalTable.d.ts +1 -1
- package/dist/Shared/Components/Table/TableContent.d.ts +3 -0
- package/dist/Shared/Components/Table/constants.d.ts +1 -0
- package/dist/Shared/Components/Table/index.d.ts +1 -1
- package/dist/Shared/Components/Table/types.d.ts +48 -21
- package/dist/Shared/Components/Table/useTableWithKeyboardShortcuts.d.ts +6 -1
- package/dist/Shared/Components/Table/utils.d.ts +5 -0
- package/dist/Shared/Components/TargetPlatforms/types.d.ts +1 -1
- package/dist/Shared/Components/WorkflowOptionsModal/SourceTypeCard.d.ts +1 -1
- package/dist/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.d.ts +1 -1
- package/dist/Shared/Components/WorkflowOptionsModal/constants.d.ts +75 -41
- package/dist/Shared/Components/WorkflowOptionsModal/index.d.ts +1 -0
- package/dist/Shared/Components/WorkflowOptionsModal/types.d.ts +10 -12
- package/dist/Shared/Components/WorkflowOptionsModal/utils.d.ts +13 -2
- package/dist/Shared/Components/index.d.ts +3 -0
- package/dist/Shared/Helpers.d.ts +3 -2
- package/dist/Shared/Hooks/useUserPreferences/types.d.ts +2 -2
- package/dist/Shared/Providers/MainContextProvider/index.d.ts +3 -0
- package/dist/Shared/Providers/{types.d.ts → MainContextProvider/types.d.ts} +4 -4
- package/dist/Shared/Providers/index.d.ts +0 -2
- package/dist/Shared/Services/types.d.ts +1 -0
- package/dist/Shared/constants.d.ts +1 -0
- package/dist/Shared/types.d.ts +13 -4
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/@common-rjsf.css +1 -1
- package/dist/assets/ic-bug.8a8dc1fc.svg +3 -0
- package/dist/assets/ic-check-all.fdea6b38.svg +5 -0
- package/dist/assets/ic-check-square.e355731d.svg +4 -0
- package/dist/assets/ic-clean-brush.c21cbe1e.svg +3 -0
- package/dist/assets/ic-container.92a4c33a.svg +3 -0
- package/dist/assets/ic-deploy-color.73a8df48.svg +14 -0
- package/dist/assets/ic-deploy-sync.6b1cf1b1.svg +16 -0
- package/dist/assets/ic-download.468a0cb7.svg +3 -0
- package/dist/assets/ic-file-code.0926d194.svg +3 -0
- package/dist/assets/ic-gavel.a3b064b5.svg +3 -0
- package/dist/assets/ic-git-branch.d6b3d950.svg +3 -0
- package/dist/assets/ic-info-filled-color.47953fcf.svg +8 -0
- package/dist/assets/ic-linked-build-color.d1df5ce1.svg +7 -0
- package/dist/assets/ic-logs.d310db72.svg +3 -0
- package/dist/assets/{ic-minus.416da21b.svg → ic-minus.aac464f7.svg} +1 -1
- package/dist/assets/ic-pause-circle.f9405070.svg +3 -0
- package/dist/assets/ic-speedometer.3ecaae3b.svg +3 -0
- package/dist/assets/ic-two-cubes.056d1333.svg +3 -0
- package/dist/assets/ic-webhook.ffd8ded6.svg +21 -0
- package/dist/assets/workflow-options-modal-header.0444485e.svg +38 -0
- package/dist/index.d.ts +1 -6
- package/dist/index.js +858 -849
- package/package.json +7 -7
- package/dist/Shared/Components/BulkSelection/BulkSelectionDropdownItems.d.ts +0 -3
- package/dist/assets/change-source.abc9d12f.png +0 -0
- package/dist/assets/ic-check-all.0376437d.svg +0 -21
- package/dist/assets/ic-check-square.2a3d3fb9.svg +0 -20
- package/dist/assets/ic-ci-webhook.a2ab6db6.svg +0 -42
- package/dist/assets/ic-source-build.7d776b10.svg +0 -22
- package/dist/assets/ic-source-job.a40f06cf.svg +0 -26
- package/dist/assets/ic-source-linked-build.f24ecbed.svg +0 -24
- package/dist/assets/ic-source-webhook.ee64a29a.svg +0 -22
- package/dist/assets/select-image-source.fb911f42.png +0 -0
- /package/dist/Shared/Providers/{MainContextProvider.d.ts → MainContextProvider/MainContextProvider.d.ts} +0 -0
- /package/dist/assets/{ic-container.4e1e6455.svg → ic-container-registry.4e1e6455.svg} +0 -0
@@ -1,7 +1,8 @@
|
|
1
|
-
import { Dispatch, FunctionComponent, PropsWithChildren, SetStateAction } from 'react';
|
2
|
-
import { GenericFilterEmptyStateProps } from '
|
3
|
-
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps } from '../../../Common/Hooks';
|
1
|
+
import { Dispatch, FunctionComponent, MouseEvent, PropsWithChildren, SetStateAction } from 'react';
|
2
|
+
import { GenericFilterEmptyStateProps } from '../../../Common/EmptyState/types';
|
3
|
+
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps, UseUrlFiltersReturnType } from '../../../Common/Hooks';
|
4
4
|
import { GenericEmptyStateType } from '../../../Common/index';
|
5
|
+
import { PageSizeOption } from '../../../Common/Pagination/types';
|
5
6
|
import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
|
6
7
|
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
|
7
8
|
export interface UseFiltersReturnType extends UseStateFiltersReturnType<string> {
|
@@ -50,11 +51,16 @@ export type RowType = {
|
|
50
51
|
data: Record<string, unknown>;
|
51
52
|
};
|
52
53
|
export type RowsType = RowType[];
|
53
|
-
export
|
54
|
+
export declare enum FiltersTypeEnum {
|
55
|
+
STATE = "state",
|
56
|
+
URL = "url",
|
57
|
+
NONE = "none"
|
58
|
+
}
|
59
|
+
export interface CellComponentProps<T = FiltersTypeEnum.NONE> extends Pick<BaseColumnType, 'field'>, AdditionalProps {
|
54
60
|
signals: SignalsType;
|
55
61
|
value: unknown;
|
56
62
|
row: RowType;
|
57
|
-
filterData: UseFiltersReturnType
|
63
|
+
filterData: T extends FiltersTypeEnum.NONE ? null : T extends FiltersTypeEnum.STATE ? UseFiltersReturnType : UseUrlFiltersReturnType<string>;
|
58
64
|
isRowActive: boolean;
|
59
65
|
}
|
60
66
|
export type Column = Pick<SortableTableHeaderCellProps, 'showTippyOnTruncate'> & BaseColumnType & {
|
@@ -71,21 +77,26 @@ export type Column = Pick<SortableTableHeaderCellProps, 'showTippyOnTruncate'> &
|
|
71
77
|
isSortable?: false;
|
72
78
|
comparator?: never;
|
73
79
|
});
|
80
|
+
export interface BulkActionsComponentProps {
|
81
|
+
onActionClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
82
|
+
bulkActionsData: unknown;
|
83
|
+
}
|
84
|
+
type BulkSelectionReturnValueType = ReturnType<typeof useBulkSelection>;
|
85
|
+
export interface BulkOperationModalProps<T = string> extends Pick<BulkSelectionReturnValueType, 'isBulkSelectionApplied'> {
|
86
|
+
action: T;
|
87
|
+
onClose: () => void;
|
88
|
+
selections: RowsType | null;
|
89
|
+
bulkOperationModalData: unknown;
|
90
|
+
}
|
74
91
|
type BulkSelectionConfigType = Pick<UseBulkSelectionProps<unknown>, 'getSelectAllDialogStatus'> & {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
};
|
92
|
+
BulkActionsComponent: FunctionComponent<BulkActionsComponentProps>;
|
93
|
+
BulkOperationModal: FunctionComponent<BulkOperationModalProps>;
|
94
|
+
} & Pick<BulkActionsComponentProps, 'bulkActionsData'> & Pick<BulkOperationModalProps, 'bulkOperationModalData'>;
|
79
95
|
export declare enum PaginationEnum {
|
80
96
|
PAGINATED = "paginated",
|
81
97
|
INFINITE = "infinite",
|
82
98
|
NOT_PAGINATED = "not-paginated"
|
83
99
|
}
|
84
|
-
export declare enum FiltersTypeEnum {
|
85
|
-
STATE = "state",
|
86
|
-
URL = "url",
|
87
|
-
NONE = "none"
|
88
|
-
}
|
89
100
|
export interface ConfigurableColumnsType {
|
90
101
|
allColumns: Column[];
|
91
102
|
visibleColumns: Column[];
|
@@ -93,14 +104,14 @@ export interface ConfigurableColumnsType {
|
|
93
104
|
}
|
94
105
|
interface GetRowsProps extends Pick<UseFiltersReturnType, 'offset' | 'pageSize' | 'searchKey' | 'sortBy' | 'sortOrder'> {
|
95
106
|
}
|
96
|
-
type AdditionalFilterPropsType<T extends Exclude<FiltersTypeEnum, FiltersTypeEnum.NONE>> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey'> : Pick<UseStateFiltersProps<string>, 'initialSortKey'>;
|
97
|
-
export type ViewWrapperProps = PropsWithChildren<Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'> & AdditionalProps & Partial<ConfigurableColumnsType> & {
|
107
|
+
type AdditionalFilterPropsType<T extends Exclude<FiltersTypeEnum, FiltersTypeEnum.NONE>> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey' | 'defaultPageSize'> : Pick<UseStateFiltersProps<string>, 'initialSortKey' | 'defaultPageSize'>;
|
108
|
+
export type ViewWrapperProps<T = FiltersTypeEnum.STATE> = PropsWithChildren<(T extends FiltersTypeEnum.NONE ? {} : Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'>) & AdditionalProps & Partial<ConfigurableColumnsType> & {
|
98
109
|
areRowsLoading: boolean;
|
99
|
-
|
110
|
+
filteredRows: RowsType | null;
|
111
|
+
} & (T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersReturnType<string>, 'updateSearchParams'> : {})>;
|
100
112
|
export type InternalTableProps = Required<Pick<ConfigurableColumnsType, 'visibleColumns' | 'setVisibleColumns'>> & {
|
101
113
|
id: `table__${string}`;
|
102
114
|
loading?: boolean;
|
103
|
-
paginationVariant: PaginationEnum;
|
104
115
|
/**
|
105
116
|
* Memoize columns before passing as props.
|
106
117
|
*
|
@@ -136,7 +147,7 @@ export type InternalTableProps = Required<Pick<ConfigurableColumnsType, 'visible
|
|
136
147
|
RowActionsOnHoverComponent?: FunctionComponent<{
|
137
148
|
row: RowType;
|
138
149
|
}>;
|
139
|
-
bulkSelectionReturnValue:
|
150
|
+
bulkSelectionReturnValue: BulkSelectionReturnValueType | null;
|
140
151
|
handleClearBulkSelection: () => void;
|
141
152
|
handleToggleBulkSelectionOnRow: (row: RowType) => void;
|
142
153
|
ViewWrapper?: FunctionComponent<ViewWrapperProps>;
|
@@ -166,28 +177,44 @@ export type InternalTableProps = Required<Pick<ConfigurableColumnsType, 'visible
|
|
166
177
|
* If filter is only being used for sorting, then send `noop` in this prop
|
167
178
|
*/
|
168
179
|
filter: (row: RowType, filterData: UseFiltersReturnType) => boolean;
|
180
|
+
clearFilters?: () => void;
|
169
181
|
} | {
|
170
182
|
filtersVariant: FiltersTypeEnum.STATE;
|
171
183
|
additionalFilterProps?: AdditionalFilterPropsType<FiltersTypeEnum.STATE>;
|
172
184
|
filter: (row: RowType, filterData: UseFiltersReturnType) => boolean;
|
185
|
+
clearFilters?: never;
|
173
186
|
} | {
|
174
187
|
filtersVariant: FiltersTypeEnum.NONE;
|
175
188
|
additionalFilterProps?: never;
|
176
189
|
filter?: never;
|
190
|
+
clearFilters?: never;
|
191
|
+
}) & ({
|
192
|
+
paginationVariant: PaginationEnum.PAGINATED;
|
193
|
+
pageSizeOptions?: PageSizeOption[];
|
194
|
+
} | {
|
195
|
+
paginationVariant: Omit<PaginationEnum, 'PAGINATED'>;
|
196
|
+
pageSizeOptions?: never;
|
177
197
|
});
|
178
198
|
export type UseResizableTableConfigWrapperProps = Omit<InternalTableProps, 'resizableConfig'>;
|
179
199
|
export type TableWithBulkSelectionProps = Omit<UseResizableTableConfigWrapperProps, 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow'>;
|
180
200
|
export type VisibleColumnsWrapperProps = Omit<TableWithBulkSelectionProps, 'visibleColumns' | 'setVisibleColumns'>;
|
181
201
|
export type FilterWrapperProps = Omit<VisibleColumnsWrapperProps, 'filterData'>;
|
182
|
-
export type TableProps = Pick<FilterWrapperProps, 'additionalFilterProps' | 'bulkSelectionConfig' | 'areColumnsConfigurable' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'RowActionsOnHoverComponent' | 'loading' | 'ViewWrapper'>;
|
183
|
-
export
|
202
|
+
export type TableProps = Pick<FilterWrapperProps, 'additionalFilterProps' | 'bulkSelectionConfig' | 'areColumnsConfigurable' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'RowActionsOnHoverComponent' | 'loading' | 'ViewWrapper' | 'pageSizeOptions' | 'clearFilters'>;
|
203
|
+
export type BulkActionStateType = string | null;
|
204
|
+
export interface BulkSelectionActionWidgetProps extends Pick<BulkSelectionConfigType, 'BulkActionsComponent' | 'bulkActionsData'> {
|
184
205
|
count: number;
|
185
206
|
handleClearBulkSelection: () => void;
|
186
207
|
parentRef: React.RefObject<HTMLDivElement>;
|
208
|
+
/** If it is null, we can say no bulk action has been selected yet */
|
209
|
+
setBulkActionState: Dispatch<SetStateAction<BulkActionStateType>>;
|
187
210
|
}
|
188
211
|
export type ConfigurableColumnsConfigType = Record<string, ConfigurableColumnsType['visibleColumns']>;
|
189
212
|
export interface GetFilteringPromiseProps {
|
190
213
|
searchSortTimeoutRef: React.MutableRefObject<number>;
|
191
214
|
callback: () => Promise<RowsType> | RowsType;
|
192
215
|
}
|
216
|
+
export interface TableContentProps extends Pick<InternalTableProps, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions'> {
|
217
|
+
filteredRows: RowsType;
|
218
|
+
areFilteredRowsLoading: boolean;
|
219
|
+
}
|
193
220
|
export {};
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import { InternalTableProps, RowsType } from './types';
|
2
|
-
declare const useTableWithKeyboardShortcuts: ({ bulkSelectionConfig, handleToggleBulkSelectionOnRow, bulkSelectionReturnValue, }: Pick<InternalTableProps, "bulkSelectionConfig" | "bulkSelectionReturnValue" | "handleToggleBulkSelectionOnRow">, visibleRows: RowsType) => {
|
2
|
+
declare const useTableWithKeyboardShortcuts: ({ bulkSelectionConfig, handleToggleBulkSelectionOnRow, bulkSelectionReturnValue, }: Pick<InternalTableProps, "bulkSelectionConfig" | "bulkSelectionReturnValue" | "handleToggleBulkSelectionOnRow">, visibleRows: RowsType, showPagination: boolean, bulkSelectionButtonRef: React.RefObject<HTMLLabelElement>) => {
|
3
3
|
activeRowIndex: number;
|
4
4
|
setActiveRowIndex: import('react').Dispatch<import('react').SetStateAction<number>>;
|
5
|
+
shortcutContainerProps: {
|
6
|
+
onKeyDown: (event: import('react').KeyboardEvent<HTMLElement>) => void;
|
7
|
+
onKeyUp: (event: import('react').KeyboardEvent<HTMLElement>) => void;
|
8
|
+
onBlur: (event: import('react').FocusEvent<HTMLElement>) => void;
|
9
|
+
};
|
5
10
|
};
|
6
11
|
export default useTableWithKeyboardShortcuts;
|
@@ -4,3 +4,8 @@ export declare const getVisibleColumnsFromLocalStorage: ({ allColumns, id, }: Pi
|
|
4
4
|
export declare const setVisibleColumnsToLocalStorage: ({ id, visibleColumns, }: Pick<ConfigurableColumnsType, "visibleColumns"> & Pick<TableProps, "id">) => void;
|
5
5
|
export declare const getVisibleColumns: ({ areColumnsConfigurable, columns, id, }: Pick<TableProps, "areColumnsConfigurable" | "columns" | "id">) => Column[];
|
6
6
|
export declare const getFilteringPromise: ({ searchSortTimeoutRef, callback }: GetFilteringPromiseProps) => Promise<RowsType>;
|
7
|
+
export declare const getStickyColumnConfig: (gridTemplateColumns: string, columnIndex: number) => {
|
8
|
+
className: string;
|
9
|
+
left: string;
|
10
|
+
};
|
11
|
+
export declare const scrollToShowActiveElementIfNeeded: (activeElement: HTMLDivElement, parent: HTMLDivElement, topMargin: number) => void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { TooltipProps } from '
|
1
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
2
2
|
import { TargetPlatformsDTO } from '../../types';
|
3
3
|
export interface TargetPlatformBadgeListProps extends Required<Pick<TargetPlatformsDTO, 'targetPlatforms'>> {
|
4
4
|
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { SourceTypeCardProps } from './types';
|
2
|
-
declare const SourceTypeCard: ({ title, subtitle,
|
2
|
+
declare const SourceTypeCard: ({ title, subtitle, dataTestId, icons, type, disableInfo, disabled, onCardAction, }: SourceTypeCardProps) => JSX.Element;
|
3
3
|
export default SourceTypeCard;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { WorkflowOptionsModalProps } from './types';
|
2
|
-
declare const WorkflowOptionsModal: ({
|
2
|
+
declare const WorkflowOptionsModal: ({ open, addCIPipeline, addWebhookCD, addLinkedCD, showLinkedCDSource, changeCIPayload, workflows, getWorkflows, resetChangeCIPayload, linkedCDSourceVariant, isAppGroup, isTemplateView, onClose, }: Readonly<WorkflowOptionsModalProps>) => JSX.Element;
|
3
3
|
export default WorkflowOptionsModal;
|
@@ -1,52 +1,86 @@
|
|
1
|
-
import {
|
1
|
+
import { WorkflowNodeType } from '../../../Common/Types';
|
2
2
|
import { CIPipelineNodeType } from '../../types';
|
3
|
-
export declare const WORKFLOW_OPTIONS_MODAL: {
|
4
|
-
ACTION_TEXT: string;
|
5
|
-
ACTION_NOTE: string;
|
6
|
-
CHANGE_CI_TEXT: string;
|
7
|
-
CHANGE_CI_NOTE: string;
|
8
|
-
};
|
9
|
-
export declare const WORKFLOW_OPTIONS_MODAL_TYPES: {
|
10
|
-
DEFAULT: string;
|
11
|
-
RECIEVE: string;
|
12
|
-
JOB: string;
|
13
|
-
};
|
14
3
|
export declare const SOURCE_TYPE_CARD_VARIANTS: {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
4
|
+
BUILD: {
|
5
|
+
BUILD_AND_DEPLOY_FROM_SOURCE_CODE: {
|
6
|
+
title: string;
|
7
|
+
subtitle: string;
|
8
|
+
dataTestId: string;
|
9
|
+
type: CIPipelineNodeType.CI_CD;
|
10
|
+
icons: ({
|
11
|
+
name: "ic-git-branch";
|
12
|
+
color: "N700";
|
13
|
+
} | {
|
14
|
+
name: "ic-build-color";
|
15
|
+
color: any;
|
16
|
+
} | {
|
17
|
+
name: "ic-deploy-color";
|
18
|
+
color: any;
|
19
|
+
})[];
|
20
|
+
};
|
21
|
+
BUILD_FROM_SOURCE_CODE: {
|
22
|
+
title: string;
|
23
|
+
subtitle: string;
|
24
|
+
dataTestId: string;
|
25
|
+
type: CIPipelineNodeType.CI;
|
26
|
+
icons: ({
|
27
|
+
name: "ic-git-branch";
|
28
|
+
color: "N700";
|
29
|
+
} | {
|
30
|
+
name: "ic-build-color";
|
31
|
+
color: any;
|
32
|
+
})[];
|
33
|
+
};
|
34
|
+
JOB: {
|
35
|
+
title: string;
|
36
|
+
subtitle: string;
|
37
|
+
dataTestId: string;
|
38
|
+
type: CIPipelineNodeType.JOB_CI;
|
39
|
+
icons: {
|
40
|
+
name: "ic-job-color";
|
41
|
+
color: any;
|
42
|
+
}[];
|
43
|
+
};
|
30
44
|
};
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
45
|
+
RECEIVE: {
|
46
|
+
EXTERNAL_SERVICE: {
|
47
|
+
title: string;
|
48
|
+
subtitle: string;
|
49
|
+
dataTestId: string;
|
50
|
+
type: WorkflowNodeType.WEBHOOK;
|
51
|
+
icons: ({
|
52
|
+
name: "ic-webhook";
|
53
|
+
color: any;
|
54
|
+
} | {
|
55
|
+
name: "ic-deploy-color";
|
56
|
+
color: any;
|
57
|
+
})[];
|
58
|
+
};
|
59
|
+
LINKED_PIPELINE: {
|
60
|
+
title: string;
|
61
|
+
subtitle: string;
|
62
|
+
dataTestId: string;
|
63
|
+
type: CIPipelineNodeType.LINKED_CI;
|
64
|
+
icons: {
|
65
|
+
name: "ic-linked-build-color";
|
66
|
+
color: any;
|
67
|
+
}[];
|
68
|
+
};
|
38
69
|
};
|
39
70
|
JOB: {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
71
|
+
JOB: {
|
72
|
+
title: string;
|
73
|
+
subtitle: string;
|
74
|
+
dataTestId: string;
|
75
|
+
type: CIPipelineNodeType.JOB_CI;
|
76
|
+
icons: {
|
77
|
+
name: "ic-job-color";
|
78
|
+
color: any;
|
79
|
+
}[];
|
80
|
+
};
|
46
81
|
};
|
47
82
|
};
|
48
83
|
export declare const NO_ENV_FOUND = "No environment found. Please create a CD Pipeline first.";
|
49
|
-
export declare const CHANGE_SAME_CI = "Cannot change to same source type";
|
50
84
|
export declare const REQUEST_IN_PROGRESS = "Request in progress";
|
51
85
|
export declare const TOAST_MESSAGES: {
|
52
86
|
SUCCESS_CHANGE_TO_WEBHOOK: string;
|
@@ -1,20 +1,19 @@
|
|
1
|
+
import { WorkflowNodeType } from '../../../Common/Types';
|
1
2
|
import { ChangeCIPayloadType, CIPipelineNodeType, WorkflowType } from '../../types';
|
2
3
|
import { AppConfigProps } from '../../../Pages/index';
|
3
|
-
|
4
|
+
import { GenericModalProps } from '../GenericModal';
|
5
|
+
import { IconsProps } from '../Icon';
|
6
|
+
export interface SourceTypeCardProps {
|
4
7
|
title: string;
|
5
8
|
subtitle: string;
|
6
|
-
image: string;
|
7
|
-
alt: string;
|
8
9
|
dataTestId: string;
|
9
|
-
type:
|
10
|
-
|
11
|
-
export interface SourceTypeCardProps extends LinkedCDSourceVariant {
|
12
|
-
handleCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
10
|
+
type: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
11
|
+
disabled?: boolean;
|
13
12
|
disableInfo: string;
|
14
|
-
|
13
|
+
icons: Pick<IconsProps, 'name' | 'color'>[];
|
14
|
+
onCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
15
15
|
}
|
16
|
-
export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps, 'isTemplateView'
|
17
|
-
handleCloseWorkflowOptionsModal: () => void;
|
16
|
+
export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps, 'isTemplateView'>>, Pick<GenericModalProps, 'open' | 'onClose'> {
|
18
17
|
addCIPipeline: (type: CIPipelineNodeType, workflowId?: number | string) => void;
|
19
18
|
addWebhookCD: (workflowId?: number | string) => void;
|
20
19
|
addLinkedCD: (changeCIPayload?: ChangeCIPayloadType) => void;
|
@@ -23,7 +22,6 @@ export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps,
|
|
23
22
|
changeCIPayload?: ChangeCIPayloadType;
|
24
23
|
workflows?: WorkflowType[];
|
25
24
|
getWorkflows?: () => void;
|
26
|
-
linkedCDSourceVariant?:
|
25
|
+
linkedCDSourceVariant?: Pick<SourceTypeCardProps, 'title' | 'subtitle' | 'type' | 'icons' | 'dataTestId'>;
|
27
26
|
isAppGroup?: boolean;
|
28
27
|
}
|
29
|
-
export {};
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { PipelineType } from '../../../Common/Types';
|
2
|
-
import { ChangeCIPayloadType } from '../../types';
|
1
|
+
import { PipelineType, WorkflowNodeType } from '../../../Common/Types';
|
2
|
+
import { ChangeCIPayloadType, CIPipelineNodeType } from '../../types';
|
3
|
+
import { SourceTypeCardProps, WorkflowOptionsModalProps } from './types';
|
3
4
|
export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloadType) => {
|
4
5
|
appId: number;
|
5
6
|
pipelines: {
|
@@ -12,3 +13,13 @@ export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloa
|
|
12
13
|
switchFromCiPipelineId: number;
|
13
14
|
}[];
|
14
15
|
};
|
16
|
+
export declare const getCurrentPipelineType: ({ workflows, changeCIPayload, }: Required<Pick<WorkflowOptionsModalProps, "workflows" | "changeCIPayload">>) => SourceTypeCardProps["type"];
|
17
|
+
export declare const getBuildWorkflowCardsConfig: ({ currentPipelineType, changeCIPayload, isAppGroup, }: {
|
18
|
+
currentPipelineType: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
19
|
+
} & Required<Pick<WorkflowOptionsModalProps, "changeCIPayload" | "isAppGroup">>) => Pick<SourceTypeCardProps, "title" | "dataTestId" | "disabled" | "type" | "subtitle" | "icons">[];
|
20
|
+
export declare const getReceiveWorkflowCardsConfig: ({ currentPipelineType, linkedCDSourceVariant, isAppGroup, }: {
|
21
|
+
currentPipelineType: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
22
|
+
} & Required<Pick<WorkflowOptionsModalProps, "linkedCDSourceVariant" | "isAppGroup">>) => Pick<SourceTypeCardProps, "title" | "dataTestId" | "disabled" | "type" | "subtitle" | "icons">[];
|
23
|
+
export declare const getJobWorkflowCardsConfig: ({ currentPipelineType, isAppGroup, }: {
|
24
|
+
currentPipelineType: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
25
|
+
} & Required<Pick<WorkflowOptionsModalProps, "isAppGroup">>) => Pick<SourceTypeCardProps, "title" | "dataTestId" | "disabled" | "type" | "subtitle" | "icons">[];
|
@@ -7,6 +7,7 @@ export * from './APIResponseHandler';
|
|
7
7
|
export * from './AppStatusModal';
|
8
8
|
export * from './ArtifactInfoModal';
|
9
9
|
export * from './Backdrop';
|
10
|
+
export * from './Badge';
|
10
11
|
export * from './BulkOperations';
|
11
12
|
export * from './BulkSelection';
|
12
13
|
export * from './Button';
|
@@ -40,6 +41,7 @@ export * from './FlagImage';
|
|
40
41
|
export * from './FloatingVariablesSuggestions';
|
41
42
|
export * from './FramerComponents';
|
42
43
|
export * from './GenericInfoCard';
|
44
|
+
export * from './GenericModal';
|
43
45
|
export * from './GenericSectionErrorState';
|
44
46
|
export * from './GitCommitInfoGeneric';
|
45
47
|
export * from './GitProviderIcon';
|
@@ -63,6 +65,7 @@ export * from './ModalSidebarPanel';
|
|
63
65
|
export * from './NumbersCount';
|
64
66
|
export * from './PhoneInput';
|
65
67
|
export * from './Plugin';
|
68
|
+
export * from './Popover';
|
66
69
|
export * from './ProgressBar';
|
67
70
|
export { default as QRCode } from './QRCode';
|
68
71
|
export * from './ReactSelect';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -2,10 +2,10 @@ import { ReactElement } from 'react';
|
|
2
2
|
import { PromptProps } from 'react-router-dom';
|
3
3
|
import { StrictRJSFSchema } from '@rjsf/utils';
|
4
4
|
import { Pair } from 'yaml';
|
5
|
-
import { MaterialHistoryType } from '
|
5
|
+
import { MaterialHistoryType } from './Services/app.types';
|
6
6
|
import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
|
7
7
|
import { AggregatedNodes, PodMetadatum } from './Components';
|
8
|
-
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
8
|
+
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
9
9
|
interface HighlightSearchTextProps {
|
10
10
|
/**
|
11
11
|
* The text to be highlighted
|
@@ -102,4 +102,5 @@ export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, t
|
|
102
102
|
export declare const clearCookieOnLogout: () => void;
|
103
103
|
export declare const getAppDetailsURL: (appId: number | string, envId?: number | string) => string;
|
104
104
|
export declare const smoothScrollToTop: (scrollContainer: HTMLElement, targetPosition: number) => import('framer-motion').AnimationPlaybackControls;
|
105
|
+
export declare const getGroupVersionFromApiVersion: (apiVersion: string) => Pick<Node, "group" | "version">;
|
105
106
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { USER_PREFERENCES_ATTRIBUTE_KEY } from '
|
2
|
-
import { AppThemeType, ThemeConfigType, ThemePreferenceType } from '
|
1
|
+
import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants';
|
2
|
+
import { AppThemeType, ThemeConfigType, ThemePreferenceType } from '../../Providers/ThemeProvider/types';
|
3
3
|
import { BaseAppMetaData } from '../../Services';
|
4
4
|
import { ResourceKindType } from '../../types';
|
5
5
|
export interface GetUserPreferencesQueryParamsType {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
2
|
-
import { SERVER_MODE } from '
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { SERVER_MODE } from '../../../Common';
|
3
|
+
import { DevtronLicenseInfo, EnvironmentDataValuesDTO, IntelligenceConfig, LicenseInfoDialogType, ToastManager } from '../..';
|
4
|
+
import { ServerInfo } from '../../Components/Header/types';
|
5
5
|
export interface ReloadVersionConfigTypes {
|
6
6
|
bgUpdated: boolean;
|
7
7
|
handleAppUpdate: () => void;
|
@@ -66,7 +66,7 @@ type CommonMainContextProps = {
|
|
66
66
|
setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>;
|
67
67
|
setAIAgentContext: (aiAgentContext: AIAgentContextType) => void;
|
68
68
|
setSidePanelConfig: Dispatch<SetStateAction<SidePanelConfig>>;
|
69
|
-
}
|
69
|
+
} & Pick<EnvironmentDataValuesDTO, 'isResourceRecommendationEnabled'>;
|
70
70
|
export type MainContext = CommonMainContextProps & ({
|
71
71
|
isLicenseDashboard?: never;
|
72
72
|
serverMode: SERVER_MODE;
|
@@ -1,6 +1,4 @@
|
|
1
1
|
export * from './ImageSelectionUtility';
|
2
2
|
export * from './MainContextProvider';
|
3
3
|
export * from './ThemeProvider';
|
4
|
-
export type { MainContext, ReloadVersionConfigTypes, SidePanelConfig } from './types';
|
5
|
-
export { SidePanelTab } from './types';
|
6
4
|
export * from './UserEmailProvider';
|
@@ -38,5 +38,6 @@ export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitO
|
|
38
38
|
isManifestScanningEnabled: boolean;
|
39
39
|
canOnlyViewPermittedEnvOrgLevel: boolean;
|
40
40
|
devtronManagedLicensingEnabled: boolean;
|
41
|
+
isResourceRecommendationEnabled?: boolean;
|
41
42
|
}
|
42
43
|
export {};
|
package/dist/Shared/types.d.ts
CHANGED
@@ -97,7 +97,8 @@ export declare enum Nodes {
|
|
97
97
|
Node = "Node",
|
98
98
|
Overview = "Overview",
|
99
99
|
MonitoringDashboard = "MonitoringDashboard",
|
100
|
-
UpgradeCluster = "UpgradeCluster"
|
100
|
+
UpgradeCluster = "UpgradeCluster",
|
101
|
+
ResourceRecommender = "ResourceRecommender"
|
101
102
|
}
|
102
103
|
export type NodeType = keyof typeof Nodes;
|
103
104
|
export interface Node {
|
@@ -760,6 +761,15 @@ interface CommonTabArgsType {
|
|
760
761
|
* @default false
|
761
762
|
*/
|
762
763
|
shouldRemainMounted?: boolean;
|
764
|
+
/**
|
765
|
+
* @default false
|
766
|
+
* If true, tab would contain alpha as badge next to the title
|
767
|
+
*/
|
768
|
+
isAlpha?: boolean;
|
769
|
+
/**
|
770
|
+
* On tab stop, i.e by pressing cross icon on alive tab [fixed tab expanding on click of tab and remains expanded on other tab click], tab will reset the tab to this default URL if provided
|
771
|
+
*/
|
772
|
+
defaultUrl?: string | null;
|
763
773
|
}
|
764
774
|
export type InitTabType = Omit<CommonTabArgsType, 'type'> & ({
|
765
775
|
type: 'fixed';
|
@@ -876,7 +886,8 @@ export declare enum CIPipelineNodeType {
|
|
876
886
|
CI = "CI",
|
877
887
|
LINKED_CI = "LINKED-CI",
|
878
888
|
JOB_CI = "JOB-CI",
|
879
|
-
LINKED_CD = "LINKED_CD"
|
889
|
+
LINKED_CD = "LINKED_CD",
|
890
|
+
CI_CD = "CI_CD"
|
880
891
|
}
|
881
892
|
export interface ChangeCIPayloadType {
|
882
893
|
appWorkflowId: number;
|
@@ -1043,7 +1054,6 @@ export interface DeploymentStatusDetailsType {
|
|
1043
1054
|
timelines: DeploymentStatusDetailsTimelineType[];
|
1044
1055
|
wfrStatus?: WorkflowRunnerStatusDTO;
|
1045
1056
|
isDeploymentWithoutApproval: boolean;
|
1046
|
-
deploymentAppType: DeploymentAppTypes;
|
1047
1057
|
}
|
1048
1058
|
export type DeploymentStatusTimelineType = TIMELINE_STATUS.DEPLOYMENT_INITIATED | TIMELINE_STATUS.GIT_COMMIT | TIMELINE_STATUS.ARGOCD_SYNC | TIMELINE_STATUS.KUBECTL_APPLY | TIMELINE_STATUS.APP_HEALTH | TIMELINE_STATUS.HELM_PACKAGE_GENERATED | TIMELINE_STATUS.HELM_MANIFEST_PUSHED_TO_HELM_REPO;
|
1049
1059
|
export type DeploymentStatusBreakdownItemIconType = 'success' | 'failed' | 'unknown' | 'inprogress' | 'unreachable' | 'loading' | 'disconnect' | 'timed_out' | '';
|
@@ -1088,7 +1098,6 @@ export interface DeploymentStatusDetailsBreakdownDataType {
|
|
1088
1098
|
deploymentErrorMessage: string;
|
1089
1099
|
nextTimelineToProcess: DeploymentStatusTimelineType;
|
1090
1100
|
} | null;
|
1091
|
-
deploymentAppType: DeploymentAppTypes;
|
1092
1101
|
}
|
1093
1102
|
export interface IntelligenceConfig {
|
1094
1103
|
clusterId: number;
|