@devtron-labs/devtron-fe-common-lib 0.0.94-beta-4 → 0.0.94-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 (51) 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/Reload.d.ts +0 -3
  5. package/dist/Common/Types.d.ts +3 -0
  6. package/dist/Pages/GlobalConfigurations/ScopedVariables/index.d.ts +1 -0
  7. package/dist/Pages/GlobalConfigurations/ScopedVariables/types.d.ts +17 -0
  8. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
  9. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +3 -0
  10. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +77 -0
  11. package/dist/Shared/Components/KeyValueTable/index.d.ts +2 -0
  12. package/dist/Shared/Components/ReactSelect/utils.d.ts +5 -0
  13. package/dist/Shared/Components/index.d.ts +1 -4
  14. package/dist/Shared/Services/index.d.ts +0 -2
  15. package/dist/Shared/constants.d.ts +1 -0
  16. package/dist/Shared/validations.d.ts +7 -0
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{cssMode-b6f0ce28.js → cssMode-21f4d2da.js} +1 -1
  19. package/dist/{freemarker2-89c73b42.js → freemarker2-5034aa19.js} +1 -1
  20. package/dist/{handlebars-7036ebc3.js → handlebars-8dcb5c76.js} +1 -1
  21. package/dist/{html-58c5c2ae.js → html-7a085b2b.js} +1 -1
  22. package/dist/{htmlMode-055f30ba.js → htmlMode-21a43b5a.js} +1 -1
  23. package/dist/{index-fbb83f4c.js → index-0da963de.js} +16437 -16442
  24. package/dist/index.d.ts +2 -1
  25. package/dist/index.js +343 -344
  26. package/dist/{javascript-af328488.js → javascript-9ea1f6d6.js} +1 -1
  27. package/dist/{jsonMode-451249f8.js → jsonMode-b41a2eb5.js} +1 -1
  28. package/dist/{liquid-83f9886e.js → liquid-456c6981.js} +1 -1
  29. package/dist/{mdx-c5de7484.js → mdx-62c77bb8.js} +1 -1
  30. package/dist/{python-c8f245d5.js → python-b5418054.js} +1 -1
  31. package/dist/{razor-64a81ed9.js → razor-b0d95f70.js} +1 -1
  32. package/dist/{tsMode-7279b789.js → tsMode-c9a7eab6.js} +1 -1
  33. package/dist/{typescript-a7692d5c.js → typescript-bebc976b.js} +1 -1
  34. package/dist/{xml-d9b2bff0.js → xml-5c9c448e.js} +1 -1
  35. package/dist/{yaml-a2b5d521.js → yaml-64e59a56.js} +1 -1
  36. package/package.json +1 -1
  37. package/dist/Shared/Components/ArtifactInfoModal/ArtifactInfoModal.component.d.ts +0 -4
  38. package/dist/Shared/Components/ArtifactInfoModal/index.d.ts +0 -2
  39. package/dist/Shared/Components/ArtifactInfoModal/types.d.ts +0 -15
  40. package/dist/Shared/Components/CommitChipCell/CommitChipCell.d.ts +0 -4
  41. package/dist/Shared/Components/CommitChipCell/index.d.ts +0 -2
  42. package/dist/Shared/Components/CommitChipCell/types.d.ts +0 -6
  43. package/dist/Shared/Components/ImageChipCell/ImageChipCell.component.d.ts +0 -4
  44. package/dist/Shared/Components/ImageChipCell/index.d.ts +0 -2
  45. package/dist/Shared/Components/ImageChipCell/types.d.ts +0 -9
  46. package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +0 -4
  47. package/dist/Shared/Components/MaterialHistory/index.d.ts +0 -2
  48. package/dist/Shared/Components/MaterialHistory/types.d.ts +0 -8
  49. package/dist/Shared/Services/app.service.d.ts +0 -7
  50. package/dist/Shared/Services/app.types.d.ts +0 -95
  51. package/dist/Shared/Services/utils.d.ts +0 -3
@@ -39,6 +39,7 @@ export declare const URLS: {
39
39
  APP_TRIGGER: string;
40
40
  GLOBAL_CONFIG_DOCKER: string;
41
41
  DEPLOYMENT_HISTORY_CONFIGURATIONS: string;
42
+ GLOBAL_CONFIG_SCOPED_VARIABLES: string;
42
43
  };
43
44
  export declare const ROUTES: {
44
45
  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,6 +1,3 @@
1
1
  import { ReloadType } from './Types';
2
2
 
3
- /**
4
- * @deprecated Use APIResponseHandler (Preferred) or error screen manager instead
5
- */
6
3
  export default function Reload({ reload, className, heightToDeduct }: ReloadType): 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;
@@ -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 { ResizableTagTextAreaProps } from '../../../Common';
2
+ import { ReactNode } from 'react';
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;
@@ -24,3 +26,6 @@ export declare const commonSelectStyles: {
24
26
  noOptionsMessage: (base: any) => any;
25
27
  placeholder: (base: any) => any;
26
28
  };
29
+ export declare const MenuListWithApplyButton: ({ handleApplyFilter, ...props }: MenuListProps<unknown, boolean, import('react-select').GroupBase<unknown>> & {
30
+ handleApplyFilter: () => void;
31
+ }) => JSX.Element;
@@ -23,8 +23,5 @@ export * from './FeatureDescription';
23
23
  export * from './CICDHistory';
24
24
  export * from './GitCommitInfoGeneric';
25
25
  export * from './Error';
26
- export * from './CommitChipCell';
27
- export * from './ImageChipCell';
28
- export * from './ArtifactInfoModal';
29
- export * from './MaterialHistory';
30
26
  export * from './IframeContainer';
27
+ export * from './KeyValueTable';
@@ -1,4 +1,2 @@
1
1
  export * from './types';
2
- export * from './app.types';
3
- export * from './app.service';
4
2
  export * from './common.service';
@@ -347,3 +347,4 @@ export declare const statusColor: {
347
347
  };
348
348
  export declare const APP_STATUS_HEADERS: string[];
349
349
  export declare const MATERIAL_EXCLUDE_TIPPY_TEXT = "Not available for build as this commit contains changes in excluded files or folders";
350
+ export declare const DEFAULT_SECRET_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
@@ -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
+ };