@devtron-labs/devtron-fe-common-lib 1.9.5-beta-9 → 1.9.5-beta-11

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 (40) hide show
  1. package/dist/{@code-editor-C0e1IoNR.js → @code-editor-BldKWPY3.js} +6377 -6337
  2. package/dist/{@common-rjsf-C2tT-Yzm.js → @common-rjsf-Br707-T1.js} +2 -2
  3. package/dist/{@framer-motion-BMix-3PQ.js → @framer-motion-Cx1gSa6-.js} +893 -972
  4. package/dist/{@react-dates-FNIvOaO3.js → @react-dates-ukcBEyJ1.js} +1 -1
  5. package/dist/{@react-select-BAjvyAuv.js → @react-select-Cas7oOFN.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-DDmpdscl.js → @react-virtualized-sticky-tree-DRihF7_6.js} +1 -1
  7. package/dist/{@vendor-C56_0-C8.js → @vendor-xG1dUtf3.js} +13079 -12759
  8. package/dist/Common/API/types.d.ts +1 -1
  9. package/dist/Common/Constants.d.ts +2 -0
  10. package/dist/Common/Types.d.ts +4 -0
  11. package/dist/Shared/Components/CountrySelect/CountrySelect.component.d.ts +3 -0
  12. package/dist/Shared/Components/CountrySelect/index.d.ts +1 -0
  13. package/dist/Shared/Components/CountrySelect/types.d.ts +7 -0
  14. package/dist/Shared/Components/CountrySelect/utils.d.ts +4 -0
  15. package/dist/Shared/Components/CustomInput/CustomInput.d.ts +1 -1
  16. package/dist/Shared/Components/CustomInput/types.d.ts +5 -1
  17. package/dist/Shared/Components/DevtronLicenseCard/DevtronLicenseCard.d.ts +1 -1
  18. package/dist/Shared/Components/DevtronLicenseCard/index.d.ts +2 -1
  19. package/dist/Shared/Components/DevtronLicenseCard/types.d.ts +17 -3
  20. package/dist/Shared/Components/DevtronLicenseCard/utils.d.ts +2 -1
  21. package/dist/Shared/Components/FlagImage/FlagImage.component.d.ts +3 -0
  22. package/dist/Shared/Components/FlagImage/index.d.ts +1 -0
  23. package/dist/Shared/Components/FlagImage/types.d.ts +5 -0
  24. package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +1 -1
  25. package/dist/Shared/Components/FormFieldWrapper/index.d.ts +1 -0
  26. package/dist/Shared/Components/FormFieldWrapper/types.d.ts +4 -0
  27. package/dist/Shared/Components/Icon/Icon.d.ts +1 -0
  28. package/dist/Shared/Components/LoginBanner/constants.d.ts +1 -3
  29. package/dist/Shared/Components/PhoneInput/PhoneInput.component.d.ts +3 -0
  30. package/dist/Shared/Components/PhoneInput/index.d.ts +1 -0
  31. package/dist/Shared/Components/PhoneInput/types.d.ts +11 -0
  32. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  33. package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
  34. package/dist/Shared/Components/index.d.ts +3 -0
  35. package/dist/Shared/Helpers.d.ts +2 -2
  36. package/dist/Shared/types.d.ts +2 -18
  37. package/dist/assets/ic-caret-left.3df25a7c.svg +3 -0
  38. package/dist/index.js +699 -695
  39. package/package.json +2 -1
  40. package/dist/Shared/Components/DevtronLicenseCard/InstallationFingerprintInfo.d.ts +0 -3
@@ -18,6 +18,6 @@ export interface FetchInTimeParamsType<Data = object> {
18
18
  options?: APIOptions;
19
19
  isMultipartRequest?: boolean;
20
20
  }
