@devtron-labs/devtron-fe-common-lib 1.1.5 → 1.1.6-beta-1

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 (47) hide show
  1. package/dist/Common/CustomTagSelector/Types.d.ts +12 -0
  2. package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +2 -1
  3. package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
  4. package/dist/Common/RJSF/Form.d.ts +1 -1
  5. package/dist/Shared/Components/Backdrop/Backdrop.d.ts +3 -0
  6. package/dist/Shared/Components/Backdrop/index.d.ts +1 -0
  7. package/dist/Shared/Components/Backdrop/types.d.ts +8 -0
  8. package/dist/Shared/Components/ConfirmationModal/ConfirmationModal.d.ts +3 -0
  9. package/dist/Shared/Components/ConfirmationModal/index.d.ts +2 -0
  10. package/dist/Shared/Components/ConfirmationModal/types.d.ts +50 -0
  11. package/dist/Shared/Components/ConfirmationModal/utils.d.ts +6 -0
  12. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +2 -0
  13. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +2 -0
  14. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +2 -0
  15. package/dist/Shared/Components/DynamicDataTable/index.d.ts +2 -0
  16. package/dist/Shared/Components/DynamicDataTable/types.d.ts +161 -0
  17. package/dist/Shared/Components/DynamicDataTable/utils.d.ts +5 -0
  18. package/dist/Shared/Components/MultipleResizableTextArea/MultipleResizableTextArea.d.ts +2 -0
  19. package/dist/Shared/Components/MultipleResizableTextArea/index.d.ts +2 -0
  20. package/dist/Shared/Components/MultipleResizableTextArea/types.d.ts +9 -0
  21. package/dist/Shared/Components/SelectPicker/type.d.ts +5 -4
  22. package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +2 -0
  23. package/dist/Shared/Components/SelectTextArea/index.d.ts +2 -0
  24. package/dist/Shared/Components/SelectTextArea/types.d.ts +12 -0
  25. package/dist/Shared/Components/index.d.ts +3 -0
  26. package/dist/Shared/Helpers.d.ts +2 -1
  27. package/dist/Shared/constants.d.ts +1 -0
  28. package/dist/Shared/types.d.ts +4 -0
  29. package/dist/assets/index.css +1 -1
  30. package/dist/{cssMode-BsTjp5T1.js → cssMode-DtMm0SDm.js} +1 -1
  31. package/dist/{freemarker2-DJtqwgcS.js → freemarker2-9EjUTVsy.js} +1 -1
  32. package/dist/{handlebars-A27t-Ka7.js → handlebars-Cqr4hoPT.js} +1 -1
  33. package/dist/{html-oZx5D2e1.js → html-C9Gsn18X.js} +1 -1
  34. package/dist/{htmlMode-BbYfuAfq.js → htmlMode-x4RP4E5q.js} +1 -1
  35. package/dist/{index-Bqp36Zxu.js → index-BwRQVDTx.js} +37820 -33174
  36. package/dist/index.js +544 -536
  37. package/dist/{javascript-7Ns1hZ1u.js → javascript-D22Mg13p.js} +1 -1
  38. package/dist/{jsonMode-CSHwDjDg.js → jsonMode-CfrQIF3d.js} +1 -1
  39. package/dist/{liquid-CJAHXY0w.js → liquid-C4E_yX4z.js} +1 -1
  40. package/dist/{mdx-vt9h9Xpz.js → mdx-D_RBF4BX.js} +1 -1
  41. package/dist/{python-CnibeM_K.js → python-DjXx4zMe.js} +1 -1
  42. package/dist/{razor-BWWjrM8Q.js → razor-DpLj0g7V.js} +1 -1
  43. package/dist/{tsMode-Ddl20Rd2.js → tsMode-B1pt4ZcC.js} +1 -1
  44. package/dist/{typescript-DJik4e7z.js → typescript-Ct3KRD6B.js} +1 -1
  45. package/dist/{xml-D3mR990w.js → xml-CMW73-n2.js} +1 -1
  46. package/dist/{yaml-IjO78BY4.js → yaml-fo1c31WO.js} +1 -1
  47. package/package.json +2 -1
