@devtron-labs/devtron-fe-common-lib 0.0.83-beta-4 → 0.0.83-beta-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 (50) hide show
  1. package/dist/Common/BreadCrumb/BreadcrumbStore.d.ts +2 -0
  2. package/dist/Common/BreadCrumb/Types.d.ts +4 -0
  3. package/dist/Common/Helper.d.ts +0 -1
  4. package/dist/Common/Hooks/index.d.ts +0 -1
  5. package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -1
  6. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  7. package/dist/Common/SearchBar/types.d.ts +2 -2
  8. package/dist/Common/Types.d.ts +6 -25
  9. package/dist/Common/index.d.ts +1 -1
  10. package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +1 -1
  11. package/dist/Shared/Components/APIResponseHandler/types.d.ts +2 -7
  12. package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +1 -1
  13. package/dist/Shared/Components/ButtonWithSelector/types.d.ts +0 -1
  14. package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +3 -0
  15. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +4 -0
  16. package/dist/Shared/Components/FeatureDescription/constant.d.ts +8 -0
  17. package/dist/Shared/Components/FeatureDescription/index.d.ts +2 -0
  18. package/dist/Shared/Components/FeatureDescription/types.d.ts +20 -0
  19. package/dist/Shared/Components/FeatureDescription/utils.d.ts +6 -0
  20. package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
  21. package/dist/Shared/Components/FilterChips/types.d.ts +3 -11
  22. package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -1
  23. package/dist/Shared/Components/GenericSectionErrorState/index.d.ts +0 -1
  24. package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +0 -6
  25. package/dist/Shared/Components/ReactSelect/constants.d.ts +14 -0
  26. package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
  27. package/dist/Shared/Components/index.d.ts +1 -0
  28. package/dist/Shared/Helpers.d.ts +2 -4
  29. package/dist/assets/index.css +1 -1
  30. package/dist/{cssMode-f7b87c99.js → cssMode-4fb0fb57.js} +1 -1
  31. package/dist/{freemarker2-c91ffd2a.js → freemarker2-a07e286e.js} +1 -1
  32. package/dist/{handlebars-d705dd00.js → handlebars-d8394f50.js} +1 -1
  33. package/dist/{html-367565c2.js → html-1532e3db.js} +1 -1
  34. package/dist/{htmlMode-6812ba8c.js → htmlMode-93d3466d.js} +1 -1
  35. package/dist/{index-46736d90.js → index-3a01c17f.js} +15142 -14982
  36. package/dist/index.js +297 -297
  37. package/dist/{javascript-3456abb1.js → javascript-cc5156d0.js} +1 -1
  38. package/dist/{jsonMode-3996d33e.js → jsonMode-cf49f29f.js} +1 -1
  39. package/dist/{liquid-b4808ab4.js → liquid-0d45e53f.js} +1 -1
  40. package/dist/{mdx-e04c4e91.js → mdx-a11ed205.js} +1 -1
  41. package/dist/{python-91064e76.js → python-fb0a9738.js} +1 -1
  42. package/dist/{razor-64d99cc8.js → razor-7d5d00f6.js} +1 -1
  43. package/dist/{tsMode-02459dfe.js → tsMode-17e25ab7.js} +1 -1
  44. package/dist/{typescript-1b88bae8.js → typescript-b0f4281c.js} +1 -1
  45. package/dist/{xml-3a2a7c9f.js → xml-c977340d.js} +1 -1
  46. package/dist/{yaml-2ca7aab0.js → yaml-bba74a3e.js} +1 -1
  47. package/package.json +1 -1
  48. package/dist/Common/Hooks/useStateFilters/index.d.ts +0 -2
  49. package/dist/Common/Hooks/useStateFilters/types.d.ts +0 -6
  50. package/dist/Common/Hooks/useStateFilters/useStateFilters.d.ts +0 -17
@@ -1,5 +1,7 @@
1
+ import { BreadcrumbTextProps } from './Types';
1
2
  import { default as React } from 'react';
2
3
 
4
+ export declare const BreadcrumbText: ({ heading, isActive }: BreadcrumbTextProps) => JSX.Element;
3
5
  declare const Store: ({ children }: {
4
6
  children: any;
5
7
  }) => JSX.Element;
@@ -26,3 +26,7 @@ export interface Breadcrumbs {
26
26
  className?: string;
27
27
  }
28
28
  export type UseBreadcrumbOptionalProps = UseBreadcrumbProps | null;
