@devtron-labs/devtron-fe-common-lib 0.2.2-beta-16 → 0.2.2-beta-18
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 +2 -21
- package/dist/Common/Common.service.d.ts +6 -0
- package/dist/Common/Tooltip/types.d.ts +14 -4
- package/dist/Common/Types.d.ts +2 -2
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +47 -3
- package/dist/Shared/Components/KeyValueTable/constants.d.ts +2 -0
- package/dist/Shared/constants.d.ts +4 -0
- package/dist/Shared/types.d.ts +12 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-cc05e42c.js → cssMode-f6fa999d.js} +1 -1
- package/dist/{freemarker2-f038f34b.js → freemarker2-3203ec71.js} +1 -1
- package/dist/{handlebars-d17aff7a.js → handlebars-eadd4a6d.js} +1 -1
- package/dist/{html-abdc7632.js → html-67a5c0bb.js} +1 -1
- package/dist/{htmlMode-241ea80b.js → htmlMode-8f976129.js} +1 -1
- package/dist/{index-3b90d008.js → index-39461e67.js} +21853 -21686
- package/dist/index.js +449 -445
- package/dist/{javascript-3b51ab44.js → javascript-a9273fd9.js} +1 -1
- package/dist/{jsonMode-6def590c.js → jsonMode-126fbf89.js} +1 -1
- package/dist/{liquid-780f4ccf.js → liquid-c25ab708.js} +1 -1
- package/dist/{mdx-d24ff632.js → mdx-f6c6e820.js} +1 -1
- package/dist/{python-ff494aef.js → python-7669ec41.js} +1 -1
- package/dist/{razor-b8dd0e97.js → razor-42f2a5ac.js} +1 -1
- package/dist/{tsMode-5243b163.js → tsMode-a8fecce9.js} +1 -1
- package/dist/{typescript-f8b182ca.js → typescript-67a132cc.js} +1 -1
- package/dist/{xml-e016fbb8.js → xml-3ff482a1.js} +1 -1
- package/dist/{yaml-1cf2e58c.js → yaml-da2b5f23.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { XORProps } from '../Types';
|
|
2
1
|
import { MODES } from '../Constants';
|
|
3
2
|
|
|
4
3
|
export interface InformationBarProps {
|
|
@@ -6,7 +5,7 @@ export interface InformationBarProps {
|
|
|
6
5
|
className?: string;
|
|
7
6
|
children?: React.ReactNode;
|
|
8
7
|
}
|
|
9
|
-
interface
|
|
8
|
+
export interface CodeEditorInterface {
|
|
10
9
|
value?: string;
|
|
11
10
|
lineDecorationsWidth?: number;
|
|
12
11
|
responseType?: string;
|
|
@@ -20,6 +19,7 @@ interface CodeEditorBaseInterface {
|
|
|
20
19
|
readOnly?: boolean;
|
|
21
20
|
noParsing?: boolean;
|
|
22
21
|
inline?: boolean;
|
|
22
|
+
height?: number | string;
|
|
23
23
|
shebang?: string | JSX.Element;
|
|
24
24
|
diffView?: boolean;
|
|
25
25
|
loading?: boolean;
|
|
@@ -31,25 +31,7 @@ interface CodeEditorBaseInterface {
|
|
|
31
31
|
isKubernetes?: boolean;
|
|
32
32
|
cleanData?: boolean;
|
|
33
33
|
chartVersion?: any;
|
|
34
|
-
/**
|
|
35
|
-
* Defines the minHeight of MonacoEditor in pixels or relative units
|
|
36
|
-
* @default 300
|
|
37
|
-
*/
|
|
38
|
-
minHeight?: number | string;
|
|
39
34
|
}
|
|
40
|
-
interface CodeEditorXORProps {
|
|
41
|
-
/**
|
|
42
|
-
* Defines the height of MonacoEditor in pixels or relative units
|
|
43
|
-
* @default 300
|
|
44
|
-
*/
|
|
45
|
-
height: number | string;
|
|
46
|
-
/**
|
|
47
|
-
* If adjustEditorHeightToContent is true the Editor grows and shrinks by its content's height
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
adjustEditorHeightToContent: boolean;
|
|
51
|
-
}
|
|
52
|
-
export type CodeEditorInterface = CodeEditorBaseInterface & XORProps<'height', 'adjustEditorHeightToContent', CodeEditorXORProps>;
|
|
53
35
|
export interface CodeEditorHeaderInterface {
|
|
54
36
|
children?: any;
|
|
55
37
|
className?: string;
|
|
@@ -102,4 +84,3 @@ export declare enum CodeEditorActionTypes {
|
|
|
102
84
|
overrideLoading = "overrideLoading",
|
|
103
85
|
success = "success"
|
|
104
86
|
}
|
|
105
|
-
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RuntimeParamsAPIResponseType } from '../Shared/types';
|
|
1
2
|
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
|
2
3
|
import { ApiResourceType } from '../Pages';
|
|
3
4
|
|
|
@@ -15,6 +16,11 @@ export declare const SourceTypeMap: {
|
|
|
15
16
|
};
|
|
16
17
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
17
18
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
|
19
|
+
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => {
|
|
20
|
+
key: string;
|
|
21
|
+
value: string;
|
|
22
|
+
id: number;
|
|
23
|
+
}[];
|
|
18
24
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
19
25
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
20
26
|
export declare function extractImage(image: string): string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { XORProps } from '../Types';
|
|
2
1
|
import { TippyProps } from '@tippyjs/react';
|
|
3
2
|
|
|
4
3
|
type BaseTooltipProps = {
|
|
@@ -6,14 +5,25 @@ type BaseTooltipProps = {
|
|
|
6
5
|
* If true, show tippy on truncate
|
|
7
6
|
* @default true
|
|
8
7
|
*/
|
|
9
|
-
showOnTruncate
|
|
8
|
+
showOnTruncate?: boolean;
|
|
10
9
|
/**
|
|
11
10
|
* If showOnTruncate is defined this prop doesn't work
|
|
12
11
|
* @default false
|
|
13
12
|
*/
|
|
14
|
-
alwaysShowTippyOnHover
|
|
13
|
+
alwaysShowTippyOnHover?: never;
|
|
14
|
+
} | {
|
|
15
|
+
/**
|
|
16
|
+
* If alwaysShowTippyOnHover is defined this prop doesn't work
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
showOnTruncate?: never;
|
|
20
|
+
/**
|
|
21
|
+
* If true, wrap with tippy irrespective of other options
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
alwaysShowTippyOnHover?: boolean;
|
|
15
25
|
};
|
|
16
|
-
export type TooltipProps =
|
|
26
|
+
export type TooltipProps = BaseTooltipProps & TippyProps & {
|
|
17
27
|
/**
|
|
18
28
|
* If true, apply dc__word-break-all
|
|
19
29
|
* @default true
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties } from 'react';
|
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
3
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
4
4
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
5
|
-
import { RegistryType } from '../Shared';
|
|
5
|
+
import { RegistryType, RuntimeParamsListItemType } from '../Shared';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Generic response type object with support for overriding the result type
|
|
@@ -546,6 +546,7 @@ export interface CDMaterialsMetaInfo {
|
|
|
546
546
|
* This is the ID of user that has request the material
|
|
547
547
|
*/
|
|
548
548
|
requestedUserId: number;
|
|
549
|
+
runtimeParams: RuntimeParamsListItemType[];
|
|
549
550
|
}
|
|
550
551
|
export interface ImagePromotionMaterialInfo {
|
|
551
552
|
isApprovalPendingForPromotion: boolean;
|
|
@@ -816,5 +817,4 @@ export interface EnvironmentHelmResult {
|
|
|
816
817
|
allowedDeploymentTypes?: DeploymentAppTypes[];
|
|
817
818
|
}
|
|
818
819
|
export type EnvironmentListHelmResponse = ResponseType<EnvironmentListHelmResult[]>;
|
|
819
|
-
export type XORProps<P extends string, S extends string, T extends Record<P | S, any>> = (Partial<Record<P, never>> & Partial<Record<S, T[S]>>) | (Partial<Record<P, T[P]>> & Partial<Record<S, never>>);
|
|
820
820
|
export {};
|
|
@@ -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, showError, validationSchema: parentValidationSchema, errorMessages: parentErrorMessages, onError, validateDuplicateKeys, validateEmptyKeys, }: KeyValueTableProps<K>) => JSX.Element;
|
|
@@ -36,6 +36,29 @@ export interface KeyValueConfig<K extends string> {
|
|
|
36
36
|
/** An array of key-value rows. */
|
|
37
37
|
rows: KeyValueRow<K>[];
|
|
38
38
|
}
|
|
39
|
+
type ErrorUIProps = {
|
|
40
|
+
/**
|
|
41
|
+
* Indicates whether to show errors.
|
|
42
|
+
*/
|
|
43
|
+
showError: true;
|
|
44
|
+
/**
|
|
45
|
+
* @default - false
|
|
46
|
+
* If true, would validate for duplicate keys and if present would show error tooltip on the cell.
|
|
47
|
+
*/
|
|
48
|
+
validateDuplicateKeys?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* @default - false
|
|
51
|
+
* If true, would validate for rows having values but no key and if error would show error tooltip on the cell.
|
|
52
|
+
*/
|
|
53
|
+
validateEmptyKeys?: boolean;
|
|
54
|
+
} | {
|
|
55
|
+
/**
|
|
56
|
+
* Indicates whether to show errors.
|
|
57
|
+
*/
|
|
58
|
+
showError?: false;
|
|
59
|
+
validateDuplicateKeys?: never;
|
|
60
|
+
validateEmptyKeys?: never;
|
|
61
|
+
};
|
|
39
62
|
/**
|
|
40
63
|
* Type representing a mask for key-value pairs.
|
|
41
64
|
* @template K - A string representing the key type.
|
|
@@ -50,7 +73,7 @@ export type KeyValuePlaceholder<K extends string> = {
|
|
|
50
73
|
* Interface representing the properties for a key-value table component.
|
|
51
74
|
* @template K - A string representing the key type.
|
|
52
75
|
*/
|
|
53
|
-
export
|
|
76
|
+
export type KeyValueTableProps<K extends string> = {
|
|
54
77
|
/** The configuration for the key-value table. */
|
|
55
78
|
config: KeyValueConfig<K>;
|
|
56
79
|
/** An optional mask for the key-value pairs. */
|
|
@@ -60,8 +83,10 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
60
83
|
isSortable?: boolean;
|
|
61
84
|
/** An optional React node for a custom header component. */
|
|
62
85
|
headerComponent?: ReactNode;
|
|
63
|
-
/** When true, data addition field will not be shown */
|
|
86
|
+
/** When true, data addition field will not be shown. */
|
|
64
87
|
isAdditionNotAllowed?: boolean;
|
|
88
|
+
/** When true, data add or update is disabled. */
|
|
89
|
+
readOnly?: boolean;
|
|
65
90
|
/**
|
|
66
91
|
* An optional function to handle changes in the table rows.
|
|
67
92
|
* @param rowId - The id of the row that changed.
|
|
@@ -74,4 +99,23 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
74
99
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
75
100
|
*/
|
|
76
101
|
onDelete?: (deletedRowId: string | number) => void;
|
|
77
|
-
|
|
102
|
+
/**
|
|
103
|
+
* The function to use to validate the value of the cell.
|
|
104
|
+
* @param value - The value to validate.
|
|
105
|
+
* @param key - The row key of the value.
|
|
106
|
+
* @param rowId - The id of the row.
|
|
107
|
+
* @returns Return true if the value is valid, otherwise false
|
|
108
|
+
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
109
|
+
*/
|
|
110
|
+
validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
|
|
111
|
+
/**
|
|
112
|
+
* An array of error messages to be displayed in the cell error tooltip.
|
|
113
|
+
*/
|
|
114
|
+
errorMessages?: string[];
|
|
115
|
+
/**
|
|
116
|
+
* A callback function called when an error occurs.
|
|
117
|
+
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
118
|
+
*/
|
|
119
|
+
onError?: (errorState: boolean) => void;
|
|
120
|
+
} & ErrorUIProps;
|
|
121
|
+
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { OptionType } from '../Common/Types';
|
|
2
|
+
import { CDMaterialSidebarType } from './types';
|
|
3
|
+
|
|
1
4
|
export declare const ARTIFACT_STATUS: {
|
|
2
5
|
PROGRESSING: string;
|
|
3
6
|
DEGRADED: string;
|
|
@@ -397,3 +400,4 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
397
400
|
allExistingAndFutureProdEnvironments = "-2",
|
|
398
401
|
allExistingAndFutureEnvironments = "-3"
|
|
399
402
|
}
|
|
403
|
+
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
|
+
import { KeyValueListType } from './Components';
|
|
2
3
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
3
4
|
|
|
4
5
|
export declare enum EnvType {
|
|
@@ -285,6 +286,10 @@ export declare enum CIMaterialSidebarType {
|
|
|
285
286
|
CODE_SOURCE = "Code Source",
|
|
286
287
|
PARAMETERS = "Parameters"
|
|
287
288
|
}
|
|
289
|
+
export declare enum CDMaterialSidebarType {
|
|
290
|
+
IMAGE = "Image",
|
|
291
|
+
PARAMETERS = "Parameters"
|
|
292
|
+
}
|
|
288
293
|
/**
|
|
289
294
|
* @example Usage with specific enum for path & `unknown` type for value
|
|
290
295
|
* ```ts
|
|
@@ -554,4 +559,11 @@ export type BaseFilterQueryParams<T> = {
|
|
|
554
559
|
*/
|
|
555
560
|
showAll?: boolean;
|
|
556
561
|
} & SortingParams<T>;
|
|
562
|
+
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
563
|
+
id: number;
|
|
564
|
+
}
|
|
565
|
+
export declare enum RuntimeParamsHeadingType {
|
|
566
|
+
KEY = "key",
|
|
567
|
+
VALUE = "value"
|
|
568
|
+
}
|
|
557
569
|
export {};
|