@@ -4,6 +4,16 @@ export interface SuggestedTagOptionType extends OptionType {
4
4
  description: string;
5
5
  propagate: boolean;
6
6
  }
7
+ export declare enum DeploymentPolicy {
8
+ ALLOW = "allow",
9
+ BLOCK = "block",
10
+ BLOCK_PROD = "block-prod",
11
+ BLOCK_NON_PROD = "block-non-prod"
12
+ }
13
+ export interface VariableValueConstraintTypes {
14
+ choices?: string[];
15
+ blockCustomValue?: boolean;
16
+ }
7
17
  export interface TagType {
8
18
  id?: number;
9
19
  key: string;
@@ -15,6 +25,8 @@ export interface TagType {
15
25
  isInvalidValue?: boolean;
16
26
  isSuggested?: boolean;
17
27
  isPropagateDisabled?: boolean;
28
+ deploymentPolicy?: DeploymentPolicy;
29
+ valueConstraint?: VariableValueConstraintTypes;
18
30
  }
19
31
  export interface TagErrorType {
20
32
  isValid: boolean;
@@ -3,11 +3,12 @@ export declare const KEYBOARD_KEYS_MAP: {
3
3
  readonly Shift: "⇧";
4
4
  readonly Meta: "⌘" | "Win";
5
5
  readonly Alt: "⌥" | "Alt";
6
- readonly Escape: "Escape";
7
6
  readonly F: "F";
8
7
  readonly E: "E";
9
8
  readonly R: "R";
10
9
  readonly K: "K";
10
+ readonly Escape: "Escape";
11
+ readonly Enter: "Enter";
11
12
  };
12
13
  export type SupportedKeyboardKeysType = keyof typeof KEYBOARD_KEYS_MAP;
13
14
  export interface ShortcutType {
@@ -1,6 +1,6 @@
1
1
  import { ShortcutType } from './types';
2
2
  export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
3
- keys: ("Alt" | "Escape" | "F" | "E" | "R" | "K" | "Control" | "Shift" | "Meta")[];
3
+ keys: ("Alt" | "F" | "E" | "R" | "K" | "Escape" | "Enter" | "Control" | "Shift" | "Meta")[];
4
4
  id: string;
5
5
  };
6
6
  export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
@@ -1,3 +1,3 @@
1
1
  import { default as RJSF } from '@rjsf/core';
2
2
  import { FormProps } from './types';
3
- export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "children" | "className" | "disabled" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "method" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
3
+ export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "children" | "className" | "disabled" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
@@ -0,0 +1,3 @@
1
+ import { BackdropProps } from './types';
2
+ declare const Backdrop: ({ children, onEscape }: BackdropProps) => import('react').ReactPortal;
3
+ export default Backdrop;
@@ -0,0 +1 @@
1
+ export { default as Backdrop } from './Backdrop';
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export interface BackdropProps {
3
+ children: ReactNode;
4
+ /**
5
+ * @param onEscape: please wrap in a useCallback, with respective dependencies or []
6
+ */
7
+ onEscape: () => void;
8
+ }
@@ -0,0 +1,3 @@
1
+ import { ConfirmationModalProps } from './types';
2
+ declare const WrapWithShortcutProvider: (props: ConfirmationModalProps) => JSX.Element;
3
+ export default WrapWithShortcutProvider;
@@ -0,0 +1,2 @@
1
+ export { default as ConfirmationModal } from './ConfirmationModal';
2
+ export { ConfirmationModalVariantType } from './types';
@@ -0,0 +1,50 @@
1
+ import { FunctionComponent, ReactNode, SVGProps, SyntheticEvent } from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ export declare enum ConfirmationModalVariantType {
4
+ info = "info",
5
+ delete = "delete",
6
+ warning = "warning",
7
+ custom = "custom"
8
+ }
9
+ interface CommonButtonProps extends Pick<ButtonProps, 'text'>, Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'>> {
10
+ onClick: (e?: SyntheticEvent) => void;
11
+ }
12
+ interface CustomInputConfig {
13
+ identifier: string;
14
+ confirmationKeyword: string;
15
+ }
16
+ type ButtonConfig<PrimaryButtonConfig, SecondaryButtonConfig> = {
17
+ primaryButtonConfig: PrimaryButtonConfig & CommonButtonProps;
18
+ secondaryButtonConfig: SecondaryButtonConfig & CommonButtonProps;
19
+ } | {
20
+ primaryButtonConfig: PrimaryButtonConfig & CommonButtonProps;
21
+ secondaryButtonConfig?: never;
22
+ } | {
23
+ primaryButtonConfig?: never;
24
+ secondaryButtonConfig?: SecondaryButtonConfig & CommonButtonProps;
25
+ };
26
+ type CustomInputConfigOrChildrenType = {
27
+ customInputConfig: CustomInputConfig;
28
+ children?: never;
29
+ } | {
30
+ customInputConfig?: never;
31
+ children: ReactNode;
32
+ } | {
33
+ customInputConfig?: never;
34
+ children?: never;
35
+ };
36
+ export type ConfirmationModalProps = {
37
+ title: string;
38
+ subtitle: ReactNode;
39
+ handleClose: (e?: SyntheticEvent) => void;
40
+ showConfirmationModal: boolean;
41
+ } & ({
42
+ variant: Exclude<ConfirmationModalVariantType, ConfirmationModalVariantType.custom>;
43
+ Icon?: never;
44
+ buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled'>, Pick<ButtonProps, 'disabled'>>;
45
+ } | {
46
+ variant: ConfirmationModalVariantType.custom;
47
+ Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
48
+ buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled' | 'style'>, Pick<ButtonProps, 'disabled' | 'style'>>;
49
+ }) & CustomInputConfigOrChildrenType;
50
+ export {};
@@ -0,0 +1,6 @@
1
+ import { FunctionComponent, ReactNode, SVGProps } from 'react';
2
+ import { ConfirmationModalVariantType } from './types';
3
+ import { ButtonStyleType } from '../Button';
4
+ export declare const getIconFromVariant: (variant: ConfirmationModalVariantType) => FunctionComponent<SVGProps<SVGSVGElement>>;
5
+ export declare const getConfirmationLabel: (confirmationKeyword: string) => ReactNode;
6
+ export declare const getPrimaryButtonStyleFromVariant: (variant: ConfirmationModalVariantType) => ButtonStyleType;
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableProps } from './types';
2
+ export declare const DynamicDataTable: <K extends string>({ headers, ...props }: DynamicDataTableProps<K>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableHeaderProps } from './types';
2
+ export declare const DynamicDataTableHeader: <K extends string>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableRowProps } from './types';
2
+ export declare const DynamicDataTableRow: <K extends string>({ rows, headers, maskValue, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, validationSchema, showError, errorMessages, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, }: DynamicDataTableRowProps<K>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './DynamicDataTable';
2
+ export * from './types';
@@ -0,0 +1,161 @@
1
+ import { DetailedHTMLProps, ReactNode } from 'react';
2
+ import { SortingOrder } from '../../../Common/Constants';
3
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
4
+ import { MultipleResizableTextAreaProps } from '../MultipleResizableTextArea';
5
+ import { SelectTextAreaProps } from '../SelectTextArea';
6
+ /**
7
+ * Interface representing a key-value header.
8
+ * @template K - A string representing the key type.
9
+ */
10
+ export type DynamicDataTableHeaderType<K extends string> = {
11
+ /** The label of the header. */
12
+ label: string;
13
+ /** The key associated with the header. */
14
+ key: K;
15
+ /** */
16
+ width: string;
17
+ /** An optional boolean indicating if the column is sortable. */
18
+ isSortable?: boolean;
19
+ /** An optional boolean to hide the column */
20
+ isHidden?: boolean;
21
+ };
22
+ export declare enum DynamicDataTableRowDataType {
23
+ TEXT = "text",
24
+ DROPDOWN = "dropdown",
25
+ SELECT_TEXT = "select-text",
26
+ BUTTON = "button"
27
+ }
28
+ /**
29
+ * Type representing a key-value row.
30
+ * @template K - A string representing the key type.
31
+ */
32
+ export type DynamicDataTableRowType<K extends string> = {
33
+ data: {
34
+ [key in K]: {
35
+ value: string;
36
+ disabled?: boolean;
37
+ /** An optional boolean indicating if an asterisk should be shown. */
38
+ required?: boolean;
39
+ } & ({
40
+ type?: DynamicDataTableRowDataType.TEXT;
41
+ props?: Omit<MultipleResizableTextAreaProps, 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRefs'>;
42
+ } | {
43
+ type?: DynamicDataTableRowDataType.DROPDOWN;
44
+ props?: Omit<SelectPickerProps<string, false>, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled'>;
45
+ } | {
46
+ type?: DynamicDataTableRowDataType.SELECT_TEXT;
47
+ props?: Omit<SelectTextAreaProps, 'value' | 'onChange' | 'inputId' | 'isDisabled' | 'dependentRefs' | 'refVar' | 'textAreaProps'> & {
48
+ textAreaProps?: Omit<SelectTextAreaProps['textAreaProps'], 'className' | 'disableOnBlurResizeToMinHeight' | 'minHeight' | 'maxHeight'>;
49
+ };
50
+ } | ({
51
+ type?: DynamicDataTableRowDataType.BUTTON;
52
+ props: Pick<DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'onClick'> & {
53
+ icon?: ReactNode;
54
+ text: ReactNode;
55
+ };
56
+ } & ({
57
+ wrap: true;
58
+ wrapRenderer: (props: {
59
+ children: JSX.Element;
60
+ customState?: Record<string, any>;
61
+ }) => JSX.Element;
62
+ } | {
63
+ wrap?: false;
64
+ wrapRenderer?: never;
65
+ })));
66
+ };
67
+ id: string | number;
68
+ /** */
69
+ customState?: Record<string, any>;
70
+ };
71
+ /**
72
+ * Type representing a mask for key-value pairs.
73
+ * @template K - A string representing the key type.
74
+ */
75
+ type DynamicDataTableMask<K extends string> = {
76
+ [key in K]?: boolean;
77
+ };
78
+ type DynamicDataTableCellIcon<K extends string> = {
79
+ [key in K]?: (rowId: string | number) => ReactNode;
80
+ };
81
+ /**
82
+ * Interface representing the properties for a key-value table component.
83
+ * @template K - A string representing the key type.
84
+ */
85
+ export type DynamicDataTableProps<K extends string> = {
86
+ /** An array containing two key-value headers. */
87
+ headers: DynamicDataTableHeaderType<K>[];
88
+ /** An array of key-value rows. */
89
+ rows: DynamicDataTableRowType<K>[];
90
+ /** */
91
+ sortingConfig?: {
92
+ sortBy: K;
93
+ sortOrder: SortingOrder;
94
+ handleSorting: () => void;
95
+ };
96
+ /** An optional mask for the key-value pairs. */
97
+ maskValue?: DynamicDataTableMask<K>;
98
+ /** */
99
+ leadingCellIcon?: DynamicDataTableCellIcon<K>;
100
+ /** */
101
+ trailingCellIcon?: DynamicDataTableCellIcon<K>;
102
+ /** An optional React node for a custom header component. */
103
+ headerComponent?: ReactNode;
104
+ /** When true, data addition field will not be shown. */
105
+ isAdditionNotAllowed?: boolean;
106
+ /** When true, data addition field will not be shown. */
107
+ isDeletionNotAllowed?: boolean;
108
+ /** When true, data add or update is disabled. */
109
+ readOnly?: boolean;
110
+ /** */
111
+ onRowAdd: () => void;
112
+ /**
113
+ * Function to handle changes in the table rows.
114
+ * @param row - The row that changed.
115
+ * @param headerKey - The key of the header that changed.
116
+ * @param value - The value of the cell.
117
+ */
118
+ onRowEdit: (row: DynamicDataTableRowType<K>, headerKey: K, value: string, extraData: {
119
+ selectedValue?: SelectPickerOptionType<string>;
120
+ }) => void;
121
+ /**
122
+ * Function to handle row deletions.
123
+ * @param row - The row that was deleted.
124
+ */
125
+ onRowDelete: (row: DynamicDataTableRowType<K>) => void;
126
+ /** */
127
+ actionButtonConfig?: {
128
+ renderer: (row: DynamicDataTableRowType<K>) => ReactNode;
129
+ key?: K;
130
+ /**
131
+ * @default '32px'
132
+ */
133
+ width?: string;
134
+ /**
135
+ * @default 'start'
136
+ */
137
+ position?: 'start' | 'end';
138
+ };
139
+ /**
140
+ * Indicates whether to show errors.
141
+ */
142
+ showError?: boolean;
143
+ /**
144
+ * An array of error messages to be displayed in the cell error tooltip.
145
+ */
146
+ errorMessages?: string[];
147
+ /**
148
+ * The function to use to validate the value of the cell.
149
+ * @param value - The value to validate.
150
+ * @param key - The row key of the value.
151
+ * @param rowId - The id of the row.
152
+ * @returns Return true if the value is valid, otherwise false
153
+ * and set `showError` to `true` and provide errorMessages array to show error message.
154
+ */
155
+ validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
156
+ };
157
+ export interface DynamicDataTableHeaderProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
158
+ }
159
+ export interface DynamicDataTableRowProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'rows' | 'headers' | 'maskValue' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'errorMessages' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon'> {
160
+ }
161
+ export {};
@@ -0,0 +1,5 @@
1
+ import { DynamicDataTableHeaderType, DynamicDataTableProps, DynamicDataTableRowDataType } from './types';
2
+ export declare const getActionButtonPosition: <K extends string>({ headers, actionButtonConfig, }: Pick<DynamicDataTableProps<K>, "headers" | "actionButtonConfig">) => number;
3
+ export declare const getHeaderGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
4
+ export declare const getRowGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
5
+ export declare const rowTypeHasInputField: (type: DynamicDataTableRowDataType) => boolean;
@@ -0,0 +1,2 @@
1
+ import { MultipleResizableTextAreaProps } from './types';
2
+ export declare const MultipleResizableTextArea: ({ value, minHeight, maxHeight, dataTestId, onChange, onBlur, onFocus, refVar, dependentRefs, className, disableOnBlurResizeToMinHeight, ...resProps }: MultipleResizableTextAreaProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './MultipleResizableTextArea';
2
+ export * from './types';
@@ -0,0 +1,9 @@
1
+ import { DetailedHTMLProps, MutableRefObject, TextareaHTMLAttributes } from 'react';
2
+ export interface MultipleResizableTextAreaProps extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
3
+ minHeight?: number;
4
+ maxHeight?: number;
5
+ dataTestId?: string;
6
+ refVar?: MutableRefObject<HTMLTextAreaElement>;
7
+ dependentRefs?: Record<string | number, MutableRefObject<HTMLTextAreaElement>>;
8
+ disableOnBlurResizeToMinHeight?: boolean;
9
+ }
@@ -24,6 +24,10 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
24
24
  tooltipProps?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