21
- export interface FetchAPIParamsType<Data = object> extends Omit<FetchInTimeParamsType<Data>, 'options'>, Pick<APIOptions, 'preventAutoLogout' | 'preventLicenseRedirect'> {
21
+ export interface FetchAPIParamsType<Data = object> extends Omit<FetchInTimeParamsType<Data>, 'options'>, Pick<APIOptions, 'preventAutoLogout' | 'preventLicenseRedirect' | 'shouldParseServerErrorForUnauthorizedUser'> {
22
22
  signal: AbortSignal;
23
23
  }
@@ -1,6 +1,7 @@
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/";
4
5
  export declare const DOCUMENTATION_VERSION = "/v/v0.7";
5
6
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
6
7
  export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
@@ -282,6 +283,7 @@ export declare const API_STATUS_CODES: {
282
283
  PERMISSION_DENIED: number;
283
284
  NOT_FOUND: number;
284
285
  REQUEST_TIMEOUT: number;
286
+ CONFLICT: number;
285
287
  EXPECTATION_FAILED: number;
286
288
  UNPROCESSABLE_ENTITY: number;
287
289
  LOCKED: number;
@@ -38,6 +38,10 @@ export interface APIOptions {
38
38
  * @default false
39
39
  */
40
40
  preventLicenseRedirect?: boolean;
41
+ /**
42
+ * @default false
43
+ */
44
+ shouldParseServerErrorForUnauthorizedUser?: boolean;
41
45
  }
42
46
  export interface OptionType<T = string, K = string> {
43
47
  value: T;
@@ -0,0 +1,3 @@
1
+ import { CountrySelectProps } from './types';
2
+ declare const CountrySelect: ({ selectedCountry, label, required, error, handleChange, placeholder, name, variant, size, onMenuClose, onMenuOpen, }: CountrySelectProps) => JSX.Element;
3
+ export default CountrySelect;
@@ -0,0 +1 @@
1
+ export { default as CountrySelect } from './CountrySelect.component';
@@ -0,0 +1,7 @@
1
+ import { CountryISO2Type } from '../../index';
2
+ import { SelectPickerProps } from '../SelectPicker';
3
+ export interface CountrySelectProps extends Pick<SelectPickerProps, 'required' | 'label' | 'error' | 'placeholder' | 'size' | 'onMenuOpen' | 'onMenuClose'>, Required<Pick<SelectPickerProps, 'name'>> {
4
+ selectedCountry: CountryISO2Type;
5
+ handleChange: (iso2: CountryISO2Type) => void;
6
+ variant?: 'default' | 'selectPhoneCode';
7
+ }
@@ -0,0 +1,4 @@
1
+ import { ParsedCountry } from 'react-international-phone';
2
+ import { CountrySelectProps } from './types';
3
+ import { SelectPickerOptionType } from '../SelectPicker';
4
+ export declare const getCountryOptions: (variant: CountrySelectProps["variant"]) => SelectPickerOptionType<ParsedCountry>[];
@@ -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, ...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, inputRef: inputRefProp, hideFormFieldInfo, ...props }: CustomInputProps) => JSX.Element;
3
3
  export default CustomInput;
@@ -1,4 +1,4 @@
1
- import { InputHTMLAttributes } from 'react';
1
+ import { InputHTMLAttributes, MutableRefObject } from 'react';
2
2
  import { ComponentSizeType } from '../../constants';
3
3
  import { FormFieldWrapperProps } from '../FormFieldWrapper';
4
4
  import { ButtonComponentType, ButtonProps } from '../Button';
@@ -27,6 +27,10 @@ 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>;
30
34
  }
