@devtron-labs/devtron-fe-common-lib 0.0.94-beta-2 → 0.0.94-beta-4

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.
Files changed (41) hide show
  1. package/dist/Common/Reload.d.ts +3 -0
  2. package/dist/Shared/Components/ArtifactInfoModal/ArtifactInfoModal.component.d.ts +4 -0
  3. package/dist/Shared/Components/ArtifactInfoModal/index.d.ts +2 -0
  4. package/dist/Shared/Components/ArtifactInfoModal/types.d.ts +15 -0
  5. package/dist/Shared/Components/CommitChipCell/CommitChipCell.d.ts +4 -0
  6. package/dist/Shared/Components/CommitChipCell/index.d.ts +2 -0
  7. package/dist/Shared/Components/CommitChipCell/types.d.ts +6 -0
  8. package/dist/Shared/Components/ImageChipCell/ImageChipCell.component.d.ts +4 -0
  9. package/dist/Shared/Components/ImageChipCell/index.d.ts +2 -0
  10. package/dist/Shared/Components/ImageChipCell/types.d.ts +9 -0
  11. package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +4 -0
  12. package/dist/Shared/Components/MaterialHistory/index.d.ts +2 -0
  13. package/dist/Shared/Components/MaterialHistory/types.d.ts +8 -0
  14. package/dist/Shared/Components/index.d.ts +4 -0
  15. package/dist/Shared/Helpers.d.ts +0 -1
  16. package/dist/Shared/Services/app.service.d.ts +7 -0
  17. package/dist/Shared/Services/app.types.d.ts +95 -0
  18. package/dist/Shared/Services/index.d.ts +2 -0
  19. package/dist/Shared/Services/utils.d.ts +3 -0
  20. package/dist/Shared/constants.d.ts +0 -1
  21. package/dist/Shared/types.d.ts +0 -13
  22. package/dist/assets/index.css +1 -1
  23. package/dist/{cssMode-86baa526.js → cssMode-b6f0ce28.js} +1 -1
  24. package/dist/{freemarker2-1a67f23f.js → freemarker2-89c73b42.js} +1 -1
  25. package/dist/{handlebars-b9d0b595.js → handlebars-7036ebc3.js} +1 -1
  26. package/dist/{html-be4b5f78.js → html-58c5c2ae.js} +1 -1
  27. package/dist/{htmlMode-5c0c3616.js → htmlMode-055f30ba.js} +1 -1
  28. package/dist/{index-5a78d018.js → index-fbb83f4c.js} +17333 -17125
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +392 -389
  31. package/dist/{javascript-7acf9c8d.js → javascript-af328488.js} +1 -1
  32. package/dist/{jsonMode-e0de67f4.js → jsonMode-451249f8.js} +1 -1
  33. package/dist/{liquid-b809116f.js → liquid-83f9886e.js} +1 -1
  34. package/dist/{mdx-c160144d.js → mdx-c5de7484.js} +1 -1
  35. package/dist/{python-eac2ced8.js → python-c8f245d5.js} +1 -1
  36. package/dist/{razor-e0d839e6.js → razor-64a81ed9.js} +1 -1
  37. package/dist/{tsMode-e06fa3ef.js → tsMode-7279b789.js} +1 -1
  38. package/dist/{typescript-bb217cdc.js → typescript-a7692d5c.js} +1 -1
  39. package/dist/{xml-6ef3921d.js → xml-d9b2bff0.js} +1 -1
  40. package/dist/{yaml-2b1222b8.js → yaml-a2b5d521.js} +1 -1
  41. package/package.json +1 -1
@@ -1,3 +1,6 @@
1
1
  import { ReloadType } from './Types';
2
2
 
3
+ /**
4
+ * @deprecated Use APIResponseHandler (Preferred) or error screen manager instead
5
+ */
3
6
  export default function Reload({ reload, className, heightToDeduct }: ReloadType): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ArtifactInfoModalProps } from './types';
