@devtron-labs/devtron-fe-common-lib 1.9.5-beta-3 → 1.9.5

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 (68) hide show
  1. package/dist/{@code-editor-CWmHyowW.js → @code-editor-CoSgddEi.js} +6531 -6952
  2. package/dist/{@common-rjsf-BxmWuuRy.js → @common-rjsf-CI9-gpwf.js} +2 -2
  3. package/dist/{@framer-motion-Cx1gSa6-.js → @framer-motion-FKAND_5t.js} +1 -1
  4. package/dist/{@react-dates-ukcBEyJ1.js → @react-dates-Cc7UHR4b.js} +1 -1
  5. package/dist/{@react-select-Cas7oOFN.js → @react-select-45zYr11O.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-DRihF7_6.js → @react-virtualized-sticky-tree-Du399kou.js} +1 -1
  7. package/dist/{@vendor-xG1dUtf3.js → @vendor-CSolG4o7.js} +12758 -13079
  8. package/dist/Common/Api.d.ts +15 -0
  9. package/dist/Common/Constants.d.ts +0 -4
  10. package/dist/Common/Helper.d.ts +0 -1
  11. package/dist/Common/Types.d.ts +0 -7
  12. package/dist/Common/index.d.ts +1 -1
  13. package/dist/Shared/Components/CustomInput/CustomInput.d.ts +1 -1
  14. package/dist/Shared/Components/CustomInput/types.d.ts +1 -5
  15. package/dist/Shared/Components/Header/types.d.ts +1 -0
  16. package/dist/Shared/Components/Icon/Icon.d.ts +0 -9
  17. package/dist/Shared/Components/index.d.ts +0 -6
  18. package/dist/Shared/Helpers.d.ts +0 -1
  19. package/dist/Shared/Providers/types.d.ts +1 -1
  20. package/dist/Shared/constants.d.ts +0 -3
  21. package/dist/Shared/types.d.ts +0 -33
  22. package/dist/assets/@code-editor.css +1 -1
  23. package/dist/assets/ic-azure.f469b426.svg +39 -0
  24. package/dist/assets/ic-dockerhub.ae468451.svg +19 -0
  25. package/dist/assets/ic-ecr.1701dc23.svg +25 -0
  26. package/dist/assets/ic-google-artifact-registry.73ff5bb0.svg +25 -0
  27. package/dist/assets/ic-google-container-registry.815ede09.svg +25 -0
  28. package/dist/assets/ic-quay.84004841.svg +27 -0
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +765 -780
  31. package/package.json +1 -2
  32. package/dist/Common/API/CoreAPI.d.ts +0 -17
  33. package/dist/Common/API/constants.d.ts +0 -70
  34. package/dist/Common/API/index.d.ts +0 -3
  35. package/dist/Common/API/types.d.ts +0 -23
  36. package/dist/Common/API/utils.d.ts +0 -12
  37. package/dist/Shared/Components/CountrySelect/CountrySelect.component.d.ts +0 -3
  38. package/dist/Shared/Components/CountrySelect/index.d.ts +0 -1
  39. package/dist/Shared/Components/CountrySelect/types.d.ts +0 -7
  40. package/dist/Shared/Components/CountrySelect/utils.d.ts +0 -4
  41. package/dist/Shared/Components/DevtronLicenseCard/DevtronLicenseCard.d.ts +0 -3
  42. package/dist/Shared/Components/DevtronLicenseCard/index.d.ts +0 -3
  43. package/dist/Shared/Components/DevtronLicenseCard/types.d.ts +0 -18
  44. package/dist/Shared/Components/DevtronLicenseCard/utils.d.ts +0 -6
  45. package/dist/Shared/Components/FlagImage/FlagImage.component.d.ts +0 -3
  46. package/dist/Shared/Components/FlagImage/index.d.ts +0 -1
  47. package/dist/Shared/Components/FlagImage/types.d.ts +0 -5
  48. package/dist/Shared/Components/LoginBanner/LoginBanner.d.ts +0 -2
  49. package/dist/Shared/Components/LoginBanner/constants.d.ts +0 -2
  50. package/dist/Shared/Components/LoginBanner/index.d.ts +0 -1
  51. package/dist/Shared/Components/LoginBanner/types.d.ts +0 -7
  52. package/dist/Shared/Components/PhoneInput/PhoneInput.component.d.ts +0 -3
  53. package/dist/Shared/Components/PhoneInput/index.d.ts +0 -1
  54. package/dist/Shared/Components/PhoneInput/types.d.ts +0 -11
  55. package/dist/assets/ic-azure.49ec3dad.svg +0 -23
  56. package/dist/assets/ic-book-open.e839bbda.svg +0 -3
  57. package/dist/assets/ic-caret-left.3df25a7c.svg +0 -3
  58. package/dist/assets/ic-chat-circle-dots.b5afd171.svg +0 -3
  59. package/dist/assets/ic-devtron-header-logo.7dc157aa.svg +0 -4
  60. package/dist/assets/ic-devtron.aca6cbaa.svg +0 -3
  61. package/dist/assets/ic-dockerhub.19023887.svg +0 -3
  62. package/dist/assets/ic-ecr.022619e3.svg +0 -9
  63. package/dist/assets/ic-google-artifact-registry.536fe6c7.svg +0 -18
  64. package/dist/assets/ic-google-container-registry.20eeef45.svg +0 -19
  65. package/dist/assets/ic-key.56432553.svg +0 -19
  66. package/dist/assets/ic-quay.19eb5574.svg +0 -11
  67. package/dist/assets/ic-quote.68f093fe.svg +0 -3
  68. package/dist/assets/ic-timer.ae5f10fa.svg +0 -19
