@devtron-labs/devtron-fe-common-lib 0.2.24 → 0.2.25
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/Common.service.d.ts +2 -0
- package/dist/Common/Types.d.ts +3 -2
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +28 -7
- package/dist/Shared/Components/KeyValueTable/constants.d.ts +2 -0
- package/dist/Shared/constants.d.ts +3 -0
- package/dist/Shared/types.d.ts +12 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-CRUBjsi5.js → cssMode-DNbCyQWZ.js} +1 -1
- package/dist/{freemarker2-CLlxqsl-.js → freemarker2-B8sanpqP.js} +1 -1
- package/dist/{handlebars-B6lyOnzG.js → handlebars-D1lGquqx.js} +1 -1
- package/dist/{html-lAmXB-IE.js → html-o2Q5p67r.js} +1 -1
- package/dist/{htmlMode--9UVZVdn.js → htmlMode-C8QyZwL0.js} +1 -1
- package/dist/{index-5BYTRdf3.js → index-B52ByxKw.js} +23312 -23282
- package/dist/index.js +497 -493
- package/dist/{javascript-694ZVMg8.js → javascript-BiZyQ5F7.js} +1 -1
- package/dist/{jsonMode-Dmh6ZoP5.js → jsonMode-CknHybGm.js} +1 -1
- package/dist/{liquid-cCgHRKYN.js → liquid-Cy0Mpavp.js} +1 -1
- package/dist/{mdx-BunKYBub.js → mdx-BHgZRX2R.js} +1 -1
- package/dist/{python-B1avY699.js → python-0epO5D9-.js} +1 -1
- package/dist/{razor-BEndl8O8.js → razor-D05lWlLD.js} +1 -1
- package/dist/{tsMode-DLdiu18i.js → tsMode-CCbQVu0G.js} +1 -1
- package/dist/{typescript-DRxjI6mI.js → typescript-DYDvsCgH.js} +1 -1
- package/dist/{xml-DlajdoYB.js → xml-DjdTF2VL.js} +1 -1
- package/dist/{yaml-Md-8DsZ-.js → yaml-B9plDIBh.js} +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
|
|
1
2
|
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
|
2
3
|
import { ApiResourceType } from '../Pages';
|
|
3
4
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
|
@@ -14,6 +15,7 @@ export declare const SourceTypeMap: {
|
|
|
14
15
|
};
|
|
15
16
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
16
17
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
|
18
|
+
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
|
|
17
19
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
18
20
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
19
21
|
export declare function extractImage(image: string): string;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React, ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
|
+
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
3
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
4
5
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
5
|
-
import {
|
|
6
|
-
import { RegistryType, Severity } from '../Shared';
|
|
6
|
+
import { RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
|
|
7
7
|
/**
|
|
8
8
|
* Generic response type object with support for overriding the result type
|
|
9
9
|
*
|
|
@@ -596,6 +596,7 @@ export interface CDMaterialsMetaInfo {
|
|
|
596
596
|
* This is the ID of user that has request the material
|
|
597
597
|
*/
|
|
598
598
|
requestedUserId: number;
|
|
599
|
+
runtimeParams: RuntimeParamsListItemType[];
|
|
599
600
|
}
|
|
600
601
|
export interface ImagePromotionMaterialInfo {
|
|
601
602
|
isApprovalPendingForPromotion: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { KeyValueTableProps } from './KeyValueTable.types';
|
|
2
|
-
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
|
|
2
|
+
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;
|
|
@@ -35,6 +35,29 @@ export interface KeyValueConfig<K extends string> {
|
|
|
35
35
|
/** An array of key-value rows. */
|
|
36
36
|
rows: KeyValueRow<K>[];
|
|
37
37
|
}
|
|
38
|
+
type ErrorUIProps = {
|
|
39
|
+
/**
|
|
40
|
+
* Indicates whether to show errors.
|
|
41
|
+
*/
|
|
42
|
+
showError: true;
|
|
43
|
+
/**
|
|
44
|
+
* @default - false
|
|
45
|
+
* If true, would validate for duplicate keys and if present would show error tooltip on the cell.
|
|
46
|
+
*/
|
|
47
|
+
validateDuplicateKeys?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @default - false
|
|
50
|
+
* If true, would validate for rows having values but no key and if error would show error tooltip on the cell.
|
|
51
|
+
*/
|
|
52
|
+
validateEmptyKeys?: boolean;
|
|
53
|
+
} | {
|
|
54
|
+
/**
|
|
55
|
+
* Indicates whether to show errors.
|
|
56
|
+
*/
|
|
57
|
+
showError?: false;
|
|
58
|
+
validateDuplicateKeys?: never;
|
|
59
|
+
validateEmptyKeys?: never;
|
|
60
|
+
};
|
|
38
61
|
/**
|
|
39
62
|
* Type representing a mask for key-value pairs.
|
|
40
63
|
* @template K - A string representing the key type.
|
|
@@ -49,7 +72,7 @@ export type KeyValuePlaceholder<K extends string> = {
|
|
|
49
72
|
* Interface representing the properties for a key-value table component.
|
|
50
73
|
* @template K - A string representing the key type.
|
|
51
74
|
*/
|
|
52
|
-
export
|
|
75
|
+
export type KeyValueTableProps<K extends string> = {
|
|
53
76
|
/** The configuration for the key-value table. */
|
|
54
77
|
config: KeyValueConfig<K>;
|
|
55
78
|
/** An optional mask for the key-value pairs. */
|
|
@@ -75,18 +98,15 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
75
98
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
76
99
|
*/
|
|
77
100
|
onDelete?: (deletedRowId: string | number) => void;
|
|
78
|
-
/**
|
|
79
|
-
* Indicates whether to show errors.
|
|
80
|
-
*/
|
|
81
|
-
showError?: boolean;
|
|
82
101
|
/**
|
|
83
102
|
* The function to use to validate the value of the cell.
|
|
84
103
|
* @param value - The value to validate.
|
|
85
104
|
* @param key - The row key of the value.
|
|
105
|
+
* @param rowId - The id of the row.
|
|
86
106
|
* @returns Return true if the value is valid, otherwise false
|
|
87
107
|
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
88
108
|
*/
|
|
89
|
-
validationSchema?: (value: string, key: K) => boolean;
|
|
109
|
+
validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
|
|
90
110
|
/**
|
|
91
111
|
* An array of error messages to be displayed in the cell error tooltip.
|
|
92
112
|
*/
|
|
@@ -96,4 +116,5 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
96
116
|
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
97
117
|
*/
|
|
98
118
|
onError?: (errorState: boolean) => void;
|
|
99
|
-
}
|
|
119
|
+
} & ErrorUIProps;
|
|
120
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OptionType } from '../Common/Types';
|
|
2
|
+
import { CDMaterialSidebarType } from './types';
|
|
1
3
|
export declare const ARTIFACT_STATUS: {
|
|
2
4
|
PROGRESSING: string;
|
|
3
5
|
DEGRADED: string;
|
|
@@ -401,4 +403,5 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
401
403
|
allExistingAndFutureProdEnvironments = "-2",
|
|
402
404
|
allExistingAndFutureEnvironments = "-3"
|
|
403
405
|
}
|
|
406
|
+
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
|
404
407
|
export declare const TRIGGER_STATUS_PROGRESSING: string[];
|
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
|
export declare enum EnvType {
|
|
4
5
|
CHART = "helm_charts",
|
|
@@ -286,6 +287,10 @@ export declare enum CIMaterialSidebarType {
|
|
|
286
287
|
CODE_SOURCE = "Code Source",
|
|
287
288
|
PARAMETERS = "Parameters"
|
|
288
289
|
}
|
|
290
|
+
export declare enum CDMaterialSidebarType {
|
|
291
|
+
IMAGE = "Image",
|
|
292
|
+
PARAMETERS = "Parameters"
|
|
293
|
+
}
|
|
289
294
|
/**
|
|
290
295
|
* @example Usage with specific enum for path & `unknown` type for value
|
|
291
296
|
* ```ts
|
|
@@ -565,4 +570,11 @@ export type BaseFilterQueryParams<T> = {
|
|
|
565
570
|
*/
|
|
566
571
|
showAll?: boolean;
|
|
567
572
|
} & SortingParams<T>;
|
|
573
|
+
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
574
|
+
id: number;
|
|
575
|
+
}
|
|
576
|
+
export declare enum RuntimeParamsHeadingType {
|
|
577
|
+
KEY = "key",
|
|
578
|
+
VALUE = "value"
|
|
579
|
+
}
|
|
568
580
|
export {};
|