@devtron-labs/devtron-fe-common-lib 1.7.1 → 1.7.2-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/{@code-editor-tea3spVD.js → @code-editor-B63wjusN.js} +3845 -3758
- package/dist/{@common-rjsf-CaHc69mf.js → @common-rjsf-DnWwXM4S.js} +1 -1
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/InfoColorBar/InfoColourbar.d.ts +3 -0
- package/dist/Common/Types.d.ts +2 -2
- package/dist/Pages/GlobalConfigurations/DeploymentCharts/types.d.ts +6 -8
- package/dist/Shared/Components/FormFieldWrapper/types.d.ts +3 -27
- package/dist/Shared/Components/FormFieldWrapper/utils.d.ts +1 -2
- package/dist/Shared/Components/InfoBlock/InfoBlock.component.d.ts +3 -0
- package/dist/Shared/Components/InfoBlock/constants.d.ts +5 -0
- package/dist/Shared/Components/InfoBlock/index.d.ts +2 -0
- package/dist/Shared/Components/InfoBlock/types.d.ts +40 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +3 -1
- package/dist/Shared/types.d.ts +31 -0
- package/dist/Shared/validations.d.ts +1 -0
- package/dist/index.js +520 -516
- package/package.json +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as t, J as P } from "./@vendor-C6rSXA7p.js";
|
2
2
|
import R, { forwardRef as $ } from "react";
|
3
3
|
import L, { getDefaultRegistry as D } from "@rjsf/core";
|
4
|
-
import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-
|
4
|
+
import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-B63wjusN.js";
|
5
5
|
import M, { components as A } from "react-select";
|
6
6
|
import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
7
7
|
import { getUiOptions as C, getTemplate as B, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as I, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
|
@@ -55,6 +55,7 @@ export declare const URLS: {
|
|
55
55
|
DEPLOYMENT_HISTORY_CONFIGURATIONS: string;
|
56
56
|
GLOBAL_CONFIG_SCOPED_VARIABLES: string;
|
57
57
|
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
|
58
|
+
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_UPLOAD_CHART: string;
|
58
59
|
NETWORK_STATUS_INTERFACE: string;
|
59
60
|
RESOURCE_BROWSER: string;
|
60
61
|
COMPARE_CLUSTERS: string;
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { InfoColourBarType } from '../Types';
|
2
|
+
/**
|
3
|
+
* @deprecated Use InfoBlock instead
|
4
|
+
*/
|
2
5
|
declare const InfoColourBar: ({ message, classname, Icon, iconClass, iconSize, renderActionButton, linkText, redirectLink, linkOnClick, linkClass, internalLink, styles, hideIcon, textConfig, }: InfoColourBarType) => JSX.Element;
|
3
6
|
export default InfoColourBar;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
3
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
4
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
5
|
-
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO } from '../Shared';
|
5
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ComponentLayoutType } from '../Shared';
|
6
6
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
|
7
7
|
/**
|
8
8
|
* Generic response type object with support for overriding the result type
|
@@ -118,7 +118,7 @@ export interface GenericEmptyStateType {
|
|
118
118
|
/**
|
119
119
|
* @default 'column'
|
120
120
|
*/
|
121
|
-
layout?:
|
121
|
+
layout?: ComponentLayoutType;
|
122
122
|
contentClassName?: string;
|
123
123
|
}
|
124
124
|
export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload' | 'redirectURL'> {
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
1
|
+
interface DeploymentChartInfo {
|
2
2
|
id: number;
|
3
3
|
chartDescription?: string;
|
4
4
|
isUserUploaded: boolean;
|
5
5
|
name: string;
|
6
6
|
version: string;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
uploadedBy: string;
|
8
|
+
}
|
9
|
+
export type DeploymentChartListDTO = DeploymentChartInfo[];
|
10
|
+
export interface DeploymentChartVersionsType extends Pick<DeploymentChartInfo, 'id' | 'version' | 'uploadedBy' | 'isUserUploaded'> {
|
11
11
|
description: string;
|
12
12
|
}
|
13
|
-
export interface DeploymentChartType {
|
14
|
-
name: string;
|
15
|
-
isUserUploaded: boolean;
|
13
|
+
export interface DeploymentChartType extends Pick<DeploymentChartInfo, 'name'> {
|
16
14
|
versions: DeploymentChartVersionsType[];
|
17
15
|
}
|
18
16
|
export declare enum DEVTRON_DEPLOYMENT_CHART_NAMES {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
2
|
+
import { BorderConfigType, ComponentLayoutType } from '../../types';
|
2
3
|
export type LabelOrAriaLabelType = {
|
3
4
|
label: ReactNode;
|
4
5
|
ariaLabel?: never;
|
@@ -18,7 +19,7 @@ export type FormFieldLabelProps = LabelOrAriaLabelType & {
|
|
18
19
|
/**
|
19
20
|
* Layout of the field
|
20
21
|
*/
|
21
|
-
layout?:
|
22
|
+
layout?: ComponentLayoutType;
|
22
23
|
};
|
23
24
|
export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
|
24
25
|
/**
|
@@ -46,30 +47,5 @@ export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label'
|
|
46
47
|
*/
|
47
48
|
fullWidth?: boolean;
|
48
49
|
children: ReactElement;
|
49
|
-
borderRadiusConfig?:
|
50
|
-
/**
|
51
|
-
* If false, the top border radius is not applied
|
52
|
-
*
|
53
|
-
* @default true
|
54
|
-
*/
|
55
|
-
top?: boolean;
|
56
|
-
/**
|
57
|
-
* If false, the right border radius is not applied
|
58
|
-
*
|
59
|
-
* @default true
|
60
|
-
*/
|
61
|
-
right?: boolean;
|
62
|
-
/**
|
63
|
-
* If false, the bottom border radius is not applied
|
64
|
-
*
|
65
|
-
* @default true
|
66
|
-
*/
|
67
|
-
bottom?: boolean;
|
68
|
-
/**
|
69
|
-
* If false, the left border radius is not applied
|
70
|
-
*
|
71
|
-
* @default true
|
72
|
-
*/
|
73
|
-
left?: boolean;
|
74
|
-
};
|
50
|
+
borderRadiusConfig?: BorderConfigType;
|
75
51
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { FormFieldInfoProps, FormFieldLabelProps
|
1
|
+
import { FormFieldInfoProps, FormFieldLabelProps } from './types';
|
2
2
|
export declare const getFormErrorElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
|
3
3
|
export declare const getFormLabelElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
|
4
4
|
export declare const getFormHelperTextElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
|
@@ -15,4 +15,3 @@ export declare const getFormFieldAriaAttributes: ({ inputId, label, ariaLabel, r
|
|
15
15
|
'aria-describedby'?: string;
|
16
16
|
'aria-required': boolean;
|
17
17
|
};
|
18
|
-
export declare const getFormFieldBorderClassName: (borderRadiusConfig?: FormFieldWrapperProps["borderRadiusConfig"]) => string;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { InfoBlockProps } from './types';
|
2
|
+
export declare const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string>;
|
3
|
+
export declare const VARIANT_TO_ICON_MAP: Record<InfoBlockProps['variant'], InfoBlockProps['customIcon']>;
|
4
|
+
export declare const CONTAINER_SIZE_TO_CLASS_MAP: Record<InfoBlockProps['size'], string>;
|
5
|
+
export declare const SIZE_TO_ICON_CLASS_MAP: Record<InfoBlockProps['size'], string>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { ComponentSizeType } from '../../constants';
|
2
|
+
import { BorderConfigType, ComponentLayoutType } from '../../types';
|
3
|
+
import { ReactElement, ReactNode } from 'react';
|
4
|
+
import { ButtonProps } from '../Button';
|
5
|
+
export type InfoBlockProps = {
|
6
|
+
/**
|
7
|
+
* @default 'row'
|
8
|
+
*/
|
9
|
+
layout?: ComponentLayoutType;
|
10
|
+
/**
|
11
|
+
* @default 'information'
|
12
|
+
*/
|
13
|
+
variant?: 'error' | 'help' | 'information' | 'success' | 'warning';
|
14
|
+
/**
|
15
|
+
* @default ComponentSizeType.large
|
16
|
+
*/
|
17
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.large | ComponentSizeType.medium>;
|
18
|
+
/**
|
19
|
+
* If given would override the default icon derived from type
|
20
|
+
*/
|
21
|
+
customIcon?: ReactElement;
|
22
|
+
buttonProps?: ButtonProps;
|
23
|
+
borderConfig?: BorderConfigType;
|
24
|
+
borderRadiusConfig?: BorderConfigType;
|
25
|
+
} & ({
|
26
|
+
/**
|
27
|
+
* If string, would apply h tag with necessary classes
|
28
|
+
*/
|
29
|
+
heading: ReactNode;
|
30
|
+
/**
|
31
|
+
* If string, would apply p tag with necessary classes
|
32
|
+
*/
|
33
|
+
description: ReactNode;
|
34
|
+
} | {
|
35
|
+
heading?: never;
|
36
|
+
description: ReactNode;
|
37
|
+
} | {
|
38
|
+
heading: ReactNode;
|
39
|
+
description?: never;
|
40
|
+
});
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { Pair } from 'yaml';
|
|
4
4
|
import { StrictRJSFSchema } from '@rjsf/utils';
|
5
5
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
6
6
|
import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
|
7
|
-
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
7
|
+
import { BorderConfigType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
8
8
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
9
9
|
interface HighlightSearchTextProps {
|
10
10
|
/**
|
@@ -95,4 +95,6 @@ export declare const checkIfPathIsMatching: (currentPathName: string, customMess
|
|
95
95
|
export declare const sanitizeTargetPlatforms: (targetPlatforms: TargetPlatformsDTO["targetPlatforms"]) => TargetPlatformItemDTO[];
|
96
96
|
export declare const isAWSCodeCommitURL: (url?: string) => boolean;
|
97
97
|
export declare const renderMaterialIcon: (url?: string) => JSX.Element;
|
98
|
+
export declare const deriveBorderRadiusClassFromConfig: (borderRadiusConfig?: BorderConfigType) => string;
|
99
|
+
export declare const deriveBorderClassFromConfig: (borderConfig?: BorderConfigType) => string;
|
98
100
|
export {};
|
package/dist/Shared/types.d.ts
CHANGED
@@ -824,4 +824,35 @@ export declare const TriggerType: {
|
|
824
824
|
readonly Auto: "AUTOMATIC";
|
825
825
|
readonly Manual: "MANUAL";
|
826
826
|
};
|
827
|
+
export type ComponentLayoutType = 'row' | 'column';
|
828
|
+
export interface BorderConfigType {
|
829
|
+
/**
|
830
|
+
* If false, (border-radius/border)-top is not applied
|
831
|
+
*
|
832
|
+
* @default true
|
833
|
+
*/
|
834
|
+
top?: boolean;
|
835
|
+
/**
|
836
|
+
* If false, (border-radius/border)-right is not applied
|
837
|
+
*
|
838
|
+
* @default true
|
839
|
+
*/
|
840
|
+
right?: boolean;
|
841
|
+
/**
|
842
|
+
* If false, (border-radius/border)-bottom is not applied
|
843
|
+
*
|
844
|
+
* @default true
|
845
|
+
*/
|
846
|
+
bottom?: boolean;
|
847
|
+
/**
|
848
|
+
* If false, (border-radius/border)-left is not applied
|
849
|
+
*
|
850
|
+
* @default true
|
851
|
+
*/
|
852
|
+
left?: boolean;
|
853
|
+
}
|
854
|
+
export interface AppEnvIdType {
|
855
|
+
appId: number;
|
856
|
+
envId: number;
|
857
|
+
}
|
827
858
|
export {};
|