29
+ export interface BreadcrumbTextProps {
30
+ heading: string;
31
+ isActive?: boolean;
32
+ }
@@ -86,5 +86,4 @@ export declare const compareObjectLength: (objA: any, objB: any) => boolean;
86
86
  * Return deep copy of the object
87
87
  */
88
88
  export declare function deepEqual(configA: any, configB: any): boolean;
89
- export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
90
89
  export {};
@@ -3,4 +3,3 @@ export { useClickOutside } from './UseClickOutside/UseClickOutside';
3
3
  export { useWindowSize } from './UseWindowSize/UseWindowSize';
4
4
  export * from './useUrlFilters';
5
5
  export * from './UseRegisterShortcut';
6
- export * from './useStateFilters';
@@ -56,5 +56,5 @@ export type UseUrlFiltersReturnType<T, K = unknown> = K & {
56
56
  /**
57
57
  * Update the search params with the passed object
58
58
  */
59
- updateSearchParams: (paramsToSerialize: Partial<K>) => void;
59
+ updateSearchParams: (paramsToSerialize: K) => void;
60
60
  };
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
34
34
  * <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
35
35
  * ```
36
36
  */
37
- declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
37
+ declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, }: SearchBarProps) => JSX.Element;
38
38
  export default SearchBar;
@@ -33,7 +33,7 @@ export interface SearchBarProps {
33
33
  */
34
34
  debounceTimeout?: number;
35
35
  /**
36
- * Hide the background and border of the search
36
+ * Data test id for the search input
37
37
  */
38
- noBackgroundAndBorder?: boolean;
38
+ dataTestId?: string;
39
39
  }
@@ -28,9 +28,9 @@ export interface APIOptions {
28
28
  signal?: AbortSignal;
29
29
  preventAutoLogout?: boolean;
30
30
  }
31
- export interface OptionType<T = string, K = string> {
32
- value: T;
33
- label: K;
31
+ export interface OptionType {
32
+ label: string;
33
+ value: string;
34
34
  }
35
35
  export declare enum TippyTheme {
36
36
  black = "black",
@@ -116,7 +116,7 @@ export interface GenericEmptyStateType {
116
116
  layout?: 'row' | 'column';
117
117
  contentClassName?: string;
118
118
  }
119
- export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload' | 'redirectURL'> {
119
+ export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload'> {
120
120
  code: number;
121
121
  heightToDeduct?: number;
122
122
  redirectURL?: string;
@@ -128,10 +128,6 @@ export interface ErrorScreenManagerProps {
128
128
  subtitle?: React.ReactChild;
129
129
  reloadClass?: string;
130
130
  heightToDeduct?: number;
131
- /**
132
- * Would be used to redirect URL in case of 404
133
- * @default - APP_LIST
134
- */
135
131
  redirectURL?: string;
136
132
  }
137
133
  export interface ErrorScreenNotAuthorizedProps {
@@ -140,7 +136,8 @@ export interface ErrorScreenNotAuthorizedProps {
140
136
  }
141
137
  export declare enum ImageType {
142
138
  Large = "large",
143
- Medium = "medium"
139
+ Medium = "medium",
140
+ SMALL = "small"
144
141
  }
145
142
  export interface InfoColourBarType {
146
143
  message: React.ReactNode;
@@ -310,14 +307,6 @@ export interface DeploymentWindowArtifactMetadata {
310
307
  name: string;
311
308
  type: DEPLOYMENT_WINDOW_TYPE;
312
309
  }
313
- export interface ArtifactReleaseMappingType {
314
- id: number;
315
- identifier: string;
316
- releaseVersion: string;
317
- name: string;
318
- kind: string;
319
- version: string;
320
- }
321
310
  export interface CDMaterialType {
322
311
  index: number;
323
312
  id: string;
@@ -361,14 +350,6 @@ export interface CDMaterialType {
361
350
  promotionApprovalMetadata?: PromotionApprovalMetadataType;
362
351
  deployedOnEnvironments?: string[];
363
352
  deploymentWindowArtifactMetadata?: DeploymentWindowArtifactMetadata;
364
- /**
365
- * Will only be present in case of release
366
- */
367
- configuredInReleases: ArtifactReleaseMappingType[];
368
- /**
369
- * Would currently only be received in case of release
370
- */
371
- appWorkflowId: number;
372
353
  }
373
354
  export declare enum CDMaterialServiceEnum {
374
355
  ROLLBACK = "rollback",
@@ -14,7 +14,7 @@ export * from './Modals/OpaqueModal';
14
14
  export * from './Modals/VisibleModal';
15
15
  export * from './Modals/VisibleModal2';
16
16
  export { BreadCrumb, useBreadcrumb } from './BreadCrumb/BreadCrumb';
17
- export { default as BreadcrumbStore } from './BreadCrumb/BreadcrumbStore';
17
+ export { default as BreadcrumbStore, BreadcrumbText } from './BreadCrumb/BreadcrumbStore';
18
18
  export { default as RadioGroup } from './RadioGroup';
19
19
  export { default as RadioGroupItem } from './RadioGroupItem';
20
20
  export { default as PopupMenu } from './PopupMenu';
@@ -1,4 +1,4 @@
1
1
  import { APIResponseHandlerProps } from './types';
2
2
 
3
- declare const APIResponseHandler: ({ isLoading, progressingProps, customLoader, error, notAuthorized, notFoundText, reloadProps, genericSectionErrorProps, errorScreenManagerProps, children, }: APIResponseHandlerProps) => JSX.Element;
3
+ declare const APIResponseHandler: ({ isLoading, progressingProps, customLoader, error, notAuthorized, notFoundText, reloadProps, genericSectionErrorProps, children, }: APIResponseHandlerProps) => JSX.Element;
4
4
  export default APIResponseHandler;
@@ -1,5 +1,5 @@
1
1
  import { GenericSectionErrorStateProps } from '../GenericSectionErrorState/types';
2
- import { ErrorScreenManagerProps, GenericEmptyStateType, ProgressingProps, ReloadType, ServerErrors } from '../../../Common';
2
+ import { GenericEmptyStateType, ProgressingProps, ReloadType, ServerErrors } from '../../../Common';
3
3
  import { ReactNode } from 'react';
4
4
 
5
5
  export interface EmptyPageTextType {
@@ -37,14 +37,9 @@ export interface APIResponseHandlerProps {
37
37
  */
38
38
  reloadProps?: ReloadType;
39
39
  /**
40
- * If given, would show GenericSectionErrorState instead of default Reload component
40
+ * If given, would show this component instead of default Error component
41
41
  */
42
42
  genericSectionErrorProps?: GenericSectionErrorStateProps;
43
- /**
44
- * If given, would show ErrorScreenManager component instead of Reload component
45
- * Priority of error states are: genericSectionErrorProps > errorScreenManagerProps > Reload component
46
- */
47
- errorScreenManagerProps?: ErrorScreenManagerProps;
48
43
  /**
49
44
  * If no Error and no Loading, would load this component
50
45
  */
@@ -14,5 +14,5 @@ import { ButtonWithSelectorProps } from './types';
14
14
  * </ButtonWithSelector>
15
15
  * ```