2
+
3
+ declare const ArtifactInfoModal: ({ envId, ciArtifactId, handleClose, renderCIListHeader, fetchOnlyArtifactInfo, }: ArtifactInfoModalProps) => JSX.Element;
4
+ export default ArtifactInfoModal;
@@ -0,0 +1,2 @@
1
+ export { default as ArtifactInfoModal } from './ArtifactInfoModal.component';
2
+ export type { ArtifactInfoModalProps } from './types';
@@ -0,0 +1,15 @@
1
+ import { ArtifactType } from '../CICDHistory';
2
+
3
+ export type ArtifactInfoModalProps = Pick<ArtifactType, 'renderCIListHeader'> & {
4
+ ciArtifactId: number;
5
+ handleClose: () => void;
6
+ } & ({
7
+ envId: number | string;
8
+ fetchOnlyArtifactInfo?: false;
9
+ } | {
10
+ envId?: never;
11
+ /**
12
+ * If true, the env and trigger meta data is not fetched
13
+ */
14
+ fetchOnlyArtifactInfo: true;
15
+ });
@@ -0,0 +1,4 @@
1
+ import { CommitChipCellProps } from './types';
2
+
3
+ declare const CommitChipCell: ({ handleClick, commits }: CommitChipCellProps) => JSX.Element;
4
+ export default CommitChipCell;
@@ -0,0 +1,2 @@
1
+ export { default as CommitChipCell } from './CommitChipCell';
2
+ export type { CommitChipCellProps } from './types';
@@ -0,0 +1,6 @@
1
+ import { SyntheticEvent } from 'react';
2
+
3
+ export interface CommitChipCellProps {
4
+ handleClick: (e: SyntheticEvent) => void;
5
+ commits?: string[];
6
+ }
@@ -0,0 +1,4 @@
1
+ import { ImageChipCellProps } from './types';
2
+
3
+ declare const ImageChipCell: ({ handleClick, imagePath, isExpanded, registryType }: ImageChipCellProps) => JSX.Element;
4
+ export default ImageChipCell;
@@ -0,0 +1,2 @@
1
+ export { default as ImageChipCell } from './ImageChipCell.component';
2
+ export type { ImageChipCellProps } from './types';
@@ -0,0 +1,9 @@
1
+ import { RegistryType } from '../../types';
2
+ import { SyntheticEvent } from 'react';
3
+
4
+ export interface ImageChipCellProps {
5
+ handleClick: (e: SyntheticEvent) => void;
6
+ imagePath: string;
7
+ isExpanded: boolean;
8
+ registryType: RegistryType;
9
+ }
@@ -0,0 +1,4 @@
1
+ import { MaterialHistoryProps } from './types';
2
+
3
+ declare const MaterialHistory: ({ material, pipelineName, ciPipelineId, selectCommit }: MaterialHistoryProps) => JSX.Element;
4
+ export default MaterialHistory;
@@ -0,0 +1,2 @@
1
+ export { default as MaterialHistory } from './MaterialHistory.component';
2
+ export type { MaterialHistoryProps } from './types';
@@ -0,0 +1,8 @@
1
+ import { CIMaterialType } from '../../Services/app.types';
2
+
3
+ export interface MaterialHistoryProps {
4
+ material: CIMaterialType;
5
+ pipelineName: string;
6
+ ciPipelineId?: string;
7
+ selectCommit?: (materialId: string, commit: string, ciPipelineId?: string) => void;
8
+ }
@@ -23,4 +23,8 @@ export * from './FeatureDescription';
23
23
  export * from './CICDHistory';
24
24
  export * from './GitCommitInfoGeneric';
25
25
  export * from './Error';
26
+ export * from './CommitChipCell';
27
+ export * from './ImageChipCell';
28
+ export * from './ArtifactInfoModal';
29
+ export * from './MaterialHistory';
26
30
  export * from './IframeContainer';
@@ -26,7 +26,6 @@ export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrd
26
26
  export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
27
27
  export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
28
28
  export declare const isNullOrUndefined: (value: unknown) => boolean;
29
- export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
30
29
  export declare const getKeyToBooleanMapFromArray: <T extends string | number>(arr?: T[]) => Record<T, boolean>;
31
30
  export declare const renderValidInputButtonTippy: (children: ReactElement) => JSX.Element;
32
31
  export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
