@devtron-labs/devtron-fe-common-lib 0.1.5-beta-1 → 0.1.6-beta-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.
- package/dist/Common/AppStatus/constants.d.ts +0 -5
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
- package/dist/Common/CustomTagSelector/Types.d.ts +2 -0
- package/dist/Common/Helper.d.ts +3 -0
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +1 -1
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +2 -1
- package/dist/Common/RJSF/types.d.ts +12 -0
- package/dist/Common/RJSF/utils.d.ts +2 -2
- package/dist/Common/Tippy.d.ts +4 -0
- package/dist/Common/Types.d.ts +3 -0
- package/dist/Common/index.d.ts +1 -0
- package/dist/Pages/GlobalConfigurations/ScopedVariables/index.d.ts +1 -0
- package/dist/Pages/GlobalConfigurations/ScopedVariables/types.d.ts +17 -0
- package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
- package/dist/Shared/Components/Header/HeaderWithCreateButton/constants.d.ts +22 -0
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +3 -0
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +77 -0
- package/dist/Shared/Components/KeyValueTable/index.d.ts +2 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +5 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/constants.d.ts +0 -24
- package/dist/Shared/types.d.ts +1 -8
- package/dist/Shared/validations.d.ts +7 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-444c9133.js → cssMode-6a4706a8.js} +1 -1
- package/dist/{freemarker2-c5bf9db1.js → freemarker2-0e520fd8.js} +1 -1
- package/dist/{handlebars-e2a2ac18.js → handlebars-1eb8699a.js} +1 -1
- package/dist/{html-f123a9a4.js → html-65401b28.js} +1 -1
- package/dist/{htmlMode-d4d325a5.js → htmlMode-208bbe79.js} +1 -1
- package/dist/{index-616abab4.js → index-e7f1d78b.js} +27580 -25717
- package/dist/index.d.ts +2 -2
- package/dist/index.js +424 -418
- package/dist/{javascript-21917f57.js → javascript-fdd50db5.js} +1 -1
- package/dist/{jsonMode-6f0f5438.js → jsonMode-bfc1f3b2.js} +1 -1
- package/dist/{liquid-582d3829.js → liquid-c30ccb52.js} +1 -1
- package/dist/{mdx-2d086130.js → mdx-f6652a77.js} +1 -1
- package/dist/{python-a3fe029f.js → python-e6ac31ea.js} +1 -1
- package/dist/{razor-fef1552e.js → razor-77f814ac.js} +1 -1
- package/dist/{tsMode-710957af.js → tsMode-b5cfc4c2.js} +1 -1
- package/dist/{typescript-b8f7d362.js → typescript-207d962f.js} +1 -1
- package/dist/{xml-703da184.js → xml-598b1432.js} +1 -1
- package/dist/{yaml-6814a438.js → yaml-d31c3065.js} +1 -1
- package/package.json +3 -2
|
@@ -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;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React, SyntheticEvent } from 'react';
|
|
2
|
+
import { JSONPathOptions } from 'jsonpath-plus';
|
|
2
3
|
import { AsyncOptions, UseSearchString } from './Types';
|
|
3
4
|
import { scrollableInterface } from '../Shared';
|
|
4
5
|
|
|
@@ -94,6 +95,8 @@ export declare const getRegexMatchPositions: (string: string, regex: RegExp) =>
|
|
|
94
95
|
* @returns set of substrings
|
|
95
96
|
*/
|
|
96
97
|
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[];
|
|
97
100
|
/**
|
|
98
101
|
* Returns a debounced variant of the function
|
|
99
102
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ArrayFieldTemplateItemType } from '@rjsf/utils';
|
|
2
2
|
|
|
3
|
-
export declare const ArrayFieldItemTemplate: ({ children,
|
|
3
|
+
export declare const ArrayFieldItemTemplate: ({ children, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ObjectFieldTemplateProps } from '@rjsf/utils';
|
|
2
|
+
import { RJSFFormSchema } from '../types';
|
|
2
3
|
|
|
3
|
-
export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
|
|
4
|
+
export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps<any, RJSFFormSchema, any>) => JSX.Element;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { default as RJSFForm } from '@rjsf/core';
|
|
3
|
+
import { StrictRJSFSchema } from '@rjsf/utils';
|
|
3
4
|
|
|
4
5
|
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 '
|
|
2
|
+
import { default as Tippy } from '../Tippy';
|
|
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']) => (children: any) => JSX.Element;
|
|
28
|
+
export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement'], truncateWidth?: number) => (children: any) => JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -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;
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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,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
|
+
}
|
|
@@ -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;
|
|
@@ -348,30 +348,6 @@ 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
|
-
};
|
|
375
351
|
export declare enum K8sResourcePayloadAppType {
|
|
376
352
|
DEVTRON_APP = 0,
|
|
377
353
|
HELM_APP = 1,
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -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
|
+
};
|