@devtron-labs/devtron-fe-common-lib 0.1.3-beta-4 → 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 (37) hide show
  1. package/dist/Common/AppStatus/constants.d.ts +0 -5
  2. package/dist/Common/Constants.d.ts +1 -0
  3. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
  4. package/dist/Common/CustomTagSelector/Types.d.ts +2 -0
  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/Header/HeaderWithCreateButton/constants.d.ts +22 -0
  10. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +3 -0
  11. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +77 -0
  12. package/dist/Shared/Components/KeyValueTable/index.d.ts +2 -0
  13. package/dist/Shared/Components/ReactSelect/utils.d.ts +5 -0
  14. package/dist/Shared/Components/index.d.ts +1 -0
  15. package/dist/Shared/constants.d.ts +0 -24
  16. package/dist/Shared/types.d.ts +1 -8
  17. package/dist/Shared/validations.d.ts +7 -0
  18. package/dist/assets/index.css +1 -1
  19. package/dist/{cssMode-fcc60ae9.js → cssMode-ee470724.js} +1 -1
  20. package/dist/{freemarker2-7491da88.js → freemarker2-fadd3e0c.js} +1 -1
  21. package/dist/{handlebars-dc7630c9.js → handlebars-9c9b1c76.js} +1 -1
  22. package/dist/{html-4fbb17ab.js → html-69f95eb0.js} +1 -1
  23. package/dist/{htmlMode-e378c3c0.js → htmlMode-d04b9950.js} +1 -1
  24. package/dist/{index-e1ef4377.js → index-e6ef4e33.js} +20242 -20043
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +428 -425
  27. package/dist/{javascript-2ff0a654.js → javascript-e59dbc5b.js} +1 -1
  28. package/dist/{jsonMode-af3e1bc3.js → jsonMode-e187b70f.js} +1 -1
  29. package/dist/{liquid-7b4f5687.js → liquid-ff0130cf.js} +1 -1
  30. package/dist/{mdx-16562f9f.js → mdx-74ce463f.js} +1 -1
  31. package/dist/{python-9f2b0842.js → python-e6a1823a.js} +1 -1
  32. package/dist/{razor-e9fd1b25.js → razor-e44a3e22.js} +1 -1
  33. package/dist/{tsMode-c2d1357a.js → tsMode-83bc8ce9.js} +1 -1
  34. package/dist/{typescript-11b1a103.js → typescript-ece899bc.js} +1 -1
  35. package/dist/{xml-20bcc243.js → xml-ff876150.js} +1 -1
  36. package/dist/{yaml-60b03f72.js → yaml-17100987.js} +1 -1
  37. package/package.json +1 -1
@@ -4,11 +4,6 @@ export declare const StatusConstants: {
4
4
  normalCase: string;
5
5
  lowerCase: string;
6
6
  };
7
- NOT_READY: {
8
- noSpaceLower: string;
9
- normalCase: string;
10
- lowerCase: string;
11
- };
12
7
  APP_STATUS: {
13
8
  noSpaceLower: string;
14
9
  normalText: string;
@@ -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
  }
@@ -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,22 @@
1
+ declare const AppListConstants: {
2
+ SAMPLE_NODE_REPO_URL: string;
3
+ CREATE_DEVTRON_APP_URL: string;
4
+ AppTabs: {
5
+ DEVTRON_APPS: string;
6
+ HELM_APPS: string;
7
+ ARGO_APPS: string;
8
+ };
9
+ AppType: {
10
+ DEVTRON_APPS: string;
11
+ HELM_APPS: string;
12
+ ARGO_APPS: string;
13
+ };
14
+ FilterType: {
15
+ PROJECT: string;
16
+ CLUTSER: string;
17
+ NAMESPACE: string;
18
+ ENVIRONMENT: string;
19
+ APP_STATUS: string;
20
+ };
21
+ };
22
+ export default AppListConstants;
@@ -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';
@@ -348,27 +348,3 @@ export declare const statusColor: {
348
348
  };
349
349
  export declare const APP_STATUS_HEADERS: string[];
350
350
  export declare const MATERIAL_EXCLUDE_TIPPY_TEXT = "Not available for build as this commit contains changes in excluded files or folders";
351
- export declare const AppListConstants: {
352
- SAMPLE_NODE_REPO_URL: string;
353
- CREATE_DEVTRON_APP_URL: string;
354
- AppTabs: {
355
- DEVTRON_APPS: string;
356
- HELM_APPS: string;
357
- ARGO_APPS: string;
358
- FLUX_APPS: string;
359
- };
360
- AppType: {
361
- DEVTRON_APPS: string;
362
- HELM_APPS: string;
363
- ARGO_APPS: string;
364
- FLUX_APPS: string;
365
- };
366
- FilterType: {
367
- PROJECT: string;
368
- CLUTSER: string;
369
- NAMESPACE: string;
370
- ENVIRONMENT: string;
371
- APP_STATUS: string;
372
- TEMPLATE_TYPE: string;
373
- };
374
- };
@@ -124,8 +124,7 @@ export declare enum AppType {
124
124
  DEVTRON_APP = "devtron_app",
125
125
  DEVTRON_HELM_CHART = "devtron_helm_chart",
126
126
  EXTERNAL_HELM_CHART = "external_helm_chart",
127
- EXTERNAL_ARGO_APP = "external_argo_app",
128
- EXTERNAL_FLUX_APP = "external_flux_app"
127
+ EXTERNAL_ARGO_APP = "external_argo_app"
129
128
  }
130
129
  export interface HelmReleaseStatus {
131
130
  status: string;
@@ -141,11 +140,6 @@ interface MaterialInfo {
141
140
  url: string;
142
141
  webhookData: string;
143
142
  }
144
- export interface FluxAppStatusDetail {
145
- status: string;
146
- message: string;
147
- reason: string;
148
- }
149
143
  export interface AppDetails {
150
144
  appId?: number;
151
145
  appName: string;
@@ -187,7 +181,6 @@ export interface AppDetails {
187
181
  helmPackageName?: string;
188
182
  appStatus?: string;
189
183
  chartAvatar?: string;
190
- FluxAppStatusDetail?: FluxAppStatusDetail;
191
184
  }
192
185
  export declare enum RegistryType {
193
186
  GIT = "git",
@@ -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
+ };