31
35
  export interface PasswordFieldProps extends Omit<CustomInputProps, 'endIconButtonConfig' | 'type'> {
32
36
  /**
@@ -1,3 +1,3 @@
1
- import { DevtronLicenseCardProps } from '../../index';
1
+ import { DevtronLicenseCardProps } from './types';
2
2
  export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, ttl, }: DevtronLicenseCardProps) => JSX.Element;
3
3
  export default DevtronLicenseCard;
@@ -1,2 +1,3 @@
1
1
  export { default as DevtronLicenseCard } from './DevtronLicenseCard';
2
- export { default as InstallationFingerprintInfo } from './InstallationFingerprintInfo';
2
+ export { parseDevtronLicenseDTOIntoLicenseCardData } from './utils';
3
+ export * from './types';
@@ -1,4 +1,18 @@
1
- import { DevtronLicenseBaseDTO } from '../../index';
2
- export interface InstallFingerprintInfoProps extends Pick<DevtronLicenseBaseDTO, 'fingerprint'> {
3
- showHelpTooltip?: boolean;
1
+ export declare enum LicenseStatus {
2
+ ACTIVE = "ACTIVE",
3
+ EXPIRED = "EXPIRED",
4
+ REMINDER_THRESHOLD_REACHED = "REMINDER_THRESHOLD_REACHED"
4
5
  }
6
+ export type DevtronLicenseCardProps = {
7
+ enterpriseName: string;
8
+ expiryDate: string;
9
+ ttl: number;
10
+ licenseStatus: LicenseStatus;
11
+ isTrial: boolean;
12
+ } & ({
13
+ licenseKey: string;
14
+ licenseSuffix?: never;
15
+ } | {
16
+ licenseKey?: never;
17
+ licenseSuffix: string;
18
+ });
@@ -1,5 +1,6 @@
1
- import { LicenseStatus } from '../../index';
1
+ import { DevtronLicenseCardProps, DevtronLicenseDTO, LicenseStatus } from '../../index';
2
2
  export declare const getLicenseColorsAccordingToStatus: (licenseStatus: LicenseStatus) => {
3
3
  bgColor: string;
4
4
  textColor: string;
5
5
  };
6
+ export declare const parseDevtronLicenseDTOIntoLicenseCardData: <isCentralDashboard extends boolean = false>(licenseDTO: DevtronLicenseDTO<isCentralDashboard>, currentUserEmail?: isCentralDashboard extends true ? string : never) => DevtronLicenseCardProps;
@@ -0,0 +1,3 @@
1
+ import { FlagImageProps } from './types';
2
+ declare const FlagImage: ({ country, size }: FlagImageProps) => JSX.Element;
3
+ export default FlagImage;
@@ -0,0 +1 @@
1
+ export { default as FlagImage } from './FlagImage.component';
@@ -0,0 +1,5 @@
1
+ import { CountryISO2Type } from '../../index';
2
+ export interface FlagImageProps {
3
+ country: CountryISO2Type;
4
+ size?: number;
5
+ }
@@ -1,3 +1,3 @@
1
1
  import { FormFieldWrapperProps } from './types';
2
- declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, }: Required<FormFieldWrapperProps>) => JSX.Element;
2
+ declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, }: Omit<Required<FormFieldWrapperProps>, "hideFormFieldInfo"> & Pick<FormFieldWrapperProps, "hideFormFieldInfo">) => JSX.Element;
3
3
  export default FormFieldWrapper;
@@ -1,3 +1,4 @@
1
1
  export { default as FormFieldWrapper } from './FormFieldWrapper';
2
2
  export type { FormFieldWrapperProps } from './types';
3
3
  export { getFormFieldAriaAttributes } from './utils';
4
+ export { default as FormFieldInfo } from './FormFieldInfo';
@@ -64,4 +64,8 @@ export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label'
64
64
  children: ReactElement;
65
65
  borderRadiusConfig?: BorderConfigType;
66
66
  borderConfig?: BorderConfigType;
67
+ /**
68
+ * @default false
69
+ */
70
+ hideFormFieldInfo?: boolean;
67
71
  }
