@devtron-labs/devtron-fe-common-lib 0.1.5 → 0.1.6
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.
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
- package/dist/Common/CustomTagSelector/Types.d.ts +2 -0
- package/dist/Common/Types.d.ts +3 -0
- package/dist/Pages/GlobalConfigurations/ScopedVariables/index.d.ts +1 -0
- package/dist/Pages/GlobalConfigurations/ScopedVariables/types.d.ts +17 -0
- package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +3 -0
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +77 -0
- package/dist/Shared/Components/KeyValueTable/index.d.ts +2 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +5 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/validations.d.ts +7 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-74e141dc.js → cssMode-371dad13.js} +1 -1
- package/dist/{freemarker2-198813ae.js → freemarker2-80241f32.js} +1 -1
- package/dist/{handlebars-a5ca24f4.js → handlebars-68da4819.js} +1 -1
- package/dist/{html-052bb218.js → html-7b4beb56.js} +1 -1
- package/dist/{htmlMode-4272b024.js → htmlMode-d5ddf632.js} +1 -1
- package/dist/{index-d1f2f908.js → index-7d89180b.js} +18799 -18591
- package/dist/index.d.ts +2 -1
- package/dist/index.js +294 -290
- package/dist/{javascript-b9d5a2a3.js → javascript-83c2a21e.js} +1 -1
- package/dist/{jsonMode-308e5049.js → jsonMode-a28610d7.js} +1 -1
- package/dist/{liquid-f375ba5c.js → liquid-78529a5d.js} +1 -1
- package/dist/{mdx-eb385d6d.js → mdx-0d8bc697.js} +1 -1
- package/dist/{python-bef9e9b9.js → python-7aa00ff1.js} +1 -1
- package/dist/{razor-e61221ae.js → razor-6e8c820c.js} +1 -1
- package/dist/{tsMode-db61a78d.js → tsMode-420b61b7.js} +1 -1
- package/dist/{typescript-e8e1ad6a.js → typescript-add75e62.js} +1 -1
- package/dist/{xml-a12c2fbf.js → xml-4be7cfee.js} +1 -1
- package/dist/{yaml-ff75a133.js → yaml-4ff2859a.js} +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ResizableTagTextAreaProps } from './Types';
|
|
2
2
|
|
|
3
|
-
export declare const ResizableTagTextArea: ({ className, minHeight, maxHeight, value, onChange, onBlur, onFocus, placeholder, tabIndex, refVar, dependentRef, dataTestId, handleKeyDown, }: ResizableTagTextAreaProps) => JSX.Element;
|
|
3
|
+
export declare const ResizableTagTextArea: ({ className, minHeight, maxHeight, value, onChange, onBlur, onFocus, placeholder, tabIndex, refVar, dependentRef, dataTestId, handleKeyDown, disabled, disableOnBlurResizeToMinHeight, }: ResizableTagTextAreaProps) => JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -189,6 +189,9 @@ export interface RadioInterface {
|
|
|
189
189
|
showTippy?: boolean;
|
|
190
190
|
tippyContent?: any;
|
|
191
191
|
tippyPlacement?: string;
|
|
192
|
+
/**
|
|
193
|
+
* If false would make radio group controlled
|
|
194
|
+
*/
|
|
192
195
|
canSelect?: boolean;
|
|
193
196
|
isDisabled?: boolean;
|
|
194
197
|
tippyClass?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum ScopedVariablesFileViewType {
|
|
2
|
+
/**
|
|
3
|
+
* Used to show yaml editor for editing/creating variables
|
|
4
|
+
*/
|
|
5
|
+
YAML = "yaml",
|
|
6
|
+
/**
|
|
7
|
+
* Shows the variable list view
|
|
8
|
+
*/
|
|
9
|
+
SAVED = "variables",
|
|
10
|
+
/**
|
|
11
|
+
* Shows the variables in environment list view
|
|
12
|
+
*/
|
|
13
|
+
ENVIRONMENT_LIST = "environments"
|
|
14
|
+
}
|
|
15
|
+
export interface SavedVariablesViewParamsType {
|
|
16
|
+
currentView: ScopedVariablesFileViewType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ResizableTagTextAreaProps } from '../../../Common';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface representing a key-value header.
|
|
6
|
+
* @template K - A string representing the key type.
|
|
7
|
+
*/
|
|
8
|
+
export interface KeyValueHeader<K extends string> {
|
|
9
|
+
/** The label of the header. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** The key associated with the header. */
|
|
12
|
+
key: K;
|
|
13
|
+
/** An optional class name for the header. */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Type representing a key-value row.
|
|
18
|
+
* @template K - A string representing the key type.
|
|
19
|
+
*/
|
|
20
|
+
export type KeyValueRow<K extends string> = {
|
|
21
|
+
data: {
|
|
22
|
+
[key in K]: Pick<ResizableTagTextAreaProps, 'value' | 'dataTestId' | 'disabled' | 'tabIndex'> & {
|
|
23
|
+
/** An optional boolean indicating if an asterisk should be shown. */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
id: string | number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Interface representing the configuration for a key-value table.
|
|
31
|
+
* @template K - A string representing the key type.
|
|
32
|
+
*/
|
|
33
|
+
export interface KeyValueConfig<K extends string> {
|
|
34
|
+
/** An array containing two key-value headers. */
|
|
35
|
+
headers: [KeyValueHeader<K>, KeyValueHeader<K>];
|
|
36
|
+
/** An array of key-value rows. */
|
|
37
|
+
rows: KeyValueRow<K>[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Type representing a mask for key-value pairs.
|
|
41
|
+
* @template K - A string representing the key type.
|
|
42
|
+
*/
|
|
43
|
+
export type KeyValueMask<K extends string> = {
|
|
44
|
+
[key in K]?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type KeyValuePlaceholder<K extends string> = {
|
|
47
|
+
[key in K]?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Interface representing the properties for a key-value table component.
|
|
51
|
+
* @template K - A string representing the key type.
|
|
52
|
+
*/
|
|
53
|
+
export interface KeyValueTableProps<K extends string> {
|
|
54
|
+
/** The configuration for the key-value table. */
|
|
55
|
+
config: KeyValueConfig<K>;
|
|
56
|
+
/** An optional mask for the key-value pairs. */
|
|
57
|
+
maskValue?: KeyValueMask<K>;
|
|
58
|
+
placeholder?: KeyValuePlaceholder<K>;
|
|
59
|
+
/** An optional boolean indicating if the table is sortable. */
|
|
60
|
+
isSortable?: boolean;
|
|
61
|
+
/** An optional React node for a custom header component. */
|
|
62
|
+
headerComponent?: ReactNode;
|
|
63
|
+
/** When true, data addition field will not be shown */
|
|
64
|
+
isAdditionNotAllowed?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* An optional function to handle changes in the table rows.
|
|
67
|
+
* @param rowId - The id of the row that changed.
|
|
68
|
+
* @param headerKey - The key of the header that changed.
|
|
69
|
+
* @param value - The value of the cell.
|
|
70
|
+
*/
|
|
71
|
+
onChange?: (rowId: string | number, headerKey: K, value: string) => void;
|
|
72
|
+
/**
|
|
73
|
+
* An optional function to handle row deletions.
|
|
74
|
+
* @param deletedRowIndex - The index of the row that was deleted.
|
|
75
|
+
*/
|
|
76
|
+
onDelete?: (deletedRowId: string | number) => void;
|
|
77
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { MenuListProps } from 'react-select';
|
|
2
|
+
|
|
1
3
|
export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
|
|
2
4
|
container: (base: any, state: any) => any;
|
|
3
5
|
menuList: (base: any) => any;
|
|
@@ -28,3 +30,6 @@ export declare const commonSelectStyles: {
|
|
|
28
30
|
group: (base: any) => any;
|
|
29
31
|
groupHeading: (base: any) => any;
|
|
30
32
|
};
|
|
33
|
+
export declare const MenuListWithApplyButton: ({ handleApplyFilter, ...props }: MenuListProps<unknown, boolean, import('react-select').GroupBase<unknown>> & {
|
|
34
|
+
handleApplyFilter: () => void;
|
|
35
|
+
}) => JSX.Element;
|
|
@@ -21,3 +21,10 @@ export declare const validateRequiredPositiveNumber: (value: string | number) =>
|
|
|
21
21
|
export declare const validateRequiredPositiveInteger: (value: string | number) => ValidationResponseType;
|
|
22
22
|
export declare const validateURL: (url: string, allowBase64Url?: boolean) => ValidationResponseType;
|
|
23
23
|
export declare const validateIfImageExist: (url: string) => Promise<ValidationResponseType>;
|
|
24
|
+
export declare const validateUniqueKeys: (keys: string[]) => {
|
|
25
|
+
isValid: boolean;
|
|
26
|
+
message?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
isValid: boolean;
|
|
29
|
+
message: string;
|
|
30
|
+
};
|