@devtron-labs/devtron-fe-common-lib 0.0.93 → 0.0.94-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.
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/IframeContainer/IframeContainer.component.d.ts +4 -0
  9. package/dist/Shared/Components/IframeContainer/IframeElement.d.ts +4 -0
  10. package/dist/Shared/Components/IframeContainer/index.d.ts +1 -0
  11. package/dist/Shared/Components/IframeContainer/types.d.ts +15 -0
  12. package/dist/Shared/Components/ImageChipCell/ImageChipCell.component.d.ts +4 -0
  13. package/dist/Shared/Components/ImageChipCell/index.d.ts +2 -0
  14. package/dist/Shared/Components/ImageChipCell/types.d.ts +9 -0
  15. package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +4 -0
  16. package/dist/Shared/Components/MaterialHistory/index.d.ts +2 -0
  17. package/dist/Shared/Components/MaterialHistory/types.d.ts +8 -0
  18. package/dist/Shared/Components/index.d.ts +5 -0
  19. package/dist/Shared/Services/app.service.d.ts +7 -0
  20. package/dist/Shared/Services/app.types.d.ts +95 -0
  21. package/dist/Shared/Services/index.d.ts +2 -0
  22. package/dist/Shared/Services/utils.d.ts +3 -0
  23. package/dist/assets/index.css +1 -1
  24. package/dist/{cssMode-02c3ecac.js → cssMode-47260d27.js} +1 -1
  25. package/dist/{freemarker2-352acda9.js → freemarker2-dfdf1e8a.js} +1 -1
  26. package/dist/{handlebars-e9d2ab7d.js → handlebars-851a624f.js} +1 -1
  27. package/dist/{html-60959428.js → html-4d33a861.js} +1 -1
  28. package/dist/{htmlMode-3f94fe9b.js → htmlMode-dea4933c.js} +1 -1
  29. package/dist/{index-2180810f.js → index-f805e9d1.js} +17893 -17593
  30. package/dist/index.js +407 -400
  31. package/dist/{javascript-f7ee3459.js → javascript-5d11c26a.js} +1 -1
  32. package/dist/{jsonMode-444b9bdd.js → jsonMode-736c0d98.js} +1 -1
  33. package/dist/{liquid-9d5c7628.js → liquid-c1c0f05a.js} +1 -1
  34. package/dist/{mdx-ce47fe79.js → mdx-e54bb483.js} +1 -1
  35. package/dist/{python-2fa83b3a.js → python-1a047dfc.js} +1 -1
  36. package/dist/{razor-273351f0.js → razor-2d05283c.js} +1 -1
  37. package/dist/{tsMode-f1e7353a.js → tsMode-e91237a4.js} +1 -1
  38. package/dist/{typescript-b532790a.js → typescript-bb3c2d0e.js} +1 -1
  39. package/dist/{xml-feaa096f.js → xml-fe2639e5.js} +1 -1
  40. package/dist/{yaml-e834bcce.js → yaml-2cbcea8f.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 { IframeContainerProps } from './types';
2
+
3
+ declare const IframeContainer: ({ iframeList, maxHeight, maxWidth }: IframeContainerProps) => JSX.Element;
4
+ export default IframeContainer;
@@ -0,0 +1,4 @@
1
+ import { IframeElementProps } from './types';
2
+
3
+ declare const IframeElement: ({ URL, width, height, title, maxHeight, maxWidth }: IframeElementProps) => JSX.Element;
4
+ export default IframeElement;
@@ -0,0 +1 @@
1
+ export { default as IframeContainer } from './IframeContainer.component';
@@ -0,0 +1,15 @@
1
+ interface IframeData {
2
+ URL: string;
3
+ width: number;
4
+ height: number;
5
+ title: string;
6
+ order?: number;
7
+ }
8
+ export interface IframeContainerProps {
9
+ iframeList: IframeData[];
10
+ maxHeight?: number;
11
+ maxWidth?: number;
12
+ }
13
+ export interface IframeElementProps extends Pick<IframeData, 'URL' | 'width' | 'height' | 'title'>, Pick<IframeContainerProps, 'maxHeight' | 'maxWidth'> {
14
+ }
15
+ export {};
@@ -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,3 +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';
30
+ export * from './IframeContainer';
@@ -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;