@devtron-labs/devtron-fe-common-lib 0.1.11-beta-3 → 0.1.12-beta-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/Common/CodeEditor/types.d.ts +0 -1
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/Helper.d.ts +4 -0
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +1 -1
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +2 -1
- package/dist/Common/RJSF/types.d.ts +12 -0
- package/dist/Common/RJSF/utils.d.ts +2 -2
- package/dist/Common/Tippy.d.ts +4 -0
- package/dist/Common/Types.d.ts +1 -1
- package/dist/Common/index.d.ts +1 -0
- package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +1 -1
- package/dist/Shared/Components/ButtonWithSelector/types.d.ts +1 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/index.d.ts +1 -0
- package/dist/Shared/Components/CICDHistory/types.d.ts +1 -0
- package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/types.d.ts +7 -2
- package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
- package/dist/Shared/Components/FilterChips/types.d.ts +6 -18
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +3 -1
- package/dist/Shared/Hooks/index.d.ts +0 -1
- package/dist/Shared/Services/common.service.d.ts +2 -3
- package/dist/Shared/Services/types.d.ts +4 -15
- package/dist/Shared/constants.d.ts +1 -0
- package/dist/Shared/types.d.ts +7 -7
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-c3b49a22.js → cssMode-63ee5358.js} +1 -1
- package/dist/{freemarker2-a23b547d.js → freemarker2-270b95d1.js} +1 -1
- package/dist/{handlebars-3ab70804.js → handlebars-d48fa28f.js} +1 -1
- package/dist/{html-173d6f4b.js → html-a5839603.js} +1 -1
- package/dist/{htmlMode-cd5b4e94.js → htmlMode-2c8872e7.js} +1 -1
- package/dist/{index-08e72af8.js → index-aab09e8b.js} +31376 -29333
- package/dist/index.js +318 -316
- package/dist/{javascript-7dfc1aae.js → javascript-ec66b63b.js} +1 -1
- package/dist/{jsonMode-e4e3bb06.js → jsonMode-0465a589.js} +1 -1
- package/dist/{liquid-35bd99b6.js → liquid-1b48c005.js} +1 -1
- package/dist/{mdx-20526694.js → mdx-fd2622c8.js} +1 -1
- package/dist/{python-1ffe9348.js → python-2625b208.js} +1 -1
- package/dist/{razor-00e603a8.js → razor-b5f0adc9.js} +1 -1
- package/dist/{tsMode-83f263b7.js → tsMode-7ba7207b.js} +1 -1
- package/dist/{typescript-c9eff357.js → typescript-8d8017c6.js} +1 -1
- package/dist/{xml-2b6d8024.js → xml-1cc09e91.js} +1 -1
- package/dist/{yaml-3c4eb3e1.js → yaml-1185d077.js} +1 -1
- package/package.json +2 -1
- package/dist/Shared/Hooks/useGetResourceKindsOptions/index.d.ts +0 -2
- package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +0 -9
- package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +0 -31
- package/dist/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.d.ts +0 -16
- package/dist/Shared/Hooks/useGetResourceKindsOptions/utils.d.ts +0 -4
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React, SyntheticEvent } from 'react';
|
|
2
|
+
import { JSONPathOptions } from 'jsonpath-plus';
|
|
2
3
|
import { AsyncOptions, UseSearchString } from './Types';
|
|
3
4
|
import { scrollableInterface } from '../Shared';
|
|
4
5
|
|
|
@@ -94,6 +95,9 @@ export declare const getRegexMatchPositions: (string: string, regex: RegExp) =>
|
|
|
94
95
|
* @returns set of substrings
|
|
95
96
|
*/
|
|
96
97
|
export declare const powerSetOfSubstringsFromStart: (strings: string[], regex: RegExp) => string[];
|
|
98
|
+
export declare const convertJSONPointerToJSONPath: (pointer: string) => string;
|
|
99
|
+
export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultType?: JSONPathOptions['resultType']) => string[];
|
|
100
|
+
export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => object;
|
|
97
101
|
/**
|
|
98
102
|
* Returns a debounced variant of the function
|
|
99
103
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ArrayFieldTemplateItemType } from '@rjsf/utils';
|
|
2
2
|
|
|
3
|
-
export declare const ArrayFieldItemTemplate: ({ children,
|
|
3
|
+
export declare const ArrayFieldItemTemplate: ({ children, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ObjectFieldTemplateProps } from '@rjsf/utils';
|
|
2
|
+
import { RJSFFormSchema } from '../types';
|
|
2
3
|
|
|
3
|
-
export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
|
|
4
|
+
export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps<any, RJSFFormSchema, any>) => JSX.Element;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { default as RJSFForm } from '@rjsf/core';
|
|
3
|
+
import { StrictRJSFSchema } from '@rjsf/utils';
|
|
3
4
|
|
|
4
5
|
export type FormProps = Omit<ComponentProps<typeof RJSFForm>, 'validator'>;
|
|
6
|
+
interface Hidden {
|
|
7
|
+
condition: boolean;
|
|
8
|
+
match: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RJSFFormSchema extends StrictRJSFSchema {
|
|
11
|
+
properties: {
|
|
12
|
+
[key: string]: RJSFFormSchema;
|
|
13
|
+
};
|
|
14
|
+
hidden: Hidden;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranslatableString } from '@rjsf/utils';
|
|
2
|
-
import { default as Tippy } from '
|
|
2
|
+
import { default as Tippy } from '../Tippy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Override for the TranslatableString from RJSF
|
|
@@ -25,4 +25,4 @@ export declare const getRedirectionProps: (url: string) => import('react').Ancho
|
|
|
25
25
|
* Infers the type for json schema from value type
|
|
26
26
|
*/
|
|
27
27
|
export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
|
|
28
|
-
export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement']) => (children: any) => JSX.Element;
|
|
28
|
+
export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement'], truncateWidth?: number) => (children: any) => JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
package/dist/Common/index.d.ts
CHANGED
|
@@ -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, disabled, }: ButtonWithSelectorProps) => JSX.Element;
|
|
17
|
+
declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, disabled, isLoading, }: ButtonWithSelectorProps) => JSX.Element;
|
|
18
18
|
export default ButtonWithSelector;
|
package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DeploymentTemplateHistoryType } from '../types';
|
|
2
2
|
|
|
3
|
-
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
|
|
3
|
+
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, comparisonBodyClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
|
|
4
4
|
export default DeploymentHistoryDiffView;
|
|
@@ -5,6 +5,7 @@ export { default as CDEmptyState } from './CDEmptyState';
|
|
|
5
5
|
export { default as DeploymentStatusDetailBreakdown } from './DeploymentStatusBreakdown';
|
|
6
6
|
export { default as AppStatusDetailsChart } from './AppStatusDetailsChart';
|
|
7
7
|
export { default as DeploymentDetailSteps } from './DeploymentDetailSteps';
|
|
8
|
+
export { default as DetectBottom } from './DetectBottom';
|
|
8
9
|
export * from './types';
|
|
9
10
|
export * from './service';
|
|
10
11
|
export * from './History.components';
|
|
@@ -368,6 +368,7 @@ export interface DeploymentTemplateHistoryType {
|
|
|
368
368
|
isUnpublished?: boolean;
|
|
369
369
|
isDeleteDraft?: boolean;
|
|
370
370
|
rootClassName?: string;
|
|
371
|
+
comparisonBodyClassName?: string;
|
|
371
372
|
}
|
|
372
373
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
|
373
374
|
result?: DeploymentHistoryDetail;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DescriptorProps } from './types';
|
|
2
2
|
|
|
3
|
-
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, }: DescriptorProps) => JSX.Element;
|
|
3
|
+
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, }: DescriptorProps) => JSX.Element;
|
|
4
4
|
export default FeatureTitleWithInfo;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
1
2
|
import { ImageType } from '../../../Common';
|
|
2
3
|
import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
|
|
3
4
|
|
|
4
5
|
export interface FeatureDescriptionModalProps {
|
|
5
6
|
title: string;
|
|
6
|
-
renderDescriptionContent?: () =>
|
|
7
|
+
renderDescriptionContent?: () => ReactNode;
|
|
7
8
|
closeModalText?: string;
|
|
8
9
|
docLink?: string;
|
|
9
10
|
closeModal?: () => void;
|
|
@@ -12,8 +13,12 @@ export interface FeatureDescriptionModalProps {
|
|
|
12
13
|
imageStyles?: React.CSSProperties;
|
|
13
14
|
}
|
|
14
15
|
export interface DescriptorProps extends FeatureDescriptionModalProps {
|
|
15
|
-
breadCrumbs
|
|
16
|
+
breadCrumbs?: Breadcrumb[];
|
|
16
17
|
additionalContainerClasses?: string;
|
|
17
18
|
iconClassName?: string;
|
|
18
19
|
children?: React.ReactNode;
|
|
20
|
+
showInfoIconTippy?: boolean;
|
|
21
|
+
docLinkText?: string;
|
|
22
|
+
dataTestId?: string;
|
|
23
|
+
additionalContent?: ReactNode;
|
|
19
24
|
}
|
|
@@ -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: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName,
|
|
6
|
+
declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, }: FilterChipsProps<T>) => JSX.Element;
|
|
7
7
|
export default FilterChips;
|
|
@@ -21,28 +21,12 @@ export interface FilterChipProps {
|
|
|
21
21
|
* If passed, the label will be formatted accordingly
|
|
22
22
|
*/
|
|
23
23
|
getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
|
|
24
|
-
showRemoveIcon: boolean;
|
|
25
24
|
}
|
|
26
|
-
export
|
|
25
|
+
export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
|
|
27
26
|
/**
|
|
28
27
|
* Current filter configuration
|
|
29
28
|
*/
|
|
30
29
|
filterConfig: T;
|
|
31
|
-
/**
|
|
32
|
-
* Class name for the container
|
|
33
|
-
*/
|
|
34
|
-
className?: string;
|
|
35
|
-
} & ({
|
|
36
|
-
/**
|
|
37
|
-
* If false, anything related to removing filters is not shown
|
|
38
|
-
* @default 'true'
|
|
39
|
-
*/
|
|
40
|
-
showClearAndRemove: false;
|
|
41
|
-
clearFilters?: never;
|
|
42
|
-
onRemoveFilter?: never;
|
|
43
|
-
clearButtonClassName?: never;
|
|
44
|
-
} | {
|
|
45
|
-
showClearAndRemove?: true;
|
|
46
30
|
/**
|
|
47
31
|
* Callback handler for removing the filters
|
|
48
32
|
*/
|
|
@@ -51,8 +35,12 @@ export type FilterChipsProps<T = Record<string, unknown>> = Pick<FilterChipProps
|
|
|
51
35
|
* Handler for removing a applied filter
|
|
52
36
|
*/
|
|
53
37
|
onRemoveFilter: (filterConfig: T) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Class name for the container
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
54
42
|
/**
|
|
55
43
|
* Class name for the clear filter button
|
|
56
44
|
*/
|
|
57
45
|
clearButtonClassName?: string;
|
|
58
|
-
}
|
|
46
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { KeyValueTableProps } from './KeyValueTable.types';
|
|
2
2
|
|
|
3
|
-
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
|
|
3
|
+
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, }: KeyValueTableProps<K>) => JSX.Element;
|
|
@@ -60,8 +60,10 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
60
60
|
isSortable?: boolean;
|
|
61
61
|
/** An optional React node for a custom header component. */
|
|
62
62
|
headerComponent?: ReactNode;
|
|
63
|
-
/** When true, data addition field will not be shown */
|
|
63
|
+
/** When true, data addition field will not be shown. */
|
|
64
64
|
isAdditionNotAllowed?: boolean;
|
|
65
|
+
/** When true, data add or update is disabled. */
|
|
66
|
+
readOnly?: boolean;
|
|
65
67
|
/**
|
|
66
68
|
* An optional function to handle changes in the table rows.
|
|
67
69
|
* @param rowId - The id of the row that changed.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetResourceApiUrlProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const getResourceApiUrl: <T>({ baseUrl, kind, version,
|
|
4
|
-
export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
|
|
3
|
+
export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, queryParams }: GetResourceApiUrlProps<T>) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUrlWithSearchParams } from '../../Common';
|
|
2
|
-
import {
|
|
2
|
+
import { ResourceKindType, ResourceVersionType } from '../types';
|
|
3
3
|
|
|
4
4
|
export interface ClusterType {
|
|
5
5
|
id: number;
|
|
@@ -9,20 +9,9 @@ export interface ClusterType {
|
|
|
9
9
|
*/
|
|
10
10
|
isVirtual: boolean;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
* T => Type of query params
|
|
14
|
-
* K => Type of kind
|
|
15
|
-
* P => Type of version
|
|
16
|
-
*/
|
|
17
|
-
interface BaseGetApiUrlProps<T, K extends ResourceKindType | PolicyKindType, P extends ResourceVersionType> {
|
|
12
|
+
export interface GetResourceApiUrlProps<T> {
|
|
18
13
|
baseUrl: string;
|
|
19
|
-
kind:
|
|
20
|
-
version:
|
|
21
|
-
suffix?: string;
|
|
14
|
+
kind: ResourceKindType;
|
|
15
|
+
version: ResourceVersionType;
|
|
22
16
|
queryParams?: T extends Parameters<typeof getUrlWithSearchParams>[1] ? T : never;
|
|
23
17
|
}
|
|
24
|
-
export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, ResourceKindType, ResourceVersionType> {
|
|
25
|
-
}
|
|
26
|
-
export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -31,6 +31,7 @@ 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
32
|
export declare const DEFAULT_SECRET_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
33
33
|
export declare enum PatchOperationType {
|
|
34
|
+
add = "add",
|
|
34
35
|
replace = "replace",
|
|
35
36
|
remove = "remove"
|
|
36
37
|
}
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -336,6 +336,12 @@ export type PatchQueryType<T extends string, K = unknown> = {
|
|
|
336
336
|
*/
|
|
337
337
|
op: PatchOperationType.remove;
|
|
338
338
|
value?: never;
|
|
339
|
+
} | {
|
|
340
|
+
/**
|
|
341
|
+
* Operation type for add
|
|
342
|
+
*/
|
|
343
|
+
op: PatchOperationType.add;
|
|
344
|
+
value?: K;
|
|
339
345
|
});
|
|
340
346
|
export interface GroupedOptionsType {
|
|
341
347
|
label: string;
|
|
@@ -354,21 +360,15 @@ export declare enum ResourceKindType {
|
|
|
354
360
|
tenant = "tenant",
|
|
355
361
|
installation = "installation",
|
|
356
362
|
environment = "environment",
|
|
357
|
-
cdPipeline = "cd-pipeline"
|
|
358
|
-
project = "project"
|
|
363
|
+
cdPipeline = "cd-pipeline"
|
|
359
364
|
}
|
|
360
365
|
/**
|
|
361
366
|
* Versions support for the resources on BE
|
|
362
|
-
*
|
|
363
|
-
* TODO: Rename to ApiVersionType
|
|
364
367
|
*/
|
|
365
368
|
export declare enum ResourceVersionType {
|
|
366
369
|
v1 = "v1",
|
|
367
370
|
alpha1 = "alpha1"
|
|
368
371
|
}
|
|
369
|
-
export declare enum PolicyKindType {
|
|
370
|
-
lockConfiguration = "lock-configuration"
|
|
371
|
-
}
|
|
372
372
|
export interface LastExecutionResultType {
|
|
373
373
|
lastExecution: string;
|
|
374
374
|
severityCount: {
|