25
25
  }
26
26
  type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
27
+ export declare enum SelectPickerVariantType {
28
+ DEFAULT = "default",
29
+ BORDER_LESS = "border-less"
30
+ }
27
31
  declare module 'react-select/base' {
28
32
  interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
29
33
  /**
@@ -55,12 +59,9 @@ declare module 'react-select/base' {
55
59
  * @default 'true'
56
60
  */
57
61
  showSelectedOptionIcon?: boolean;
62
+ variant?: SelectPickerVariantType;
58
63
  }
59
64
  }
60
- export declare enum SelectPickerVariantType {
61
- DEFAULT = "default",
62
- BORDER_LESS = "border-less"
63
- }
64
65
  export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
65
66
  /**
66
67
  * Error message for the select
@@ -0,0 +1,2 @@
1
+ import { SelectTextAreaProps } from './types';
2
+ export declare const SelectTextArea: ({ value, selectedOptionIcon: Icon, onChange, options, inputId, placeholder, refVar, dependentRefs, disabled, selectPickerProps, textAreaProps, }: SelectTextAreaProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './SelectTextArea';
2
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
3
+ import { MultipleResizableTextAreaProps } from '../MultipleResizableTextArea';
4
+ export type SelectTextAreaProps = Pick<SelectPickerProps<string, false>, 'inputId' | 'options'> & Pick<MultipleResizableTextAreaProps, 'refVar' | 'dependentRefs'> & {
5
+ value: string;
6
+ selectedOptionIcon?: ReactElement;
7
+ onChange?: (selectedValue: SelectPickerOptionType<string>) => void;
8
+ disabled?: boolean;
9
+ placeholder?: string;
10
+ textAreaProps?: Omit<MultipleResizableTextAreaProps, 'refVar' | 'dependentRefs' | 'id' | 'value' | 'onChange' | 'placeholder' | 'disabled'>;
11
+ selectPickerProps?: Omit<SelectPickerProps<string, false>, 'inputId' | 'options' | 'isDisabled' | 'onChange' | 'variant' | 'isCreatable' | 'value' | 'placeholder' | 'fullWidth' | 'selectRef' | 'onCreateOption' | 'isMulti'>;
12
+ };
@@ -41,4 +41,7 @@ export * from './Collapse';
41
41
  export * from './Security';
42
42
  export * from './Button';
43
43
  export * from './InvalidYAMLTippy';
44
+ export * from './ConfirmationModal';
44
45
  export * from './DiffViewer';
46
+ export * from './MultipleResizableTextArea';
47
+ export * from './DynamicDataTable';
@@ -2,7 +2,7 @@ import { ReactElement } from 'react';
2
2
  import { Pair } from 'yaml';
3
3
  import { MaterialHistoryType } from '@Shared/Services/app.types';
4
4
  import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
5
- import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
5
+ import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
6
6
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
7
7
  interface HighlightSearchTextProps {
8
8
  /**
@@ -21,6 +21,7 @@ interface HighlightSearchTextProps {
21
21
  export declare const escapeRegExp: (text: string) => string;
22
22
  export declare const highlightSearchText: ({ searchText, text, highlightClasses }: HighlightSearchTextProps) => string;
23
23
  export declare const preventBodyScroll: (lock: boolean) => void;
24
+ export declare const preventOutsideFocus: ({ identifier, preventFocus }: PreventOutsideFocusProps) => void;
24
25
  export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
25
26
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
26
27
  export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
@@ -417,3 +417,4 @@ export declare const ALL_RESOURCE_KIND_FILTER = "all";
417
417
  export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
418
418
  export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
419
419
  export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";
420
+ export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
@@ -735,4 +735,8 @@ export interface DynamicTabType extends CommonTabArgsType {
735
735
  */
736
736
  lastActiveTabId: string | null;
737
737
  }
738
+ export interface PreventOutsideFocusProps {
739
+ identifier: string;
740
+ preventFocus: boolean;
741
+ }
738
742
  export {};