@@ -0,0 +1,7 @@
1
+ import { CIMaterialInfoType, GetCITriggerInfoParamsType } from './app.types';
2
+
3
+ export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<CIMaterialInfoType>;
4
+ /**
5
+ * The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
6
+ */
7
+ export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, 'ciArtifactId'>) => Promise<CIMaterialInfoType>;
@@ -0,0 +1,95 @@
1
+ import { ReleaseTag } from '../../Common';
2
+
3
+ interface WebhookDataType {
4
+ id: number;
5
+ eventActionType: string;
6
+ data: any;
7
+ }
8
+ interface MaterialHistoryDTO {
9
+ Commit: string;
10
+ Author: string;
11
+ Date: string;
12
+ Message: string;
13
+ Changes: unknown[];
14
+ WebhookData: WebhookDataType;
15
+ }
16
+ interface MaterialHistoryType {
17
+ commitURL: string;
18
+ commit: MaterialHistoryDTO['Commit'];
19
+ author: MaterialHistoryDTO['Author'];
20
+ date: MaterialHistoryDTO['Date'];
21
+ message: MaterialHistoryDTO['Message'];
22
+ changes: MaterialHistoryDTO['Changes'];
23
+ webhookData: MaterialHistoryDTO['WebhookData'];
24
+ showChanges: boolean;
25
+ isSelected: boolean;
26
+ excluded?: boolean;
27
+ }
28
+ interface CIMaterialDTO {
29
+ id: number;
30
+ gitMaterialId: number;
31
+ gitMaterialName: string;
32
+ type: string;
33
+ value: string;
34
+ active: boolean;
35
+ history: MaterialHistoryDTO[];
36
+ lastFetchTime: string;
37
+ url: string;
38
+ }
39
+ interface CIMaterialMetaType {
40
+ isRepoError?: boolean;
41
+ repoErrorMsg?: string;
42
+ isBranchError?: boolean;
43
+ branchErrorMsg?: string;
44
+ isMaterialLoading?: boolean;
45
+ regex?: string;
46
+ searchText?: string;
47
+ noSearchResultsMsg?: string;
48
+ noSearchResult?: boolean;
49
+ isRegex?: boolean;
50
+ isDockerFileError?: boolean;
51
+ dockerFileErrorMsg?: string;
52
+ showAllCommits?: boolean;
53
+ isMaterialSelectionError?: boolean;
54
+ materialSelectionErrorMsg?: string;
55
+ }
56
+ export interface CIMaterialType extends Pick<CIMaterialDTO, 'id' | 'gitMaterialId' | 'gitMaterialName' | 'type' | 'value' | 'active' | 'lastFetchTime'>, CIMaterialMetaType {
57
+ gitURL: CIMaterialDTO['url'];
58
+ history: MaterialHistoryType[];
59
+ isSelected: boolean;
60
+ }
61
+ interface ImageCommentDTO {
62
+ id: number;
63
+ comment: string;
64
+ artifactId: number;
65
+ }
66
+ interface ImageCommentType extends ImageCommentDTO {
67
+ }
68
+ interface ImageTaggingDataDTO {
69
+ imageReleaseTags: ReleaseTag[];
70
+ appReleaseTags: string[];
71
+ imageComment: ImageCommentDTO;
72
+ tagsEditable: boolean;
73
+ }
74
+ interface ImageTaggingDataType extends Pick<ImageTaggingDataDTO, 'imageReleaseTags' | 'appReleaseTags' | 'tagsEditable'> {
75
+ imageComment: ImageCommentType;
76
+ }
77
+ export interface CIMaterialInfoDTO {
78
+ ciMaterials: CIMaterialDTO[];
79
+ triggeredByEmail: string;
80
+ lastDeployedTime: string;
81
+ appId: number;
82
+ appName: string;
83
+ environmentId: number;
84
+ environmentName: string;
85
+ imageTaggingData: ImageTaggingDataDTO;
86
+ image: string;
87
+ }
88
+ export interface CIMaterialInfoType extends Pick<CIMaterialInfoDTO, 'triggeredByEmail' | 'lastDeployedTime' | 'appId' | 'appName' | 'environmentId' | 'environmentName' | 'image'>, ImageTaggingDataType {
89
+ materials: CIMaterialType[];
90
+ }
91
+ export interface GetCITriggerInfoParamsType {
92
+ envId: number | string;
93
+ ciArtifactId: number | string;
94
+ }
95
+ export {};
@@ -1,2 +1,4 @@
1
1
  export * from './types';
2
+ export * from './app.types';
3
+ export * from './app.service';
2
4
  export * from './common.service';
@@ -0,0 +1,3 @@
1
+ import { CIMaterialInfoDTO, CIMaterialInfoType } from './app.types';
2
+
3
+ export declare const getParsedCIMaterialInfo: (ciMaterialData: CIMaterialInfoDTO) => CIMaterialInfoType;
@@ -29,7 +29,6 @@ export declare const ModuleNameMap: {
29
29
  };
30
30
  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
- export declare const DEFAULT_SECRET_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
33
32
  export declare enum PatchOperationType {
34
33
  replace = "replace",
35
34
  remove = "remove"
@@ -418,19 +418,6 @@ export declare enum AggregationKeys {
418
418
  Namespaces = "Namespaces"
419
419
  }
420
420
  export type AggregationKeysType = keyof typeof AggregationKeys;
421
- export declare enum GitOpsAuthModeType {
422
- SSH = "SSH",
423
- PASSWORD = "PASSWORD",
424
- SSH_AND_PASSWORD = "PAT_AND_SSH"
425
- }
426
- export interface BaseGitOpsType {
427
- authMode: GitOpsAuthModeType;
428
- sshKey: string;
429
- sshHost: string;
430
- username: string;
431
- token: string;
432
- }
433
- export type GitOpsFieldKeyType = 'host' | 'username' | 'token' | 'gitHubOrgId' | 'azureProjectName' | 'gitLabGroupId' | 'bitBucketWorkspaceId' | 'bitBucketProjectKey' | 'sshHost' | 'sshKey';
434
421
  export interface EnvironmentType {
435
422
  /**
436
423
  * Unique identifier for the environment