@devtron-labs/devtron-fe-common-lib 1.0.3-beta-8 → 1.0.4-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 (48) hide show
  1. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +1 -2
  2. package/dist/Common/CodeEditor/types.d.ts +1 -2
  3. package/dist/Common/Common.service.d.ts +7 -0
  4. package/dist/Common/Constants.d.ts +15 -2
  5. package/dist/Common/ErrorScreenManager.d.ts +1 -1
  6. package/dist/Common/Helper.d.ts +8 -0
  7. package/dist/Common/RJSF/index.d.ts +1 -1
  8. package/dist/Common/Types.d.ts +1 -0
  9. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +3 -18
  10. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +1 -2
  11. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +0 -6
  12. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
  13. package/dist/Pages/index.d.ts +0 -1
  14. package/dist/Shared/Components/CICDHistory/CiPipelineSourceConfig.d.ts +2 -11
  15. package/dist/Shared/Components/CICDHistory/types.d.ts +11 -0
  16. package/dist/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.d.ts +1 -1
  17. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  18. package/dist/Shared/Components/index.d.ts +0 -1
  19. package/dist/Shared/Helpers.d.ts +12 -5
  20. package/dist/Shared/Services/app.types.d.ts +2 -1
  21. package/dist/Shared/constants.d.ts +3 -0
  22. package/dist/assets/index.css +1 -1
  23. package/dist/{cssMode-DA_U7EYc.js → cssMode-BpnPKF0v.js} +1 -1
  24. package/dist/{freemarker2-DMPiYkPh.js → freemarker2-C713p__x.js} +1 -1
  25. package/dist/{handlebars-KKsFYI1d.js → handlebars-BrfskXEM.js} +1 -1
  26. package/dist/{html-BX4Q5ewn.js → html-C5TTKndk.js} +1 -1
  27. package/dist/{htmlMode-DDA3zW7G.js → htmlMode-CSrdf07c.js} +1 -1
  28. package/dist/{index-JdFrccxa.js → index-3k1VpblC.js} +19100 -19163
  29. package/dist/index.js +458 -453
  30. package/dist/{javascript-cSh-4qCG.js → javascript-BQgFNTPZ.js} +1 -1
  31. package/dist/{jsonMode-CECmd_zV.js → jsonMode-CkeZ2WsI.js} +1 -1
  32. package/dist/{liquid-D61KvSmi.js → liquid-DkPC2-w3.js} +1 -1
  33. package/dist/{mdx-DkPetpZx.js → mdx-5tLcc7Sm.js} +1 -1
  34. package/dist/{python-Bpk5d3lh.js → python-CYCYGeGg.js} +1 -1
  35. package/dist/{razor-TS25iAC3.js → razor-Lp_B33C_.js} +1 -1
  36. package/dist/{tsMode-D0Wt5CGg.js → tsMode-TVipA5lw.js} +1 -1
  37. package/dist/{typescript-C7mKk0PO.js → typescript-D3ME0apQ.js} +1 -1
  38. package/dist/{xml-DvlWRjj7.js → xml-SUawu1e7.js} +1 -1
  39. package/dist/{yaml-YYTFfNZK.js → yaml-DvUhRau_.js} +1 -1
  40. package/package.json +1 -1
  41. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/index.d.ts +0 -2
  42. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/types.d.ts +0 -2
  43. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/utils.d.ts +0 -6
  44. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +0 -1
  45. package/dist/Pages/App/AppConfiguration/index.d.ts +0 -1
  46. package/dist/Pages/App/index.d.ts +0 -1
  47. package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +0 -2
  48. package/dist/Shared/Components/EnterpriseTag/index.d.ts +0 -1
@@ -32,5 +32,4 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
32
32
  code: string;
33
33
  noParsing: boolean;
34
34
  };