16
16
  */
17
- declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, disabled, }: ButtonWithSelectorProps) => JSX.Element;
17
+ declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, }: ButtonWithSelectorProps) => JSX.Element;
18
18
  export default ButtonWithSelector;
@@ -7,5 +7,4 @@ export interface ButtonWithSelectorProps {
7
7
  className?: string;
8
8
  popUpBodyClassName?: string;
9
9
  showPopUp?: boolean;
10
- disabled?: boolean;
11
10
  }
@@ -0,0 +1,3 @@
1
+ import { FeatureDescriptionModalProps } from './types';
2
+
3
+ export declare const FeatureDescriptionModal: ({ image, title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: FeatureDescriptionModalProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { DescriptorProps } from './types';
2
+
3
+ declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, image, renderDescriptionContent, closeModalText, docLink, SVGImage, }: DescriptorProps) => JSX.Element;
4
+ export default FeatureTitleWithInfo;
@@ -0,0 +1,8 @@
1
+ export declare enum BUTTON_TEXT {
2
+ GOT_IT = "Got it",
3
+ VIEW_DOCUMENTATION = "View Documentation"
4
+ }
5
+ export declare enum IMAGE_VARIANT {
6
+ SMALL = "small",
7
+ LARGE = "large"
8
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FeatureDescriptionModal';
2
+ export { default as FeatureTitleWithInfo } from './FeatureTitleWithInfo';
@@ -0,0 +1,20 @@
1
+ import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
2
+ import { ImageType } from '../../../Common';
3
+
4
+ export interface FeatureDescriptionModalProps {
5
+ image?: any;
6
+ title: string;
7
+ renderDescriptionContent?: () => JSX.Element;
8
+ closeModalText?: string;
9
+ docLink?: string;
10
+ closeModal?: () => void;
11
+ imageVariant?: ImageType;
12
+ SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
13
+ imageStyles?: React.CSSProperties;
14
+ }
15
+ export interface DescriptorProps extends FeatureDescriptionModalProps {
16
+ breadCrumbs: Breadcrumb[];
17
+ additionalContainerClasses?: string;
18
+ iconClassName?: string;
19
+ children?: React.ReactNode;
20
+ }
@@ -0,0 +1,6 @@
1
+ import { ImageType } from '../../../Common';
2
+
3
+ export declare const getImageSize: (imageType: ImageType) => {
4
+ width: string;
5
+ height: string;
6
+ };
@@ -3,5 +3,5 @@ import { FilterChipsProps } from './types';
3
3
  /**
4
4
  * Component for rendering the applied filter chips
5
5
  */
6
- declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, }: FilterChipsProps<T>) => JSX.Element;
6
+ declare const FilterChips: ({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, }: FilterChipsProps) => JSX.Element;
7
7
  export default FilterChips;