@@ -0,0 +1,15 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { ResponseType, APIOptions } from './Types';
3
+ export declare const post: <T = any, K = object>(url: string, data: K, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType<T>>;
4
+ export declare const put: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
5
+ export declare const patch: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
6
+ export declare const get: <T = any>(url: string, options?: APIOptions) => Promise<ResponseType<T>>;
7
+ export declare const trash: <T = any, K = object>(url: string, data?: K, options?: APIOptions) => Promise<ResponseType<T>>;
8
+ /**
9
+ * Aborts the previous request before triggering next request
10
+ */
11
+ export declare const abortPreviousRequests: <T>(callback: () => Promise<T>, abortControllerRef: MutableRefObject<AbortController>) => Promise<T>;
12
+ /**
13
+ * Returns true if the error is due to a aborted request
14
+ */
15
+ export declare const getIsRequestAborted: (error: any) => boolean;
@@ -1,7 +1,6 @@
1
1
  export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
2
2
  export declare const Host: string;
3
3
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
4
- export declare const DEVTRON_HOME_PAGE = "https://devtron.ai/";
5
4
  export declare const DOCUMENTATION_VERSION = "/v/v0.7";
6
5
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
7
6
  export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
@@ -61,7 +60,6 @@ export declare const URLS: {
61
60
  RESOURCE_BROWSER: string;
62
61
  COMPARE_CLUSTERS: string;
63
62
  CONFIG_DRIFT: string;
64
- LICENSE_AUTH: string;
65
63
  };
66
64
  export declare const ROUTES: {
67
65
  APP: string;
@@ -283,7 +281,6 @@ export declare const API_STATUS_CODES: {
283
281
  PERMISSION_DENIED: number;
284
282
  NOT_FOUND: number;
285
283
  REQUEST_TIMEOUT: number;
286
- CONFLICT: number;
287
284
  EXPECTATION_FAILED: number;
288
285
  UNPROCESSABLE_ENTITY: number;
289
286
  LOCKED: number;
@@ -315,7 +312,6 @@ export declare const DATE_TIME_FORMATS: {
315
312
  TWELVE_HOURS_EXPORT_FORMAT: string;
316
313
  DD_MMM_YYYY_HH_MM: string;
317
314
  DD_MMM_YYYY: string;
318
- 'DD/MM/YYYY': string;
319
315
  };
320
316
  export declare const SEMANTIC_VERSION_DOCUMENTATION_LINK = "https://semver.org/";
321
317
  export declare const VULNERABILITIES_SORT_PRIORITY: {
@@ -143,5 +143,4 @@ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) =>
143
143
  * @returns SHA-256 hashed value
144
144
  */
145
145
  export declare const getHashedValue: (value: string) => Promise<string | null>;
146
- export declare const getTTLInHumanReadableFormat: (ttl: number) => string;
147
146
  export {};
@@ -30,14 +30,7 @@ export interface APIOptions {
30
30
  */
31
31
  signal?: AbortSignal;
32
32
  abortControllerRef?: MutableRefObject<AbortController>;
33
- /**
34
- * @default false
35
- */
36
33
  preventAutoLogout?: boolean;
37
- /**
38
- * @default false
39
- */
40
- preventLicenseRedirect?: boolean;
41
34
  }
42
35
  export interface OptionType<T = string, K = string> {
43
36
  value: T;
@@ -1,6 +1,7 @@
1
1
  export * from './Constants';
2
2
  export * from './ServerError';
3
3
  export * from './Types';
4
+ export * from './Api';
4
5
  export { default as Reload } from './Reload';
5
6
  export { default as ErrorScreenManager } from './ErrorScreenManager';
6
7
  export { default as ErrorScreenNotAuthorized } from './ErrorScreenNotAuthorized';
@@ -49,5 +50,4 @@ export * from './SegmentedBarChart';
49
50
  export * from './CodeEditor/types';
50
51
  export * from './Tooltip';
51
52
  export * from './SegmentedControl';
52
- export * from './API';
53
53
  export * from './DeleteCINodeButton';
@@ -1,3 +1,3 @@
1
1
  import { CustomInputProps } from './types';
2
- declare const CustomInput: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderConfig, borderRadiusConfig, type, autoFocus, endIconButtonConfig, labelTippyCustomizedConfig, labelTooltipConfig, inputRef: inputRefProp, ...props }: CustomInputProps) => JSX.Element;
2
+ declare const CustomInput: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderConfig, borderRadiusConfig, type, autoFocus, endIconButtonConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...props }: CustomInputProps) => JSX.Element;
3
3
  export default CustomInput;
