@devtron-labs/devtron-fe-common-lib 0.0.83-beta-8 → 0.0.83-beta-10
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/Common/Api.d.ts +1 -1
- package/dist/Common/Dialogs/Types.d.ts +17 -2
- package/dist/Common/EmptyState/GenericFilterEmptyState.d.ts +4 -0
- package/dist/Common/Helper.d.ts +1 -0
- package/dist/Common/Hooks/index.d.ts +1 -0
- package/dist/Common/Hooks/useStateFilters/index.d.ts +2 -0
- package/dist/Common/Hooks/useStateFilters/types.d.ts +6 -0
- package/dist/Common/Hooks/useStateFilters/useStateFilters.d.ts +17 -0
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -1
- package/dist/Common/Modals/Modal.d.ts +3 -0
- package/dist/Common/Modals/OpaqueModal.d.ts +3 -0
- package/dist/Common/PopupMenu.d.ts +1 -1
- package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +4 -0
- package/dist/Common/Types.d.ts +25 -4
- package/dist/Common/index.d.ts +1 -0
- package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +1 -1
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +7 -2
- package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +1 -1
- package/dist/Shared/Components/ButtonWithSelector/types.d.ts +1 -0
- package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
- package/dist/Shared/Components/FilterChips/types.d.ts +11 -3
- package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -1
- package/dist/Shared/Components/GenericSectionErrorState/index.d.ts +1 -0
- package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +6 -0
- package/dist/Shared/Helpers.d.ts +4 -2
- package/dist/Shared/constants.d.ts +4 -1
- package/dist/Shared/types.d.ts +28 -12
- package/dist/Shared/validations.d.ts +3 -0
- package/dist/{cssMode-23b0cd7f.js → cssMode-0b1fd8d5.js} +1 -1
- package/dist/{freemarker2-9814449c.js → freemarker2-b16daf65.js} +1 -1
- package/dist/{handlebars-594a035b.js → handlebars-1be38206.js} +1 -1
- package/dist/{html-bc6230a8.js → html-15a1ae76.js} +1 -1
- package/dist/{htmlMode-91b229f0.js → htmlMode-4d531231.js} +1 -1
- package/dist/{index-f2eddf63.js → index-9a6545f4.js} +15920 -15785
- package/dist/index.js +133 -127
- package/dist/{javascript-2020b19a.js → javascript-3c923d79.js} +1 -1
- package/dist/{jsonMode-10d83de8.js → jsonMode-059e196e.js} +1 -1
- package/dist/{liquid-15729374.js → liquid-97dde725.js} +1 -1
- package/dist/{mdx-206632c4.js → mdx-10e732f3.js} +1 -1
- package/dist/{python-737e2fe6.js → python-b3e4d219.js} +1 -1
- package/dist/{razor-18933201.js → razor-e87cbcae.js} +1 -1
- package/dist/{tsMode-414f94b0.js → tsMode-fa3a1e52.js} +1 -1
- package/dist/{typescript-ec120bb2.js → typescript-9dbf3fba.js} +1 -1
- package/dist/{xml-7ecec7e0.js → xml-3c73a1f6.js} +1 -1
- package/dist/{yaml-0fa29038.js → yaml-4569a526.js} +1 -1
- package/package.json +1 -1
package/dist/Common/Api.d.ts
CHANGED
|
@@ -13,4 +13,4 @@ export declare const abortPreviousRequests: <T>(callback: () => Promise<T>, abor
|
|
|
13
13
|
/**
|
|
14
14
|
* Returns true if the error is due to a aborted request
|
|
15
15
|
*/
|
|
16
|
-
export declare const getIsRequestAborted: (error: any) =>
|
|
16
|
+
export declare const getIsRequestAborted: (error: any) => boolean;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type WithOrWithoutDeleteConfirmationType = {
|
|
4
|
+
showDeleteConfirmation: true;
|
|
5
|
+
/**
|
|
6
|
+
* If added, confirmation input is shown
|
|
7
|
+
*/
|
|
8
|
+
deleteConfirmationText: string;
|
|
9
|
+
} | {
|
|
10
|
+
showDeleteConfirmation?: never;
|
|
11
|
+
/**
|
|
12
|
+
* If added, confirmation input is shown
|
|
13
|
+
*/
|
|
14
|
+
deleteConfirmationText?: never;
|
|
15
|
+
};
|
|
16
|
+
export type DeleteDialogProps = {
|
|
4
17
|
title: string;
|
|
5
18
|
description?: string;
|
|
6
19
|
closeDelete: () => void;
|
|
@@ -12,7 +25,8 @@ export interface DeleteDialogProps {
|
|
|
12
25
|
buttonPrimaryText?: string;
|
|
13
26
|
shouldStopPropagation?: boolean;
|
|
14
27
|
disabled?: boolean;
|
|
15
|
-
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
} & WithOrWithoutDeleteConfirmationType;
|
|
16
30
|
export interface ForceDeleteDialogType {
|
|
17
31
|
onClickDelete: () => void;
|
|
18
32
|
closeDeleteModal: () => void;
|
|
@@ -44,3 +58,4 @@ export interface DialogFormProps {
|
|
|
44
58
|
onSave: (event: any) => void;
|
|
45
59
|
headerClassName?: string;
|
|
46
60
|
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GenericEmptyStateType } from '../Types';
|
|
2
|
+
|
|
3
|
+
declare const GenericFilterEmptyState: (props: Omit<GenericEmptyStateType, 'image' | 'title' | 'subTitle'> & Partial<Pick<GenericEmptyStateType, 'title' | 'subTitle'>>) => JSX.Element;
|
|
4
|
+
export default GenericFilterEmptyState;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -86,4 +86,5 @@ export declare const compareObjectLength: (objA: any, objB: any) => boolean;
|
|
|
86
86
|
* Return deep copy of the object
|
|
87
87
|
*/
|
|
88
88
|
export declare function deepEqual(configA: any, configB: any): boolean;
|
|
89
|
+
export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
|
|
89
90
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseUrlFiltersProps, UseUrlFiltersReturnType } from '../useUrlFilters';
|
|
2
|
+
|
|
3
|
+
export interface UseStateFiltersProps<T> extends Pick<UseUrlFiltersProps<T, never>, 'initialSortKey'> {
|
|
4
|
+
}
|
|
5
|
+
export interface UseStateFiltersReturnType<T> extends Pick<UseUrlFiltersReturnType<T>, 'sortBy' | 'sortOrder' | 'handleSorting' | 'clearFilters' | 'searchKey' | 'handleSearch'> {
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UseStateFiltersProps, UseStateFiltersReturnType } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generic hook for implementing state based pagination, search, sorting.
|
|
5
|
+
* Sister method of [useUrlFilters](https://github.com/devtron-labs/devtron-fe-common-lib/blob/main/src/Common/Hooks/useUrlFilters/useUrlFilters.ts)
|
|
6
|
+
*
|
|
7
|
+
* The exposed handlers can be consumed directly without the need for explicit state management
|
|
8
|
+
*
|
|
9
|
+
* @example Usage with custom type for sort keys and initial sort key:
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const { sortBy, sortOrder } = useUrlFilters<'email' | 'name'>({ initialSortKey: 'email' })
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* To be extended to be used with pagination and search as and when required
|
|
15
|
+
*/
|
|
16
|
+
declare const useStateFilters: <T = string>({ initialSortKey, }?: UseStateFiltersProps<T>) => UseStateFiltersReturnType<T>;
|
|
17
|
+
export default useStateFilters;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ModalType } from '../Types';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use VisibleModal instead
|
|
6
|
+
*/
|
|
4
7
|
export declare const Modal: ({ style, children, modal, rootClassName, onClick, callbackRef, preventWheelDisable, noBackDrop, }: ModalType) => React.ReactPortal;
|
|
@@ -5,6 +5,9 @@ export interface OpaqueModalProps {
|
|
|
5
5
|
onHide?: any;
|
|
6
6
|
noBackground?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use VisibleModal instead
|
|
10
|
+
*/
|
|
8
11
|
export declare class OpaqueModal extends React.Component<OpaqueModalProps> {
|
|
9
12
|
modalRef: HTMLElement;
|
|
10
13
|
componentDidMount(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PopupMenuBodyType, PopupMenuButtonType, PopupMenuType } from './Types';
|
|
2
2
|
|
|
3
3
|
declare const PopupMenu: {
|
|
4
|
-
({ children, onToggleCallback, autoClose, autoPosition, }: PopupMenuType): any;
|
|
4
|
+
({ children, onToggleCallback, autoClose, autoPosition, shouldPreventDefault }: PopupMenuType): any;
|
|
5
5
|
Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab, dataTestId, }: PopupMenuButtonType) => JSX.Element;
|
|
6
6
|
Body: ({ children, rootClassName, style, autoWidth, preventWheelDisable, noBackDrop, }: PopupMenuBodyType) => JSX.Element;
|
|
7
7
|
};
|
|
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
|
|
|
34
34
|
* <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, }: SearchBarProps) => JSX.Element;
|
|
37
|
+
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
|
|
38
38
|
export default SearchBar;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -28,9 +28,9 @@ export interface APIOptions {
|
|
|
28
28
|
signal?: AbortSignal;
|
|
29
29
|
preventAutoLogout?: boolean;
|
|
30
30
|
}
|
|
31
|
-
export interface OptionType {
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
export interface OptionType<T = string, K = string> {
|
|
32
|
+
value: T;
|
|
33
|
+
label: K;
|
|
34
34
|
}
|
|
35
35
|
export declare enum TippyTheme {
|
|
36
36
|
black = "black",
|
|
@@ -116,7 +116,7 @@ export interface GenericEmptyStateType {
|
|
|
116
116
|
layout?: 'row' | 'column';
|
|
117
117
|
contentClassName?: string;
|
|
118
118
|
}
|
|
119
|
-
export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload'> {
|
|
119
|
+
export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload' | 'redirectURL'> {
|
|
120
120
|
code: number;
|
|
121
121
|
heightToDeduct?: number;
|
|
122
122
|
redirectURL?: string;
|
|
@@ -128,6 +128,10 @@ export interface ErrorScreenManagerProps {
|
|
|
128
128
|
subtitle?: React.ReactChild;
|
|
129
129
|
reloadClass?: string;
|
|
130
130
|
heightToDeduct?: number;
|
|
131
|
+
/**
|
|
132
|
+
* Would be used to redirect URL in case of 404
|
|
133
|
+
* @default - APP_LIST
|
|
134
|
+
*/
|
|
131
135
|
redirectURL?: string;
|
|
132
136
|
}
|
|
133
137
|
export interface ErrorScreenNotAuthorizedProps {
|
|
@@ -209,6 +213,7 @@ export interface PopupMenuType {
|
|
|
209
213
|
onToggleCallback?: (isOpen: boolean) => void;
|
|
210
214
|
autoClose?: boolean;
|
|
211
215
|
autoPosition?: boolean;
|
|
216
|
+
shouldPreventDefault?: boolean;
|
|
212
217
|
}
|
|
213
218
|
export interface PopupMenuButtonType {
|
|
214
219
|
children?: ReactNode;
|
|
@@ -306,6 +311,14 @@ export interface DeploymentWindowArtifactMetadata {
|
|
|
306
311
|
name: string;
|
|
307
312
|
type: DEPLOYMENT_WINDOW_TYPE;
|
|
308
313
|
}
|
|
314
|
+
export interface ArtifactReleaseMappingType {
|
|
315
|
+
id: number;
|
|
316
|
+
identifier: string;
|
|
317
|
+
releaseVersion: string;
|
|
318
|
+
name: string;
|
|
319
|
+
kind: string;
|
|
320
|
+
version: string;
|
|
321
|
+
}
|
|
309
322
|
export interface CDMaterialType {
|
|
310
323
|
index: number;
|
|
311
324
|
id: string;
|
|
@@ -349,6 +362,14 @@ export interface CDMaterialType {
|
|
|
349
362
|
promotionApprovalMetadata?: PromotionApprovalMetadataType;
|
|
350
363
|
deployedOnEnvironments?: string[];
|
|
351
364
|
deploymentWindowArtifactMetadata?: DeploymentWindowArtifactMetadata;
|
|
365
|
+
/**
|
|
366
|
+
* Will only be present in case of release
|
|
367
|
+
*/
|
|
368
|
+
configuredInReleases: ArtifactReleaseMappingType[];
|
|
369
|
+
/**
|
|
370
|
+
* Would currently only be received in case of release
|
|
371
|
+
*/
|
|
372
|
+
appWorkflowId: number;
|
|
352
373
|
}
|
|
353
374
|
export declare enum CDMaterialServiceEnum {
|
|
354
375
|
ROLLBACK = "rollback",
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export { default as InfoColourBar } from './InfoColorBar/InfoColourbar';
|
|
|
26
26
|
export * from './Common.service';
|
|
27
27
|
export * from './Checkbox';
|
|
28
28
|
export { default as GenericEmptyState } from './EmptyState/GenericEmptyState';
|
|
29
|
+
export { default as GenericFilterEmptyState } from './EmptyState/GenericFilterEmptyState';
|
|
29
30
|
export * from './SearchBar';
|
|
30
31
|
export * from './SortableTableHeaderCell';
|
|
31
32
|
export { default as Toggle } from './Toggle/Toggle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { APIResponseHandlerProps } from './types';
|
|
2
2
|
|
|
3
|
-
declare const APIResponseHandler: ({ isLoading, progressingProps, customLoader, error, notAuthorized, notFoundText, reloadProps, genericSectionErrorProps, children, }: APIResponseHandlerProps) => JSX.Element;
|
|
3
|
+
declare const APIResponseHandler: ({ isLoading, progressingProps, customLoader, error, notAuthorized, notFoundText, reloadProps, genericSectionErrorProps, errorScreenManagerProps, children, }: APIResponseHandlerProps) => JSX.Element;
|
|
4
4
|
export default APIResponseHandler;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenericSectionErrorStateProps } from '../GenericSectionErrorState/types';
|
|
2
|
-
import { GenericEmptyStateType, ProgressingProps, ReloadType, ServerErrors } from '../../../Common';
|
|
2
|
+
import { ErrorScreenManagerProps, GenericEmptyStateType, ProgressingProps, ReloadType, ServerErrors } from '../../../Common';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
|
|
5
5
|
export interface EmptyPageTextType {
|
|
@@ -37,9 +37,14 @@ export interface APIResponseHandlerProps {
|
|
|
37
37
|
*/
|
|
38
38
|
reloadProps?: ReloadType;
|
|
39
39
|
/**
|
|
40
|
-
* If given, would show
|
|
40
|
+
* If given, would show GenericSectionErrorState instead of default Reload component
|
|
41
41
|
*/
|
|
42
42
|
genericSectionErrorProps?: GenericSectionErrorStateProps;
|
|
43
|
+
/**
|
|
44
|
+
* If given, would show ErrorScreenManager component instead of Reload component
|
|
45
|
+
* Priority of error states are: genericSectionErrorProps > errorScreenManagerProps > Reload component
|
|
46
|
+
*/
|
|
47
|
+
errorScreenManagerProps?: ErrorScreenManagerProps;
|
|
43
48
|
/**
|
|
44
49
|
* If no Error and no Loading, would load this component
|
|
45
50
|
*/
|
|
@@ -14,5 +14,5 @@ import { ButtonWithSelectorProps } from './types';
|
|
|
14
14
|
* </ButtonWithSelector>
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, }: ButtonWithSelectorProps) => JSX.Element;
|
|
17
|
+
declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, disabled, }: ButtonWithSelectorProps) => JSX.Element;
|
|
18
18
|
export default ButtonWithSelector;
|
|
@@ -3,5 +3,5 @@ import { FilterChipsProps } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Component for rendering the applied filter chips
|
|
5
5
|
*/
|
|
6
|
-
declare const FilterChips: ({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, }: FilterChipsProps) => JSX.Element;
|
|
6
|
+
declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, }: FilterChipsProps<T>) => JSX.Element;
|
|
7
7
|
export default FilterChips;
|
|
@@ -22,11 +22,11 @@ export interface FilterChipProps {
|
|
|
22
22
|
*/
|
|
23
23
|
getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
|
|
24
24
|
}
|
|
25
|
-
export interface FilterChipsProps extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
|
|
25
|
+
export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
|
|
26
26
|
/**
|
|
27
27
|
* Current filter configuration
|
|
28
28
|
*/
|
|
29
|
-
filterConfig:
|
|
29
|
+
filterConfig: T;
|
|
30
30
|
/**
|
|
31
31
|
* Callback handler for removing the filters
|
|
32
32
|
*/
|
|
@@ -34,5 +34,13 @@ export interface FilterChipsProps extends Pick<FilterChipProps, 'getFormattedLab
|
|
|
34
34
|
/**
|
|
35
35
|
* Handler for removing a applied filter
|
|
36
36
|
*/
|
|
37
|
-
onRemoveFilter: (filterConfig:
|
|
37
|
+
onRemoveFilter: (filterConfig: T) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Class name for the container
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Class name for the clear filter button
|
|
44
|
+
*/
|
|
45
|
+
clearButtonClassName?: string;
|
|
38
46
|
}
|
package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GenericSectionErrorStateProps } from './types';
|
|
2
2
|
|
|
3
|
-
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, }: GenericSectionErrorStateProps) => JSX.Element;
|
|
3
|
+
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, }: GenericSectionErrorStateProps) => JSX.Element;
|
|
4
4
|
export default GenericSectionErrorState;
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GitTriggers, WebhookEventNameType } from './types';
|
|
2
|
-
import { MaterialInfo } from '../Common';
|
|
2
|
+
import { MaterialInfo, SortingOrder } from '../Common';
|
|
3
3
|
|
|
4
4
|
interface HighlightSearchTextProps {
|
|
5
5
|
/**
|
|
@@ -19,7 +19,9 @@ export declare const highlightSearchText: ({ searchText, text, highlightClasses
|
|
|
19
19
|
export declare const preventBodyScroll: (lock: boolean) => void;
|
|
20
20
|
export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
|
|
21
21
|
export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
|
23
|
+
export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
|
|
23
24
|
export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
|
|
24
25
|
export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
26
|
+
export declare const getKeyToBooleanMapFromArray: <T extends string | number>(arr?: T[]) => Record<T, boolean>;
|
|
25
27
|
export {};
|
|
@@ -29,7 +29,6 @@ export declare const ModuleNameMap: {
|
|
|
29
29
|
};
|
|
30
30
|
export declare const DATE_TIME_FORMAT_STRING = "ddd DD MMM YYYY HH:mm:ss";
|
|
31
31
|
export declare const API_TOKEN_PREFIX = "API-TOKEN:";
|
|
32
|
-
export declare const DEFAULT_SECRET_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
33
32
|
export declare enum PatchOperationType {
|
|
34
33
|
replace = "replace",
|
|
35
34
|
remove = "remove"
|
|
@@ -44,3 +43,7 @@ export declare enum DeploymentWithConfigType {
|
|
|
44
43
|
LATEST_TRIGGER_CONFIG = "LATEST_TRIGGER_CONFIG",
|
|
45
44
|
SPECIFIC_TRIGGER_CONFIG = "SPECIFIC_TRIGGER_CONFIG"
|
|
46
45
|
}
|
|
46
|
+
export declare enum EnvironmentTypeEnum {
|
|
47
|
+
production = "Production",
|
|
48
|
+
nonProduction = "Non-Production"
|
|
49
|
+
}
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PatchOperationType } from './constants';
|
|
1
|
+
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
2
2
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType } from '../Common';
|
|
3
3
|
|
|
4
4
|
export declare enum RegistryType {
|
|
@@ -169,7 +169,8 @@ export declare enum ResourceKindType {
|
|
|
169
169
|
job = "job",
|
|
170
170
|
cluster = "cluster",
|
|
171
171
|
release = "release",
|
|
172
|
-
releaseTrack = "release-track"
|
|
172
|
+
releaseTrack = "release-track",
|
|
173
|
+
tenant = "tenant"
|
|
173
174
|
}
|
|
174
175
|
/**
|
|
175
176
|
* Versions support for the resources on BE
|
|
@@ -253,6 +254,10 @@ export declare enum Nodes {
|
|
|
253
254
|
Overview = "Overview"
|
|
254
255
|
}
|
|
255
256
|
export type NodeType = keyof typeof Nodes;
|
|
257
|
+
export interface InputFieldState<T = string> {
|
|
258
|
+
value: T;
|
|
259
|
+
error: string;
|
|
260
|
+
}
|
|
256
261
|
export declare enum AggregationKeys {
|
|
257
262
|
Workloads = "Workloads",
|
|
258
263
|
Networking = "Networking",
|
|
@@ -265,14 +270,25 @@ export declare enum AggregationKeys {
|
|
|
265
270
|
Namespaces = "Namespaces"
|
|
266
271
|
}
|
|
267
272
|
export type AggregationKeysType = keyof typeof AggregationKeys;
|
|
268
|
-
export
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
export interface EnvironmentType {
|
|
274
|
+
/**
|
|
275
|
+
* Unique identifier for the environment
|
|
276
|
+
*/
|
|
277
|
+
id: number;
|
|
278
|
+
/**
|
|
279
|
+
* Name of the environment
|
|
280
|
+
*/
|
|
281
|
+
name: string;
|
|
282
|
+
/**
|
|
283
|
+
* Associated namespace for the environment
|
|
284
|
+
*/
|
|
285
|
+
namespace: string;
|
|
286
|
+
/**
|
|
287
|
+
* Type of the environment
|
|
288
|
+
*/
|
|
289
|
+
environmentType: EnvironmentTypeEnum;
|
|
290
|
+
/**
|
|
291
|
+
* Associated cluster for the environment
|
|
292
|
+
*/
|
|
293
|
+
cluster: string;
|
|
277
294
|
}
|
|
278
|
-
export type GitOpsFieldKeyType = 'host' | 'username' | 'token' | 'gitHubOrgId' | 'azureProjectName' | 'gitLabGroupId' | 'bitBucketWorkspaceId' | 'bitBucketProjectKey' | 'sshHost' | 'sshKey';
|
|
@@ -8,6 +8,7 @@ export declare const MESSAGES: {
|
|
|
8
8
|
CAN_NOT_START_END_WITH_SEPARATORS: string;
|
|
9
9
|
getMinMaxCharMessage: (min: number, max: number) => string;
|
|
10
10
|
getMaxCharMessage: (max: number) => string;
|
|
11
|
+
getMinCharMessage: (min: number) => string;
|
|
11
12
|
VALID_POSITIVE_NUMBER: string;
|
|
12
13
|
VALID_POSITIVE_INTEGER: string;
|
|
13
14
|
MAX_SAFE_INTEGER: string;
|
|
@@ -15,5 +16,7 @@ export declare const MESSAGES: {
|
|
|
15
16
|
export declare const requiredField: (value: string) => ValidationResponseType;
|
|
16
17
|
export declare const validateName: (name: string) => ValidationResponseType;
|
|
17
18
|
export declare const validateDescription: (description: string) => ValidationResponseType;
|
|
19
|
+
export declare const validateStringLength: (value: string, maxLimit: number, minLimit: number) => ValidationResponseType;
|
|
18
20
|
export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;
|
|
19
21
|
export declare const validateRequiredPositiveInteger: (value: string | number) => ValidationResponseType;
|
|
22
|
+
export declare const validateURL: (url: string) => ValidationResponseType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Le = Object.defineProperty;
|
|
2
2
|
var je = (e, n, i) => n in e ? Le(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
|
|
3
3
|
var k = (e, n, i) => (je(e, typeof n != "symbol" ? n + "" : n, i), i);
|
|
4
|
-
import { m as Ne } from "./index-
|
|
4
|
+
import { m as Ne } from "./index-9a6545f4.js";
|
|
5
5
|
/*!-----------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as F } from "./index-
|
|
1
|
+
import { m as F } from "./index-9a6545f4.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as i } from "./index-
|
|
1
|
+
import { m as i } from "./index-9a6545f4.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as d } from "./index-
|
|
1
|
+
import { m as d } from "./index-9a6545f4.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var $e = Object.defineProperty;
|
|
2
2
|
var qe = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
|
|
3
3
|
var k = (e, n, i) => (qe(e, typeof n != "symbol" ? n + "" : n, i), i);
|
|
4
|
-
import { m as Qe } from "./index-
|
|
4
|
+
import { m as Qe } from "./index-9a6545f4.js";
|
|
5
5
|
/*!-----------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|