@devtron-labs/devtron-fe-common-lib 1.6.10 → 1.6.11-beta-2

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.
@@ -1,7 +1,7 @@
1
1
  import { j as t, O as E } from "./@vendor-CWh7bjwl.js";
2
2
  import P, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as D } from "@rjsf/core";
4
- import { T as v, c as H, a as U, i as k, b as T, d as S, S as M } from "./@code-editor-doZkzwmz.js";
4
+ import { T as v, c as H, a as U, i as k, b as T, d as S, S as M } from "./@code-editor-BMC8pZqi.js";
5
5
  import J, { components as C } from "react-select";
6
6
  import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
7
  import { getUiOptions as A, getTemplate as I, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as B, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
@@ -1,3 +1,6 @@
1
1
  import { InfoColourBarType } from '../Types';
2
+ /**
3
+ * @deprecated
4
+ */
2
5
  declare const InfoColourBar: ({ message, classname, Icon, iconClass, iconSize, renderActionButton, linkText, redirectLink, linkOnClick, linkClass, internalLink, styles, hideIcon, textConfig, }: InfoColourBarType) => JSX.Element;
3
6
  export default InfoColourBar;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
2
2
  import { TippyProps } from '@tippyjs/react';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO } from '../Shared';
5
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ComponentLayoutType } from '../Shared';
6
6
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -118,7 +118,7 @@ export interface GenericEmptyStateType {
118
118
  /**
119
119
  * @default 'column'
120
120
  */
121
- layout?: 'row' | 'column';
121
+ layout?: ComponentLayoutType;
122
122
  contentClassName?: string;
123
123
  }
124
124
  export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload' | 'redirectURL'> {
@@ -1,3 +1,4 @@
1
+ import { ComponentLayoutType } from '../../types';
1
2
  import { ReactElement, ReactNode } from 'react';
2
3
  export type LabelOrAriaLabelType = {
3
4
  label: ReactNode;
@@ -18,7 +19,7 @@ export type FormFieldLabelProps = LabelOrAriaLabelType & {
18
19
  /**
19
20
  * Layout of the field
20
21
  */
21
- layout?: 'row' | 'column';
22
+ layout?: ComponentLayoutType;
22
23
  };
23
24
  export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
24
25
  /**
@@ -1,2 +1,3 @@
1
1
  export { default as PageHeader } from './PageHeader';
2
2
  export * from './HeaderWithCreateButton';
3
+ export * from './utils';
@@ -1,3 +1,3 @@
1
1
  export declare const getDateInMilliseconds: (days: any) => number;
2
- export declare const handlePostHogEventUpdate: (e: any, eventName?: string) => Promise<void>;
2
+ export declare const handlePostHogEventUpdate: (eventName: string) => Promise<void>;
3
3
  export declare const setActionWithExpiry: (key: string, days: number) => void;
@@ -0,0 +1,3 @@
1
+ import { InfoBlockProps } from './types';
2
+ declare const InfoBlock: ({ layout, variant, size, customIcon, buttonProps, heading, description, }: InfoBlockProps) => JSX.Element;
3
+ export default InfoBlock;
@@ -0,0 +1,3 @@
1
+ import { InfoBlockProps } from './types';
2
+ export declare const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string>;
3
+ export declare const VARIANT_TO_ICON_MAP: Record<InfoBlockProps['variant'], InfoBlockProps['customIcon']>;
@@ -0,0 +1,2 @@
1
+ export { default as InfoBlock } from './InfoBlock.component';
2
+ export * from './types';
@@ -0,0 +1,38 @@
1
+ import { ComponentSizeType } from '../../constants';
2
+ import { ComponentLayoutType } from '../../types';
3
+ import { ReactElement, ReactNode } from 'react';
4
+ import { ButtonProps } from '../Button';
5
+ export type InfoBlockProps = {
6
+ /**
7
+ * @default 'row'
8
+ */
9
+ layout?: ComponentLayoutType;
10
+ /**
11
+ * @default 'information'
12
+ */
13
+ variant?: 'error' | 'help' | 'information' | 'success' | 'warning';
14
+ /**
15
+ * @default ComponentSizeType.medium
16
+ */
17
+ size?: Extract<ComponentSizeType, ComponentSizeType.large | ComponentSizeType.medium>;
18
+ /**
19
+ * If given would override the default icon derived from type
20
+ */
21
+ customIcon?: ReactElement;
22
+ buttonProps?: ButtonProps;
23
+ } & ({
24
+ /**
25
+ * If string, would apply h tag with necessary classes
26
+ */
27
+ heading: ReactNode;
28
+ /**
29
+ * If string, would apply p tag with necessary classes
30
+ */
31
+ description: ReactNode;
32
+ } | {
33
+ heading?: never;
34
+ description: ReactNode;
35
+ } | {
36
+ heading: ReactNode;
37
+ description?: never;
38
+ });
@@ -60,3 +60,4 @@ export * from './ThemeSwitcher';
60
60
  export * from './TargetPlatforms';
61
61
  export * from './UnsavedChanges';
62
62
  export * from './UnsavedChangesDialog';
63
+ export * from './InfoBlock';
@@ -813,4 +813,5 @@ export declare const TriggerType: {
813
813
  readonly Auto: "AUTOMATIC";
814
814
  readonly Manual: "MANUAL";
815
815
  };
816
+ export type ComponentLayoutType = 'row' | 'column';
816
817
  export {};