@@ -1,4 +1,4 @@
1
- import { InputHTMLAttributes, MutableRefObject } from 'react';
1
+ import { InputHTMLAttributes } from 'react';
2
2
  import { ComponentSizeType } from '../../constants';
3
3
  import { FormFieldWrapperProps } from '../FormFieldWrapper';
4
4
  import { ButtonComponentType, ButtonProps } from '../Button';
@@ -27,10 +27,6 @@ export interface CustomInputProps extends Omit<FormFieldWrapperProps, 'children'
27
27
  * End icon button configuration
28
28
  */
29
29
  endIconButtonConfig?: Required<Pick<ButtonProps<ButtonComponentType.button>, 'icon' | 'onClick' | 'ariaLabel'>> & Pick<ButtonProps<ButtonComponentType.button>, 'disabled' | 'showAriaLabelInTippy' | 'style'>;
30
- /**
31
- * Ref for the input element
32
- */
33
- inputRef?: MutableRefObject<HTMLInputElement>;
34
30
  }
35
31
  export interface PasswordFieldProps extends Omit<CustomInputProps, 'endIconButtonConfig' | 'type'> {
36
32
  /**
@@ -46,4 +46,5 @@ export interface HelpOptionType {
46
46
  name: string;
47
47
  link: string;
48
48
  icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
49
+ showSeparator?: boolean;
49
50
  }
@@ -6,14 +6,10 @@ export declare const iconMap: {
6
6
  'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
7
7
  'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
8
8
  'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
- 'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
10
9
  'ic-browser': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
11
10
  'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
12
- 'ic-calendar': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
13
11
  'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
14
- 'ic-caret-left': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
15
12
  'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
16
- 'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
17
13
  'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
18
14
  'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
19
15
  'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -24,8 +20,6 @@ export declare const iconMap: {
24
20
  'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
25
21
  'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
26
22
  'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
27
- 'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
28
- 'ic-devtron': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
29
23
  'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
30
24
  'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
31
25
  'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -50,7 +44,6 @@ export declare const iconMap: {
50
44
  'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
51
45
  'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
52
46
  'ic-k8s-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
53
- 'ic-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
54
47
  'ic-ldap': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
55
48
  'ic-login-devtron-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
56
49
  'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -66,13 +59,11 @@ export declare const iconMap: {
66
59
  'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
67
60
  'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
68
61
  'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
69
- 'ic-quote': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
70
62
  'ic-shield-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
71
63
  'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
72
64
  'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
73
65
  'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
74
66
  'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
75
- 'ic-timer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
76
67
  'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
77
68
  'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
78
69
  'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -67,10 +67,4 @@ export * from './CustomInput';
67
67
  export * from './InfoBlock';
68
68
  export * from './CodeEditorWrapper';
69
69
  export * from './SSOProviderIcon';
70
- export * from './Backdrop';
71
- export * from './CountrySelect';
72
- export * from './PhoneInput';
73
- export * from './FlagImage';
74
- export * from './DevtronLicenseCard';
75
- export * from './LoginBanner';
76
70
  export * from './Confetti';
@@ -100,5 +100,4 @@ export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig
100
100
  borderRadiusConfig: BorderConfigType | undefined;
101
101
  }) => string;
102
102
  export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, topClassName?: string) => string;
103
- export declare const clearCookieOnLogout: () => void;
104
103
  export {};
@@ -5,6 +5,7 @@ export interface MainContext {
5
5
  serverMode: SERVER_MODE;
6
6
  setServerMode: (serverMode: SERVER_MODE) => void;
7
7
  isHelpGettingStartedClicked: boolean;
8
+ setPageOverflowEnabled: (isPageOverflowEnabled: boolean) => void;
8
9
  showCloseButtonAfterGettingStartedClicked: () => void;
9
10
  loginCount: number;
10
11
  setLoginCount: (loginCount: number) => void;
@@ -38,7 +39,6 @@ export interface MainContext {
38
39
  isManifestScanningEnabled: boolean;
39
40
  canOnlyViewPermittedEnvOrgLevel: boolean;
40
41
  viewIsPipelineRBACConfiguredNode: ReactNode;
41
- handleOpenLicenseInfoDialog: () => void;
42
42
  }
43
43
  export interface MainContextProviderProps {
44
44
  children: ReactNode;
@@ -408,8 +408,6 @@ export declare const DC_DELETE_SUBTITLES: {
408
408
  DELETE_ENVIRONMENT_SUBTITLE: string;
409
409
  DELETE_CLUSTER_SUBTITLES: string;
410
410
  };
411
- export declare const EULA_LINK = "https://devtron.ai/end-user-license-agreement-eula";
412
- export declare const CONTACT_SUPPORT_LINK = "https://share.hsforms.com/1Yp3bvPAaRCaHUEH5vtMjEQ4368n";
413
411
  export declare const enum DeleteComponentsName {
414
412
  Cluster = "cluster",
415
413
  Job = "job pipeline",
@@ -419,4 +417,3 @@ export declare const Routes: {
419
417
  CI_PIPELINE_PATCH: string;
420
418
  WORKFLOW: string;
421
419
  };
422
- export declare const ENTERPRISE_SUPPORT_LINK = "enterprise@devtron.ai";
@@ -1,6 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
3
- import { ParsedCountry } from 'react-international-phone';
4
3
  import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
5
4
  import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
6
5
  import { SelectPickerOptionType } from './Components';
@@ -876,36 +875,4 @@ export interface AppEnvIdType {
876
875
  appId: number;
877
876
  envId: number;
878
877
  }
879
- export interface DevtronLicenseBaseDTO {
880
- fingerprint: string | null;
881
- isTrial: boolean | null;
882
- /**
883
- * In timestamp format
884
- */
885
- expiry: string | null;
886
- /**
887
- * Can be negative, depicts time left in seconds for license to expire
888
- */
889
- ttl: number | null;
890
- /**
891
- * Show a reminder after these many DAYS left for license to expire, i.e,
892
- * Show if `ttl` is less than `reminderThreshold` [converted to seconds]
893
- */
894
- reminderThreshold: number | null;
895
- organisationMetadata: {
896
- name: string | null;
897
- domain: string | null;
898
- } | null;
899
- license: string | null;
900
- }
901
- export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = DevtronLicenseBaseDTO & (isCentralDashboard extends true ? {
902
- claimedByUserDetails: {
903
- firstName: string | null;
904
- lastName: string | null;
905
- email: string | null;
906
- } | null;
907
- } : {
908
- claimedByUserDetails?: never;
909
- });
910
- export type CountryISO2Type = ParsedCountry['iso2'];
911
878
  export {};