@devtron-labs/devtron-fe-common-lib 0.1.17-beta-1 → 0.1.17

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 (35) hide show
  1. package/dist/Common/RJSF/constants.d.ts +4 -0
  2. package/dist/Common/RJSF/utils.d.ts +1 -1
  3. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  4. package/dist/Common/SearchBar/types.d.ts +9 -2
  5. package/dist/Common/SearchBar/utils.d.ts +3 -0
  6. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -1
  7. package/dist/Common/SortableTableHeaderCell/types.d.ts +0 -1
  8. package/dist/Common/Tippy.d.ts +2 -2
  9. package/dist/Common/Types.d.ts +0 -4
  10. package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +4 -0
  11. package/dist/Shared/Components/CICDHistory/constants.d.ts +2 -0
  12. package/dist/Shared/Components/CICDHistory/types.d.ts +31 -0
  13. package/dist/Shared/Components/CICDHistory/utils.d.ts +2 -1
  14. package/dist/Shared/Helpers.d.ts +2 -0
  15. package/dist/Shared/constants.d.ts +1 -0
  16. package/dist/assets/index.css +1 -1
  17. package/dist/{cssMode-94138f1d.js → cssMode-1a5fa0a2.js} +1 -1
  18. package/dist/{freemarker2-51a7c81b.js → freemarker2-a74f0d20.js} +1 -1
  19. package/dist/{handlebars-766107ed.js → handlebars-3bd3c224.js} +1 -1
  20. package/dist/{html-42a575af.js → html-a79d84df.js} +1 -1
  21. package/dist/{htmlMode-ef0986a0.js → htmlMode-a9da4b11.js} +1 -1
  22. package/dist/{index-84bba3a8.js → index-0c92e1fb.js} +21732 -21470
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +477 -472
  25. package/dist/{javascript-e0b47bd3.js → javascript-692ccc23.js} +1 -1
  26. package/dist/{jsonMode-14193fee.js → jsonMode-68c1772e.js} +1 -1
  27. package/dist/{liquid-1001ab79.js → liquid-1c1f95ee.js} +1 -1
  28. package/dist/{mdx-98f62cad.js → mdx-06f3004b.js} +1 -1
  29. package/dist/{python-8e52e38e.js → python-3fc14037.js} +1 -1
  30. package/dist/{razor-d1773987.js → razor-0ab97d76.js} +1 -1
  31. package/dist/{tsMode-ae919d24.js → tsMode-42e9e293.js} +1 -1
  32. package/dist/{typescript-4d3690da.js → typescript-66469124.js} +1 -1
  33. package/dist/{xml-5f071cf9.js → xml-7f3ad51f.js} +1 -1
  34. package/dist/{yaml-c0533d69.js → yaml-44557f82.js} +1 -1
  35. package/package.json +1 -1
@@ -4,3 +4,7 @@ export declare const PLACEHOLDERS: {
4
4
  OBJECT_KEY: string;
5
5
  };
6
6
  export declare const DEFAULT_FIELD_TITLE = "Key not available";
7
+ export declare const ADD_BUTTON_WIDTH: {
8
+ MAX_WIDTH_VALUE: number;
9
+ MAX_WIDTH_CLASSNAME: string;
10
+ };
@@ -25,4 +25,4 @@ export declare const getRedirectionProps: (url: string) => import('react').Ancho
25
25
  * Infers the type for json schema from value type
26
26
  */
27
27
  export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
28
- export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement']) => (children: any) => JSX.Element;
28
+ export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement'], truncateWidth?: number) => (children: any) => JSX.Element;
@@ -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, dataTestId, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
37
+ declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, size, }: SearchBarProps) => JSX.Element;
38
38
  export default SearchBar;
