@devtron-labs/devtron-fe-common-lib 0.1.3-beta-3 → 0.1.3-patch-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 (40) hide show
  1. package/dist/Common/Constants.d.ts +1 -0
  2. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
  3. package/dist/Common/CustomTagSelector/Types.d.ts +2 -0
  4. package/dist/Common/Helper.d.ts +0 -3
  5. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +1 -1
  6. package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +1 -2
  7. package/dist/Common/RJSF/types.d.ts +0 -12
  8. package/dist/Common/RJSF/utils.d.ts +2 -2
  9. package/dist/Common/Types.d.ts +3 -0
  10. package/dist/Common/index.d.ts +0 -1
  11. package/dist/Pages/GlobalConfigurations/ScopedVariables/index.d.ts +1 -0
  12. package/dist/Pages/GlobalConfigurations/ScopedVariables/types.d.ts +17 -0
  13. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
  14. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +3 -0
  15. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +77 -0
  16. package/dist/Shared/Components/KeyValueTable/index.d.ts +2 -0
  17. package/dist/Shared/Components/ReactSelect/utils.d.ts +5 -0
  18. package/dist/Shared/Components/index.d.ts +1 -0
  19. package/dist/Shared/validations.d.ts +7 -0
  20. package/dist/assets/index.css +1 -1
  21. package/dist/{cssMode-b1abfa5c.js → cssMode-ee470724.js} +1 -1
  22. package/dist/{freemarker2-96cb45cd.js → freemarker2-fadd3e0c.js} +1 -1
  23. package/dist/{handlebars-c6f8d5b8.js → handlebars-9c9b1c76.js} +1 -1
  24. package/dist/{html-17dc3d03.js → html-69f95eb0.js} +1 -1
  25. package/dist/{htmlMode-71f131a7.js → htmlMode-d04b9950.js} +1 -1
  26. package/dist/{index-ec911362.js → index-e6ef4e33.js} +25616 -27072
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.js +182 -181
  29. package/dist/{javascript-a528e0c9.js → javascript-e59dbc5b.js} +1 -1
  30. package/dist/{jsonMode-9778db77.js → jsonMode-e187b70f.js} +1 -1
  31. package/dist/{liquid-a3579d1f.js → liquid-ff0130cf.js} +1 -1
  32. package/dist/{mdx-0472a04b.js → mdx-74ce463f.js} +1 -1
  33. package/dist/{python-2ae9dc06.js → python-e6a1823a.js} +1 -1
  34. package/dist/{razor-6655bd7a.js → razor-e44a3e22.js} +1 -1
  35. package/dist/{tsMode-348eb264.js → tsMode-83bc8ce9.js} +1 -1
  36. package/dist/{typescript-95a5b593.js → typescript-ece899bc.js} +1 -1
  37. package/dist/{xml-18f059b6.js → xml-ff876150.js} +1 -1
  38. package/dist/{yaml-6da9adc7.js → yaml-17100987.js} +1 -1
  39. package/package.json +1 -2
  40. package/dist/Common/Tippy.d.ts +0 -4
@@ -40,6 +40,7 @@ export declare const URLS: {
40
40
  APP_TRIGGER: string;
41
41
  GLOBAL_CONFIG_DOCKER: string;
42
42
  DEPLOYMENT_HISTORY_CONFIGURATIONS: string;
43
+ GLOBAL_CONFIG_SCOPED_VARIABLES: string;
43
44
  };
44
45
  export declare const ROUTES: {
45
46
  APP: string;
@@ -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;
@@ -65,4 +65,6 @@ export interface ResizableTagTextAreaProps {
65
65
  dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
66
66
  dataTestId?: string;
67
67
  handleKeyDown?: any;
68
+ disabled?: boolean;
69
+ disableOnBlurResizeToMinHeight?: boolean;
68
70
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
- import { JSONPathOptions } from 'jsonpath-plus';
3
2
  import { AsyncOptions, UseSearchString } from './Types';
4
3
  import { scrollableInterface } from '../Shared';
5
4
 
@@ -95,8 +94,6 @@ export declare const getRegexMatchPositions: (string: string, regex: RegExp) =>
95
94
  * @returns set of substrings
96
95
  */
97
96
  export declare const powerSetOfSubstringsFromStart: (strings: string[], regex: RegExp) => string[];
98
- export declare const convertJSONPointerToJSONPath: (pointer: string) => string;
99
- export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultType?: JSONPathOptions['resultType']) => string[];
100
97
  /**
101
98
  * Returns a debounced variant of the function
102
99
  */
@@ -1,3 +1,3 @@
1
1
  import { ArrayFieldTemplateItemType } from '@rjsf/utils';
2
2
 
3
- export declare const ArrayFieldItemTemplate: ({ children, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
3
+ export declare const ArrayFieldItemTemplate: ({ children, className, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import { ObjectFieldTemplateProps } from '@rjsf/utils';
2
- import { RJSFFormSchema } from '../types';
3
2
 
4
- export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps<any, RJSFFormSchema, any>) => JSX.Element;
3
+ export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
@@ -1,16 +1,4 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { default as RJSFForm } from '@rjsf/core';
3
- import { StrictRJSFSchema } from '@rjsf/utils';
4
3
 
5
4
  export type FormProps = Omit<ComponentProps<typeof RJSFForm>, 'validator'>;
6
- interface Hidden {
7
- condition: boolean;
8
- match: string;
9
- }
10
- export interface RJSFFormSchema extends StrictRJSFSchema {
11
- properties: {
12
- [key: string]: RJSFFormSchema;
13
- };
14
- hidden: Hidden;
15
- }
16
- export {};
@@ -1,5 +1,5 @@
1
1
  import { TranslatableString } from '@rjsf/utils';
2
- import { default as Tippy } from '../Tippy';
2
+ import { default as Tippy } from '@tippyjs/react';
3
3
 
4
4
  /**
5
5
  * Override for the TranslatableString from RJSF
@@ -25,4 +25,4 @@ export declare const getRedirectionProps: (url: string) => import('react').Ancho
25
25
  * Infers the type for json schema from value type
26
26
  */
27
27
  export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
28
- export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement'], truncateWidth?: number) => (children: any) => JSX.Element;
28
+ export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement']) => (children: any) => JSX.Element;
@@ -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;
@@ -55,4 +55,3 @@ export * from './GenericDescription';
55
55
  export * from './SegmentedBarChart';
56
56
  export * from './CodeEditor';
57
57
  export * from './AppStatus';
58
- export { default as Tippy } from './Tippy';
@@ -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
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './BuildInfra';
2
2
  export * from './Authorization';
3
+ export * from './ScopedVariables';
@@ -0,0 +1,3 @@
1
+ import { KeyValueTableProps } from './KeyValueTable.types';
2
+
3
+ export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export * from './KeyValueTable.component';
2
+ export * from './KeyValueTable.types';
@@ -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;
@@ -30,3 +30,4 @@ export * from './ImageChipCell';
30
30
  export * from './ArtifactInfoModal';
31
31
  export * from './MaterialHistory';
32
32
  export * from './IframeContainer';
33
+ export * from './KeyValueTable';
@@ -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
+ };