@@ -22,11 +22,11 @@ export interface FilterChipProps {
22
22
  */
23
23
  getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
24
24
  }
25
- export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
25
+ export interface FilterChipsProps extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
26
26
  /**
27
27
  * Current filter configuration
28
28
  */
29
- filterConfig: T;
29
+ filterConfig: Record<string, unknown>;
30
30
  /**
31
31
  * Callback handler for removing the filters
32
32
  */
@@ -34,13 +34,5 @@ export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<Filt
34
34
  /**
35
35
  * Handler for removing a applied filter
36
36
  */
37
- onRemoveFilter: (filterConfig: T) => void;
38
- /**
39
- * Class name for the container
40
- */
41
- className?: string;
42
- /**
43
- * Class name for the clear filter button
44
- */
45
- clearButtonClassName?: string;
37
+ onRemoveFilter: (filterConfig: Record<string, unknown>) => void;
46
38
  }
@@ -1,4 +1,4 @@
1
1
  import { GenericSectionErrorStateProps } from './types';
2
2
 
3
- declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, }: GenericSectionErrorStateProps) => JSX.Element;
3
+ declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, }: GenericSectionErrorStateProps) => JSX.Element;
4
4
  export default GenericSectionErrorState;
@@ -1,2 +1 @@
1
1
  export { default as GenericSectionErrorState } from './GenericSectionErrorState.component';
2
- export type { GenericSectionErrorStateProps } from './types';
@@ -29,10 +29,4 @@ export interface GenericSectionErrorStateProps {
29
29
  * to be applied on parent div
30
30
  */
31
31
  rootClassName?: string;
32
- /**
33
- * If true, info icon would be used instead of error
34
- *
35
- * @default false
36
- */
37
- useInfoIcon?: boolean;
38
32
  }
@@ -0,0 +1,14 @@
1
+ export declare const CommonGroupedDropdownStyles: {
2
+ container: (base: any, state: any) => any;
3
+ control: (base: any, state: any) => any;
4
+ singleValue: (base: any) => any;
5
+ option: (base: any, state: any) => any;
6
+ valueContainer: (base: any) => any;
7
+ dropdownIndicator: (base: any, state: any) => any;
8
+ group: (base: any) => any;
9
+ groupHeading: (base: any) => any;
10
+ menuList: (base: any) => any;
11
+ multiValue: (base: any) => any;
12
+ multiValueLabel: (base: any) => any;
13
+ placeholder: (base: any) => any;
14
+ };
@@ -1 +1,2 @@
1
1
  export * from './utils';
2
+ export * from './constants';
@@ -17,3 +17,4 @@ export * from './Header';
17
17
  export * from './AnnouncementBanner';
18
18
  export * from './ButtonWithLoader';
19
19
  export * from './ButtonWithSelector';
20
+ export * from './FeatureDescription';
@@ -1,5 +1,5 @@
1
1
  import { GitTriggers, WebhookEventNameType } from './types';
2
- import { MaterialInfo, SortingOrder } from '../Common';
2
+ import { MaterialInfo } from '../Common';
3
3
 
4
4
  interface HighlightSearchTextProps {
5
5
  /**
@@ -19,9 +19,7 @@ export declare const highlightSearchText: ({ searchText, text, highlightClasses
19
19
  export declare const preventBodyScroll: (lock: boolean) => void;
20
20
  export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
21
21
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
22
- export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
23
- export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
22
+ export declare const caseInsensitiveStringComparator: (a: string, b: string) => number;
24
23
  export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
25
24
  export declare const isNullOrUndefined: (value: unknown) => boolean;
26
- export declare const getKeyToBooleanMapFromArray: <T extends string | number>(arr?: T[]) => Record<T, boolean>;
27
25
  export {};