@@ -1,4 +1,5 @@
1
- /// <reference types="react" />
1
+ import { ComponentSizeType } from '../../Shared/constants';
2
+
2
3
  export interface SearchBarProps {
3
4
  /**
4
5
  * Initial search text
@@ -17,7 +18,7 @@ export interface SearchBarProps {
17
18
  /**
18
19
  * Input props for the search input
19
20
  */
20
- inputProps?: React.InputHTMLAttributes<HTMLInputElement> & Partial<Record<'ref', React.MutableRefObject<HTMLInputElement>>>;
21
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
21
22
  /**
22
23
  * Class name for the container; can be used for handling width
23
24
  */
@@ -40,4 +41,10 @@ export interface SearchBarProps {
40
41
  * Hide the background and border of the search
41
42
  */
42
43
  noBackgroundAndBorder?: boolean;
44
+ /**
45
+ * Height of the searchbar
46
+ *
47
+ * @default 'ComponentSizeType.medium'
48
+ */
49
+ size?: ComponentSizeType.medium | ComponentSizeType.large;
43
50
  }
@@ -0,0 +1,3 @@
1
+ import { SearchBarProps } from './types';
2
+
3
+ export declare const getSearchBarHeightFromSize: (size: SearchBarProps['size']) => string;
@@ -14,5 +14,5 @@ import { SortableTableHeaderCellProps } from './types';
14
14
  * />
15
15
  * ```
16
16
  */
17
- declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
17
+ declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, }: SortableTableHeaderCellProps) => JSX.Element;
18
18
  export default SortableTableHeaderCell;
@@ -28,5 +28,4 @@ export interface SortableTableHeaderCellProps {
28
28
  * @default true
29
29
  */
30
30
  isSortable?: boolean;
31
- showTippyOnTruncate?: boolean;
32
31
  }
@@ -1,4 +1,4 @@
1
- import { TippyProps } from './Types';
1
+ import { TippyProps as TippyJSProps } from '@tippyjs/react';
2
2
 
3
- declare const Tippy: ({ showOnTruncate, children, ...rest }: TippyProps) => JSX.Element;
3
+ declare const Tippy: ({ truncateWidth, children, ...rest }: TippyJSProps & Record<'truncateWidth', number>) => JSX.Element;
4
4
  export default Tippy;
@@ -3,7 +3,6 @@ import { Placement } from 'tippy.js';
3
3
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
4
4
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
5
5
  import { RegistryType } from '../Shared';
6
- import { TippyProps as TippyJSProps } from '@tippyjs/react';
7
6
 
8
7
  /**
9
8
  * Generic response type object with support for overriding the result type
@@ -816,7 +815,4 @@ export interface EnvironmentHelmResult {
816
815
  allowedDeploymentTypes?: DeploymentAppTypes[];
817
816
  }
818
817
  export type EnvironmentListHelmResponse = ResponseType<EnvironmentListHelmResult[]>;
819
- export interface TippyProps extends TippyJSProps {
820
- showOnTruncate?: boolean;
821
- }
822
818
  export {};
@@ -0,0 +1,4 @@
1
+ import { LogStageAccordionProps } from './types';
2
+
3
+ declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, }: LogStageAccordionProps) => JSX.Element;
4
+ export default LogStageAccordion;
@@ -43,3 +43,5 @@ export declare const DEFAULT_ENV = "devtron-ci";
43
43
  export declare const LOGS_RETRY_COUNT = 3;
44
44
  export declare const DEPLOYMENT_STATUS_QUERY_PARAM = "deployment-status";
45
45
  export declare const MANIFEST_STATUS_HEADERS: string[];
46
+ export declare const LOGS_STAGE_IDENTIFIER = "STAGE_INFO";
47
+ export declare const LOGS_STAGE_STREAM_SEPARATOR = "|";
@@ -584,6 +584,37 @@ export interface TriggerHistoryFilterCriteriaProps {
584
584
  releaseId: number;
585
585
  showCurrentReleaseDeployments: boolean;
586
586
  }
587
+ export declare enum StageStatusType {
588
+ SUCCESS = "Success",
589
+ FAILURE = "Failure",
590
+ /**
591
+ * Not given in API response
592
+ */
593
+ PROGRESSING = "Progressing"
594
+ }
595
+ export interface StageInfoDTO {
596
+ stage: string;
597
+ startTime: string;
598
+ endTime?: string;
599
+ status?: StageStatusType;
600
+ }
601
+ export interface StageDetailType extends Pick<StageInfoDTO, 'stage' | 'startTime' | 'endTime' | 'status'> {
602
+ logs: string[];
603
+ isOpen: boolean;
604
+ }
605
+ export interface LogStageAccordionProps extends StageDetailType {
606
+ handleStageClose: (index: number) => void;
607
+ handleStageOpen: (index: number) => void;
608
+ stageIndex: number;
609
+ /**
610
+ * A stage is loading if it is last in current stage list and event is not closed
611
+ */
612
+ isLoading: boolean;
613
+ }
614
+ export interface CreateMarkupReturnType {
615
+ __html: string;
616
+ isSearchKeyPresent: boolean;
617
+ }
587
618
  export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
588
619
  export declare const terminalStatus: Set<string>;
589
620
  export declare const statusSet: Set<string>;
@@ -1,6 +1,7 @@
1
- import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType } from './types';
1
+ import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType, StageStatusType } from './types';
2
2
 
3
3
  export declare const getTriggerHistoryFilterCriteria: ({ appId, envId, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryFilterCriteriaProps) => TriggerHistoryFilterCriteriaType;
4
4
  export declare const getParsedTriggerHistory: (result: any) => DeploymentHistoryResultObject;
5
5
  export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
6
6
  export declare const renderIcon: (iconState: string) => JSX.Element;
7
+ export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
@@ -32,5 +32,7 @@ export declare const renderValidInputButtonTippy: (children: ReactElement) => JS
32
32
  export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
33
33
  export declare function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes;
34
34
  export declare const decode: (data: any, isEncoded?: boolean) => {};
35
+ export declare const isTimeStringAvailable: (time: string) => boolean;
36
+ export declare const getTimeDifference: (startTime: string, endTime: string) => string;
35
37
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
36
38
  export {};
@@ -354,6 +354,7 @@ export declare enum K8sResourcePayloadAppType {
354
354
  HELM_APP = 1,
355
355
  EXTERNAL_ARGO_APP = 2
356
356
  }
357
+ export declare const ANSI_UP_REGEX: RegExp;
357
358
  /**
358
359
  * Size variants for components
359
360
  */