@@ -11,6 +11,7 @@ export declare const iconMap: {
11
11
  'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
12
12
  'ic-calendar': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
13
13
  'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
14
+ 'ic-caret-left': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
14
15
  'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
15
16
  'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
16
17
  'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -1,4 +1,2 @@
1
1
  import { TestimonialCardConfig } from './types';
2
- export declare const TESTIMONIAL_CARD_DATA: TestimonialCardConfig[];
3
- export declare const TESTIMONIAL_CARD_INTERVAL = 5000;
4
- export declare const TRANSITION_EASE_CURVE: number[];
2
+ export declare const TESTIMONIAL_CARD_DATA: TestimonialCardConfig;
@@ -0,0 +1,3 @@
1
+ import { PhoneInputProps } from './types';
2
+ declare const PhoneInput: ({ error, onChange, required, phoneNumberInputName, countryCodeSelectName, phoneValue, countryCodeSelectSize, }: PhoneInputProps) => JSX.Element;
3
+ export default PhoneInput;
@@ -0,0 +1 @@
1
+ export { default as PhoneInput } from './PhoneInput.component';
@@ -0,0 +1,11 @@
1
+ import { ComponentProps } from 'react';
2
+ import { CountrySelect } from '../CountrySelect';
3
+ export interface PhoneInputProps {
4
+ phoneValue: string;
5
+ onChange: (value: string, hasCountryChanged: boolean) => void;
6
+ error?: string | null;
7
+ countryCodeSelectName: string;
8
+ phoneNumberInputName: string;
9
+ required?: boolean;
10
+ countryCodeSelectSize?: ComponentProps<typeof CountrySelect>['size'];
11
+ }
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
134
134
  * />
135
135
  * ```
136
136
  */
137
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
137
+ declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
138
138
  export default SelectPicker;
@@ -1,3 +1,3 @@
1
1
  import { TextareaProps } from './types';
2
- declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, value, borderConfig, ...props }: TextareaProps) => JSX.Element;
2
+ declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, hideFormFieldInfo, value, borderConfig, ...props }: TextareaProps) => JSX.Element;
3
3
  export default Textarea;
@@ -68,6 +68,9 @@ export * from './InfoBlock';
68
68
  export * from './CodeEditorWrapper';
69
69
  export * from './SSOProviderIcon';
70
70
  export * from './Backdrop';
71
+ export * from './CountrySelect';
72
+ export * from './PhoneInput';
73
+ export * from './FlagImage';
71
74
  export * from './DevtronLicenseCard';
72
75
  export * from './LoginBanner';
73
76
  export * from './Confetti';
@@ -4,7 +4,7 @@ import { Pair } from 'yaml';
4
4
  import { StrictRJSFSchema } from '@rjsf/utils';
5
5
  import { MaterialHistoryType } from '@Shared/Services/app.types';
6
6
  import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
7
- import { BorderConfigType, DevtronLicenseCardProps, DevtronLicenseDTO, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
7
+ import { BorderConfigType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
8
8
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
9
9
  interface HighlightSearchTextProps {
10
10
  /**
@@ -100,5 +100,5 @@ 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 parseDevtronLicenseDTOIntoLicenseCardData: <isCentralDashboard extends boolean = false>(licenseDTO: DevtronLicenseDTO<isCentralDashboard>, currentUserEmail?: isCentralDashboard extends true ? string : never) => DevtronLicenseCardProps;
103
+ export declare const clearCookieOnLogout: () => void;
104
104
  export {};
@@ -1,5 +1,6 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
3
+ import { ParsedCountry } from 'react-international-phone';
3
4
  import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
4
5
  import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
5
6
  import { SelectPickerOptionType } from './Components';
@@ -906,22 +907,5 @@ export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = Devt
906
907
  } : {
907
908
  claimedByUserDetails?: never;
908
909
  });
909
- export declare enum LicenseStatus {
910
- ACTIVE = "ACTIVE",
911
- EXPIRED = "EXPIRED",
912
- REMINDER_THRESHOLD_REACHED = "REMINDER_THRESHOLD_REACHED"
913
- }
914
- export type DevtronLicenseCardProps = {
915
- enterpriseName: string;
916
- expiryDate: string;
917
- ttl: number;
918
- licenseStatus: LicenseStatus;
919
- isTrial: boolean;
920
- } & ({
921
- licenseKey: string;
922
- licenseSuffix?: never;
923
- } | {
924
- licenseKey?: never;
925
- licenseSuffix: string;
926
- });
910
+ export type CountryISO2Type = ParsedCountry['iso2'];
927
911
  export {};
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
2
+ <path stroke="#3B444C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 19.5 7.5 12 15 4.5" vector-effect="non-scaling-stroke"/>
3
+ </svg>