@devtron-labs/devtron-fe-common-lib 0.2.20-beta-1 → 0.2.20-beta-3
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/Pages/index.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +2 -2
- package/dist/Shared/Components/CICDHistory/types.d.ts +3 -18
- 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 +4 -0
- package/dist/Shared/types.d.ts +12 -1
- package/dist/Shared/validations.d.ts +0 -11
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-9142ae1a.js → cssMode-1dd94185.js} +1 -1
- package/dist/{freemarker2-2d0d7ee6.js → freemarker2-bb644967.js} +1 -1
- package/dist/{handlebars-71171392.js → handlebars-e373f536.js} +1 -1
- package/dist/{html-f102bb14.js → html-9bda5693.js} +1 -1
- package/dist/{htmlMode-5794d753.js → htmlMode-cf63acf9.js} +1 -1
- package/dist/{index-8916d891.js → index-65359b3e.js} +17809 -17793
- package/dist/index.js +486 -485
- package/dist/{javascript-31cae804.js → javascript-25356a92.js} +1 -1
- package/dist/{jsonMode-050baafa.js → jsonMode-48aa45a3.js} +1 -1
- package/dist/{liquid-89bed0de.js → liquid-b31592cc.js} +1 -1
- package/dist/{mdx-1fac36f2.js → mdx-735fc5c2.js} +1 -1
- package/dist/{python-ed206589.js → python-e1a114b4.js} +1 -1
- package/dist/{razor-ec674809.js → razor-bf5217e7.js} +1 -1
- package/dist/{tsMode-ebf5cf6e.js → tsMode-f2ae6c6f.js} +1 -1
- package/dist/{typescript-f4090eca.js → typescript-275d8677.js} +1 -1
- package/dist/{xml-92e88cb6.js → xml-e46d3508.js} +1 -1
- package/dist/{yaml-1c216853.js → yaml-27e8c621.js} +1 -1
- package/package.json +1 -1
- package/dist/Pages/App/AppConfigurations/index.d.ts +0 -1
- package/dist/Pages/App/AppConfigurations/utils.d.ts +0 -3
- package/dist/Pages/App/index.d.ts +0 -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
|
|
|
@@ -15,6 +16,7 @@ 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) => RuntimeParamsListItemType[];
|
|
18
20
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
19
21
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
20
22
|
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
|
/**
|
|
9
9
|
* Generic response type object with support for overriding the result type
|
|
@@ -597,6 +597,7 @@ export interface CDMaterialsMetaInfo {
|
|
|
597
597
|
* This is the ID of user that has request the material
|
|
598
598
|
*/
|
|
599
599
|
requestedUserId: number;
|
|
600
|
+
runtimeParams: RuntimeParamsListItemType[];
|
|
600
601
|
}
|
|
601
602
|
export interface ImagePromotionMaterialInfo {
|
|
602
603
|
isApprovalPendingForPromotion: boolean;
|
package/dist/Pages/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TriggerDetailsType, TriggerOutputProps } from './types';
|
|
3
3
|
|
|
4
|
-
export declare const TriggerDetails: React.MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText,
|
|
5
|
-
declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView, setDeploymentHistoryList, deploymentHistoryList, deploymentAppType, isBlobStorageConfigured, appReleaseTags, tagsEditable, hideImageTaggingHardDelete, fetchIdData, setFetchTriggerIdData, selectedEnvironmentName, deploymentHistoryResult, renderRunSource, renderCIListHeader, renderDeploymentApprovalInfo, processVirtualEnvironmentDeploymentData, renderVirtualHistoryArtifacts, renderDeploymentHistoryTriggerMetaText, resourceId, scrollToTop, scrollToBottom,
|
|
4
|
+
export declare const TriggerDetails: React.MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, }: TriggerDetailsType) => JSX.Element>;
|
|
5
|
+
declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView, setDeploymentHistoryList, deploymentHistoryList, deploymentAppType, isBlobStorageConfigured, appReleaseTags, tagsEditable, hideImageTaggingHardDelete, fetchIdData, setFetchTriggerIdData, selectedEnvironmentName, deploymentHistoryResult, renderRunSource, renderCIListHeader, renderDeploymentApprovalInfo, processVirtualEnvironmentDeploymentData, renderVirtualHistoryArtifacts, renderDeploymentHistoryTriggerMetaText, resourceId, scrollToTop, scrollToBottom, }: TriggerOutputProps) => JSX.Element;
|
|
6
6
|
export default TriggerOutput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps, useScrollable, SortingOrder } from '../../../Common';
|
|
3
3
|
import { DeploymentStageType } from '../../constants';
|
|
4
4
|
import { AggregationKeys, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType } from '../../types';
|
|
@@ -47,15 +47,6 @@ export interface CICDSidebarFilterOptionType extends OptionType {
|
|
|
47
47
|
pipelineType?: string;
|
|
48
48
|
deploymentAppDeleteRequest?: boolean;
|
|
49
49
|
}
|
|
50
|
-
export interface TargetConfigType {
|
|
51
|
-
tenantIcon?: string;
|
|
52
|
-
tenantId?: string;
|
|
53
|
-
tenantName?: string;
|
|
54
|
-
installationId?: string;
|
|
55
|
-
installationName?: string;
|
|
56
|
-
releaseChannelId?: string;
|
|
57
|
-
releaseChannelName?: string;
|
|
58
|
-
}
|
|
59
50
|
export interface History {
|
|
60
51
|
id: number;
|
|
61
52
|
name: string;
|
|
@@ -90,7 +81,6 @@ export interface History {
|
|
|
90
81
|
promotionApprovalMetadata?: PromotionApprovalMetadataType;
|
|
91
82
|
triggerMetadata?: string;
|
|
92
83
|
runSource?: RunSourceType;
|
|
93
|
-
targetConfig?: TargetConfigType;
|
|
94
84
|
}
|
|
95
85
|
export interface DeploymentHistoryResultObject {
|
|
96
86
|
cdWorkflows: History[];
|
|
@@ -168,13 +158,8 @@ export interface StartDetailsType {
|
|
|
168
158
|
isJobView?: boolean;
|
|
169
159
|
triggerMetadata?: string;
|
|
170
160
|
renderDeploymentHistoryTriggerMetaText: (triggerMetaData: string) => JSX.Element;
|
|
171
|
-
/**
|
|
172
|
-
* Callback handler for showing the target config
|
|
173
|
-
*/
|
|
174
|
-
renderTargetConfigInfo?: () => ReactElement;
|
|
175
|
-
stage: DeploymentStageType;
|
|
176
161
|
}
|
|
177
|
-
export interface TriggerDetailsType
|
|
162
|
+
export interface TriggerDetailsType {
|
|
178
163
|
status: string;
|
|
179
164
|
startedOn: string;
|
|
180
165
|
finishedOn: string;
|
|
@@ -309,7 +294,7 @@ export interface VirtualHistoryArtifactProps {
|
|
|
309
294
|
workflowId: number;
|
|
310
295
|
};
|
|
311
296
|
}
|
|
312
|
-
export interface TriggerOutputProps extends RenderRunSourceType
|
|
297
|
+
export interface TriggerOutputProps extends RenderRunSourceType {
|
|
313
298
|
fullScreenView: boolean;
|
|
314
299
|
triggerHistory: Map<number, History>;
|
|
315
300
|
setFullScreenView: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -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, readOnly, showError, validationSchema, errorMessages, onError, }: 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. */
|
|
@@ -76,18 +99,15 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
76
99
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
77
100
|
*/
|
|
78
101
|
onDelete?: (deletedRowId: string | number) => void;
|
|
79
|
-
/**
|
|
80
|
-
* Indicates whether to show errors.
|
|
81
|
-
*/
|
|
82
|
-
showError?: boolean;
|
|
83
102
|
/**
|
|
84
103
|
* The function to use to validate the value of the cell.
|
|
85
104
|
* @param value - The value to validate.
|
|
86
105
|
* @param key - The row key of the value.
|
|
106
|
+
* @param rowId - The id of the row.
|
|
87
107
|
* @returns Return true if the value is valid, otherwise false
|
|
88
108
|
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
89
109
|
*/
|
|
90
|
-
validationSchema?: (value: string, key: K) => boolean;
|
|
110
|
+
validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
|
|
91
111
|
/**
|
|
92
112
|
* An array of error messages to be displayed in the cell error tooltip.
|
|
93
113
|
*/
|
|
@@ -97,4 +117,5 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
97
117
|
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
98
118
|
*/
|
|
99
119
|
onError?: (errorState: boolean) => void;
|
|
100
|
-
}
|
|
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;
|
|
@@ -400,4 +403,5 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
400
403
|
allExistingAndFutureProdEnvironments = "-2",
|
|
401
404
|
allExistingAndFutureEnvironments = "-3"
|
|
402
405
|
}
|
|
406
|
+
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
|
403
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
|
|
|
4
5
|
export declare enum EnvType {
|
|
@@ -287,6 +288,10 @@ export declare enum CIMaterialSidebarType {
|
|
|
287
288
|
CODE_SOURCE = "Code Source",
|
|
288
289
|
PARAMETERS = "Parameters"
|
|
289
290
|
}
|
|
291
|
+
export declare enum CDMaterialSidebarType {
|
|
292
|
+
IMAGE = "Image",
|
|
293
|
+
PARAMETERS = "Parameters"
|
|
294
|
+
}
|
|
290
295
|
/**
|
|
291
296
|
* @example Usage with specific enum for path & `unknown` type for value
|
|
292
297
|
* ```ts
|
|
@@ -367,7 +372,6 @@ export declare enum ResourceKindType {
|
|
|
367
372
|
cluster = "cluster",
|
|
368
373
|
release = "release",
|
|
369
374
|
releaseTrack = "release-track",
|
|
370
|
-
releaseChannel = "release-channel",
|
|
371
375
|
tenant = "tenant",
|
|
372
376
|
installation = "installation",
|
|
373
377
|
environment = "environment",
|
|
@@ -567,4 +571,11 @@ export type BaseFilterQueryParams<T> = {
|
|
|
567
571
|
*/
|
|
568
572
|
showAll?: boolean;
|
|
569
573
|
} & SortingParams<T>;
|
|
574
|
+
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
575
|
+
id: number;
|
|
576
|
+
}
|
|
577
|
+
export declare enum RuntimeParamsHeadingType {
|
|
578
|
+
KEY = "key",
|
|
579
|
+
VALUE = "value"
|
|
580
|
+
}
|
|
570
581
|
export {};
|
|
@@ -14,7 +14,6 @@ export declare const MESSAGES: {
|
|
|
14
14
|
VALID_POSITIVE_NUMBER: string;
|
|
15
15
|
VALID_POSITIVE_INTEGER: string;
|
|
16
16
|
MAX_SAFE_INTEGER: string;
|
|
17
|
-
INVALID_SEMANTIC_VERSION: string;
|
|
18
17
|
};
|
|
19
18
|
export declare const requiredField: (value: string) => ValidationResponseType;
|
|
20
19
|
export declare const validateName: (name: string) => ValidationResponseType;
|
|
@@ -32,14 +31,4 @@ export declare const validateUniqueKeys: (keys: string[]) => {
|
|
|
32
31
|
isValid: boolean;
|
|
33
32
|
message: string;
|
|
34
33
|
};
|
|
35
|
-
/**
|
|
36
|
-
* Rules for valid semantic version:
|
|
37
|
-
* 1. version.length < 128 and not empty
|
|
38
|
-
* 2. version should follow semantic versioning regex from https://semver.org/
|
|
39
|
-
*/
|
|
40
|
-
export declare const validateSemanticVersioning: (version: string) => ValidationResponseType;
|
|
41
|
-
/**
|
|
42
|
-
* A valid display name should be between 3 and 50 characters
|
|
43
|
-
*/
|
|
44
|
-
export declare const validateDisplayName: (name: string) => ValidationResponseType;
|
|
45
34
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|