35
- export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
36
- export declare const initialState: ({ mode, theme, value, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
35
+ export declare const initialState: ({ mode, theme, value, diffView, noParsing, }: CodeEditorInitialValueType) => CodeEditorState;
@@ -28,7 +28,7 @@ interface CodeEditorBaseInterface {
28
28
  validatorSchema?: any;
29
29
  isKubernetes?: boolean;
30
30
  cleanData?: boolean;
31
- schemaURI?: string;
31
+ chartVersion?: any;
32
32
  /**
33
33
  * If true, disable the in-built search of monaco editor
34
34
  * @default false
@@ -81,7 +81,6 @@ export interface CodeEditorInitialValueType {
81
81
  theme?: string;
82
82
  value: string;
83
83
  noParsing?: boolean;
84
- tabSize: number;
85
84
  }
86
85
  export interface CodeEditorState {
87
86
  mode: MODES;
@@ -27,4 +27,11 @@ export declare function getClusterListMin(): Promise<ResponseType<any>>;
27
27
  export declare const getResourceGroupListRaw: (clusterId: string) => Promise<ResponseType<ApiResourceType>>;
28
28
  export declare function getNamespaceListMin(clusterIdsCsv: string): Promise<EnvironmentListHelmResponse>;
29
29
  export declare function getWebhookEventsForEventId(eventId: string | number): Promise<ResponseType<any>>;
30
+ /**
31
+ *
32
+ * @param gitUrl Git URL of the repository
33
+ * @param branchName Branch name
34
+ * @returns URL to the branch in the Git repository
35
+ */
36
+ export declare const getGitBranchUrl: (gitUrl: string, branchName: string) => string | null;
30
37
  export {};
@@ -4,7 +4,6 @@ export declare const Host: string;
4
4
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
5
5
  export declare const DOCUMENTATION_VERSION = "/v/v0.7";
6
6
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
7
- export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
8
7
  export declare const DOCUMENTATION: {
9
8
  APP_METRICS: string;
10
9
  APP_TAGS: string;
@@ -256,8 +255,8 @@ export declare const API_STATUS_CODES: {
256
255
  PERMISSION_DENIED: number;
257
256
  NOT_FOUND: number;
258
257
  EXPECTATION_FAILED: number;
258
+ UNPROCESSABLE_ENTITY: number;
259
259
  LOCKED: number;
260
- UNPROCESSABLE_CONTENT: number;
261
260
  };
262
261
  export declare enum SERVER_MODE {
263
262
  EA_ONLY = "EA_ONLY",
@@ -295,3 +294,17 @@ export declare const VULNERABILITIES_SORT_PRIORITY: {
295
294
  unknown: number;
296
295
  };
297
296
  export declare const IS_PLATFORM_MAC_OS: boolean;
297
+ /**
298
+ * Git provider types
299
+ */
300
+ export declare enum GitProviderType {
301
+ GITHUB = "github",
302
+ GITLAB = "gitlab",
303
+ BITBUCKET = "bitbucket",
304
+ AZURE = "azure",
305
+ GITEA = "gitea"
306
+ }
307
+ /**
308
+ * Formats the schema removing any irregularity in the existing schema
309
+ */
310
+ export declare const getFormattedSchema: (schema?: string) => string;
@@ -1,3 +1,3 @@
1
1
  import { ErrorScreenManagerProps } from './Types';
2
- declare const ErrorScreenManager: ({ code, reload, subtitle, reloadClass, heightToDeduct, redirectURL, }: ErrorScreenManagerProps) => JSX.Element;
2
+ declare const ErrorScreenManager: ({ code, reload, subtitle, reloadClass, heightToDeduct, redirectURL, imageType, }: ErrorScreenManagerProps) => JSX.Element;
3
3
  export default ErrorScreenManager;
@@ -121,6 +121,14 @@ export declare function mapByKey<T = Map<any, any>>(arr: any[], id: string): T;
121
121
  export declare function asyncWrap(promise: any): any[];
122
122
  export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
123
123
  export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, delay?: number) => ((...args: Parameters<T>) => void);
124
+ /**
125
+ *
126
+ * @param sourceType - SourceTypeMap
127
+ * @param _isRegex - boolean
128
+ * @param webhookEventName - WebhookEventNameType
129
+ * @returns - Icon
130
+ */
131
+ export declare const getBranchIcon: (sourceType: any, _isRegex?: boolean, webhookEventName?: string) => string;
124
132
  export declare const getSanitizedIframe: (iframeString: string) => string;
125
133
  /**
126
134
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
@@ -1,4 +1,4 @@
1
1
  export { RJSFForm } from './Form';
2
- export type * from './types';
2
+ export * from './types';
3
3
  export { getInferredTypeFromValueType, getRedirectionProps } from './utils';
4
4
  export { HIDE_SUBMIT_BUTTON_UI_SCHEMA } from './constants';
@@ -124,6 +124,7 @@ export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'ti
124
124
  }
125
125
  export interface ErrorScreenManagerProps {
126
126
  code?: number;
127
+ imageType?: ImageType;
127
128
  reload?: (...args: any[]) => any;
128
129
  subtitle?: React.ReactChild;
129
130
  reloadClass?: string;
@@ -108,15 +108,15 @@ interface BaseDeploymentTemplateConfigState {
108
108
  environmentConfig?: never;
109
109
  mergeStrategy?: never;
110
110
  }
111
- type EnvironmentOverrideDeploymentTemplateConfigState = {
111
+ interface EnvironmentOverrideDeploymentTemplateConfigState {
112
112
  chartConfig?: never;
113
113
  isOverridden: boolean;
114
114
  environmentConfig: EnvironmentConfigType;
115
115
  mergeStrategy: OverrideMergeStrategyType;
116
- };
116
+ }
117
117
  export interface DeploymentTemplateConfigCommonState extends SelectedChartDetailsType {
118
118
  /**
119
- * The first ever state of the deployment template on editor
119
+ * The first ever state of the deployment template
120
120
  */
121
121
  originalTemplate: Record<string, string>;
122
122
  isAppMetricsEnabled: boolean;
@@ -126,21 +126,6 @@ export interface DeploymentTemplateConfigCommonState extends SelectedChartDetail
126
126
  latestDraft?: DraftMetadataDTO;
127
127
  editorTemplate: string;
128
128
  editorTemplateWithoutLockedKeys: string;
129
- /**
130
- * This final template to be applied on the deployment in string format
131
- * In current editor, this may be null initially
132
- */
133
- mergedTemplate: string;
134
- /**
135
- * This final template to be applied on the deployment without locked keys in string format
136
- * In current editor, this may be null initially
137
- */
138
- mergedTemplateWithoutLockedKeys: string | null;
139
- /**
140
- * This final template to be applied on the deployment in object format
141
- * In current editor, this may be null initially
142
- */
143
- mergedTemplateObject: Record<string, string> | null;
144
129
  }
145
130
  export type DeploymentTemplateConfigState = DeploymentTemplateConfigCommonState & (BaseDeploymentTemplateConfigState | EnvironmentOverrideDeploymentTemplateConfigState);
146
131
  type DTApplicationMetricsReadOnlyProps = {
@@ -1,3 +1,2 @@
1
- import { OverrideStrategyTippyContentProps } from './types';
2
- declare const OverrideStrategyTippyContent: ({ children }: OverrideStrategyTippyContentProps) => JSX.Element;
1
+ declare const OverrideStrategyTippyContent: () => JSX.Element;
3
2
  export default OverrideStrategyTippyContent;
@@ -25,9 +25,3 @@ export declare enum ConfigToolbarPopupNodeType {
25
25
  DISCARD_DRAFT = "discardDraft",
26
26
  EDIT_HISTORY = "editHistory"
27
27
  }
28
- export interface OverrideStrategyTippyContentProps {
29
- /**
30
- * Would be rendered as li conveying the information about the merge strategy
31
- */
32
- children?: ReactNode;
33
- }
@@ -1,2 +1,2 @@
1
1
  import { DeploymentStageType } from '../../../../../Shared/constants';
2
- export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "-" | "deployment" | "pre-deployment" | "post-deployment";
2
+ export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "deployment" | "pre-deployment" | "post-deployment" | "-";
@@ -1,4 +1,3 @@
1
1
  export * from './GlobalConfigurations';
2
2
  export * from './ResourceBrowser';
3
3
  export * from './Applications';
4
- export * from './App';
@@ -1,11 +1,2 @@
1
- export interface CIPipelineSourceConfigInterface {
2
- sourceType: any;
3
- sourceValue: any;
4
- showTooltip?: boolean;
5
- showIcons?: boolean;
6
- baseText?: string;
7
- regex?: any;
8
- isRegex?: boolean;
9
- primaryBranchAfterRegex?: string;
10
- }
11
- export declare const CiPipelineSourceConfig: ({ sourceType, sourceValue, showTooltip, showIcons, baseText, regex, isRegex, primaryBranchAfterRegex, }: CIPipelineSourceConfigInterface) => JSX.Element;
1
+ import { CIPipelineSourceConfigInterface } from './types';
2
+ export declare const CiPipelineSourceConfig: ({ sourceType, sourceValue, showTooltip, showIcons, baseText, regex, isRegex, primaryBranchAfterRegex, rootClassName, }: CIPipelineSourceConfigInterface) => JSX.Element;
@@ -666,4 +666,15 @@ export type CreateMarkupPropsType = {
666
666
  export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
667
667
  export declare const terminalStatus: Set<string>;
668
668
  export declare const statusSet: Set<string>;
669
+ export interface CIPipelineSourceConfigInterface {
670
+ sourceType: string;
671
+ sourceValue: any;
672
+ showTooltip?: boolean;
673
+ showIcons?: boolean;
674
+ baseText?: string;
675
+ regex?: any;
676
+ isRegex?: boolean;
677
+ primaryBranchAfterRegex?: string;
678
+ rootClassName?: string;
679
+ }
669
680
  export {};
@@ -1,3 +1,3 @@
1
1
  import { GitCommitInfoGenericProps } from './types';
2
- declare const GitCommitInfoGeneric: ({ materialSourceType, materialSourceValue, commitInfo, selectedCommitInfo, materialUrl, showMaterialInfoHeader, canTriggerBuild, index, isExcluded, }: GitCommitInfoGenericProps) => JSX.Element;
2
+ declare const GitCommitInfoGeneric: ({ materialSourceType, materialSourceValue, commitInfo, selectedCommitInfo, materialUrl, showMaterialInfoHeader, index, isExcluded, }: GitCommitInfoGenericProps) => JSX.Element;
3
3
  export default GitCommitInfoGeneric;
@@ -2,7 +2,7 @@ import { ApiResponseResultType, SeveritiesDTO, GetResourceScanDetailsResponseTyp
2
2
  import { SEVERITIES } from './constants';
3
3
  export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
4
4
  color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
5
- label: "Critical" | "High" | "Medium" | "Low" | "Unknown" | "Failures" | "Successes" | "Exceptions";
5
+ label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
6
6
  value: number;
7
7
  }[];
8
8
  export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
@@ -41,4 +41,3 @@ export * from './Collapse';
41
41
  export * from './Security';
42
42
  export * from './Button';
43
43
  export * from './InvalidYAMLTippy';
44
- export * from './EnterpriseTag';
@@ -1,6 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { Pair } from 'yaml';
3
- import { StrictRJSFSchema } from '@rjsf/utils';
3
+ import { MaterialHistoryType } from '@Shared/Services/app.types';
4
4
  import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
5
5
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
6
6
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
@@ -65,9 +65,16 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
65
65
  */
66
66
  export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
67
67
  /**
68
- * This function returns a null/zero value corresponding to @type
69
- *
70
- * @param type - a RJSF supported type
68
+ * @description - Function to get the lower case object
69
+ * @param input - The input object
70
+ * @returns Record<string, any>
71
+ */
72
+ export declare const getLowerCaseObject: (input: any) => Record<string, any>;
73
+ /**
74
+ * @description - Function to get the webhook date
75
+ * @param materialSourceType - The type of material source (e.g., WEBHOOK)
76
+ * @param history - The history object containing commit information
77
+ * @returns - Formatted webhook date if available, otherwise an empty string
71
78
  */
72
- export declare const getNullValueFromType: (type: StrictRJSFSchema["type"]) => any;
79
+ export declare const getWebhookDate: (materialSourceType: string, history: MaterialHistoryType) => string;
73
80
  export {};
@@ -12,7 +12,7 @@ interface MaterialHistoryDTO {
12
12
  Changes: unknown[];
13
13
  WebhookData: WebhookDataType;
14
14
  }
15
- interface MaterialHistoryType {
15
+ export interface MaterialHistoryType {
16
16
  commitURL: string;
17
17
  commit: MaterialHistoryDTO['Commit'];
18
18
  author: MaterialHistoryDTO['Author'];
@@ -56,6 +56,7 @@ export interface CIMaterialType extends Pick<CIMaterialDTO, 'id' | 'gitMaterialI
56
56
  gitURL: CIMaterialDTO['url'];
57
57
  history: MaterialHistoryType[];
58
58
  isSelected: boolean;
59
+ gitMaterialUrl?: string;
59
60
  }
60
61
  interface ImageCommentDTO {
61
62
  id: number;
@@ -414,3 +414,6 @@ export declare const TRIGGER_STATUS_PROGRESSING: string[];
414
414
  export declare const CONFIGURATION_TYPE_VALUES: ConfigurationType[];
415
415
  export declare const DEFAULT_LOCKED_KEYS_CONFIG: Readonly<ConfigKeysWithLockType>;
416
416
  export declare const ALL_RESOURCE_KIND_FILTER = "all";
417
+ export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
418
+ export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
419
+ export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";