@devtron-labs/devtron-fe-common-lib 0.0.66-beta-1 → 0.0.66-beta-3

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,4 +1,16 @@
1
1
  import React from 'react';
2
- import { RadioGroupComposition, RadioGroupInterface } from '..';
2
+ interface RadioGroupInterface {
3
+ name: string;
4
+ onChange: any;
5
+ className?: string;
6
+ initialTab: string;
7
+ disabled: boolean;
8
+ showTippy?: boolean;
9
+ tippyContent?: any;
10
+ dataTestId?: string;
11
+ }
12
+ interface RadioGroupComposition {
13
+ Radio?: React.FC<any>;
14
+ }
3
15
  declare const RadioGroup: React.FC<RadioGroupInterface> & RadioGroupComposition;
4
16
  export default RadioGroup;
@@ -1,10 +1,8 @@
1
- /// <reference types="react" />
2
- import { RadioGroupProps } from './Types';
3
- export declare const RadioGroupContext: import("react").Context<{
4
- name: string;
5
- value: string;
6
- disabled: boolean;
7
- onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
8
- }>;
9
- declare const RadioGroup: ({ name, value, disabled, onChange, className, children }: RadioGroupProps) => JSX.Element;
10
- export default RadioGroup;
1
+ import { Component } from 'react';
2
+ import { RadioGroupItemProps, RadioGroupProps } from './Types';
3
+ export declare class RadioGroupItem extends Component<RadioGroupItemProps> {
4
+ render(): JSX.Element;
5
+ }
6
+ export declare class RadioGroup extends Component<RadioGroupProps> {
7
+ render(): JSX.Element;
8
+ }
@@ -134,33 +134,8 @@ export interface RadioGroupItemProps {
134
134
  value: string;
135
135
  dataTestId?: string;
136
136
  disabled?: boolean;
137
- children: ReactNode;
138
- }
139
- export interface RadioGroupInterface {
140
- name: string;
141
- onChange: any;
142
- className?: string;
143
- initialTab: string;
144
- disabled: boolean;
145
- children: ReactNode;
146
- }
147
- export interface RadioInterface {
148
- children: ReactNode;
149
- value: string;
150
- className?: string;
151
- showTippy?: boolean;
152
- tippyContent?: any;
153
- tippyPlacement?: string;
154
- canSelect?: boolean;
155
- isDisabled?: boolean;
156
- tippyClass?: string;
157
- dataTestId?: string;
158
- }
159
- export interface RadioGroupComposition {
160
- Radio?: React.FC<any>;
161
137
  }
162
138
  export interface RadioGroupProps {
163
- children: ReactNode;
164
139
  value: string;
165
140
  name: string;
166
141
  disabled?: boolean;
@@ -14,8 +14,7 @@ export * from './Modals/VisibleModal';
14
14
  export * from './Modals/VisibleModal2';
15
15
  export { BreadCrumb, useBreadcrumb } from './BreadCrumb/BreadCrumb';
16
16
  export { default as BreadcrumbStore } from './BreadCrumb/BreadcrumbStore';
17
- export { default as RadioGroup } from './RadioGroup';
18
- export { default as RadioGroupItem } from './RadioGroupItem';
17
+ export * from './RadioGroup';
19
18
  export { default as PopupMenu } from './PopupMenu';
20
19
  export * from './TippyCustomized';
21
20
  export * from './CustomTagSelector';
@@ -0,0 +1,3 @@
1
+ import { KeyValueListProps } from './types';
2
+ declare const KeyValueList: ({ keyValueList, handleKeyValueChange, isDisabled, disabledInfo, addButtonText, keyPlaceholder, valuePlaceholder, }: KeyValueListProps) => JSX.Element;
3
+ export default KeyValueList;
@@ -0,0 +1,5 @@
1
+ export declare const TEXT_MESSAGES: {
2
+ ADD_BUTTON_TEXT: string;
3
+ DEFAULT_KEY_PLACEHOLDER: string;
4
+ DEFAULT_VALUE_PLACEHOLDER: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ export { default as KeyValueList } from './KeyValueList';
2
+ export * from './types';
@@ -0,0 +1,48 @@
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
+ export interface KeyValueItemProps extends Omit<KeyValueListProps, 'addButtonText' | 'keyValueList' | 'disabledInfo'> {
45
+ itemKey: string;
46
+ itemValue: string;
47
+ index: number;
48
+ }
@@ -2,3 +2,4 @@ export * from './APIResponseHandler';
2
2
  export * from './ReactSelect';
3
3
  export * from './BulkSelection';
4
4
  export * from './FilterChips';
5
+ export * from './KeyValueList';
@@ -1,3 +1,4 @@
1
1
  export * from './Components';
2
2
  export * from './validations';
3
3
  export * from './Helpers';
4
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ export interface RuntimeParamsAPIResponseType {
2
+ envVariables: Record<string, string>;
3
+ }
4
+ export interface RuntimeParamsTriggerPayloadType {
5
+ runtimeParams: RuntimeParamsAPIResponseType;
6
+ }
7
+ export declare enum CIMaterialSidebarType {
8
+ CODE_SOURCE = "Code Source",
9
+ PARAMETERS = "Parameters"
10
+ }