@devtron-labs/devtron-fe-common-lib 1.7.10 → 1.7.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,3 +0,0 @@
1
- import { KeyValueListProps } from './types';
2
- declare const KeyValueList: ({ keyValueList, handleKeyValueChange, isDisabled, disabledInfo, itemClassName, addButtonText, keyPlaceholder, valuePlaceholder, }: KeyValueListProps) => JSX.Element;
3
- export default KeyValueList;
@@ -1,5 +0,0 @@
1
- export declare const TEXT_MESSAGES: {
2
- ADD_BUTTON_TEXT: string;
3
- DEFAULT_KEY_PLACEHOLDER: string;
4
- DEFAULT_VALUE_PLACEHOLDER: string;
5
- };
@@ -1,2 +0,0 @@
1
- export { default as KeyValueList } from './KeyValueList';
2
- export * from './types';
@@ -1,52 +0,0 @@
1
- export declare enum KeyValueListActionType {
2
- ADD = "ADD_KEY_VALUE",
3
- DELETE = "DELETE_KEY_VALUE",
4
- UPDATE_KEY = "UPDATE",
5
- UPDATE_VALUE = "UPDATE_VALUE"
6
- }
7
- export type KeyValueListType = {
8
- key: string;
9
- value: string;
10
- };
11
- export interface KeyValueHandlerDataType {
12
- /**
13
- * Used to identify the key-value pair.
14
- * Optional - only for ADD action else it is mandatory
15
- */
16
- index?: number;
17
- value?: string;
18
- }
19
- export interface HandleKeyValueChangeType {
20
- action: KeyValueListActionType;
21
- data?: KeyValueHandlerDataType;
22
- }
23
- export interface KeyValueListProps {
24
- keyValueList: KeyValueListType[];
25
- handleKeyValueChange: ({ action, data }: HandleKeyValueChangeType) => void;
26
- /**
27
- * Would disable adding/deleting/updating parameters
28
- */
29
- isDisabled?: boolean;
30
- disabledInfo?: string;
31
- /**
32
- * @default - Add Parameter
33
- */
34
- addButtonText?: string;
35
- /**
36
- * @default - Enter Key
37
- */
38
- keyPlaceholder?: string;
39
- /**
40
- * @default - Enter Value
41
- */
42
- valuePlaceholder?: string;
43
- /**
44
- * to be applied on each item
45
- */
46
- itemClassName?: string;
47
- }
48
- export interface KeyValueItemProps extends Omit<KeyValueListProps, 'addButtonText' | 'keyValueList' | 'disabledInfo'> {
49
- itemKey: string;
50
- itemValue: string;
51
- index: number;
52
- }