@devtron-labs/devtron-fe-common-lib 0.0.44-beta-1 → 0.0.45-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/DevtronProgressing/DevtronProgressing.d.ts +3 -0
- package/dist/Common/DevtronProgressing/index.d.ts +1 -0
- package/dist/Common/DevtronProgressing/types.d.ts +4 -0
- package/dist/Common/Helper.d.ts +15 -18
- package/dist/Common/RJSF/Form.d.ts +4 -0
- package/dist/Common/RJSF/common/FieldRow.d.ts +6 -0
- package/dist/Common/RJSF/common/types.d.ts +8 -0
- package/dist/Common/RJSF/config.d.ts +4 -0
- package/dist/Common/RJSF/constants.d.ts +7 -0
- package/dist/Common/RJSF/index.d.ts +3 -0
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/ArrayFieldTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/BaseInput.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.d.ts +3 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/index.d.ts +3 -0
- package/dist/Common/RJSF/templates/Description.d.ts +3 -0
- package/dist/Common/RJSF/templates/Field.d.ts +3 -0
- package/dist/Common/RJSF/templates/FieldErrorTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/TitleField.d.ts +3 -0
- package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.d.ts +3 -0
- package/dist/Common/RJSF/templates/index.d.ts +10 -0
- package/dist/Common/RJSF/types.d.ts +3 -0
- package/dist/Common/RJSF/utils.d.ts +26 -0
- package/dist/Common/RJSF/widgets/Checkbox.d.ts +3 -0
- package/dist/Common/RJSF/widgets/Select.d.ts +3 -0
- package/dist/Common/RJSF/widgets/index.d.ts +2 -0
- package/dist/Common/Types.d.ts +18 -1
- package/dist/Common/index.d.ts +2 -0
- package/dist/index.js +9649 -6863
- package/package.json +4 -1
- package/src/Assets/Icon/ic-chevron-down.svg +5 -0
- package/src/Assets/Icon/ic-rotate-devtron.svg +103 -0
- package/src/Common/DevtronProgressing/DevtronProgressing.tsx +11 -0
- package/src/Common/DevtronProgressing/index.ts +1 -0
- package/src/Common/DevtronProgressing/types.ts +4 -0
- package/src/Common/Helper.tsx +42 -11
- package/src/Common/RJSF/Form.tsx +29 -0
- package/src/Common/RJSF/common/FieldRow.tsx +35 -0
- package/src/Common/RJSF/common/types.ts +9 -0
- package/src/Common/RJSF/config.ts +37 -0
- package/src/Common/RJSF/constants.ts +10 -0
- package/src/Common/RJSF/index.ts +3 -0
- package/src/Common/RJSF/rjsfForm.scss +18 -0
- package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +31 -0
- package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +78 -0
- package/src/Common/RJSF/templates/BaseInput.tsx +16 -0
- package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +18 -0
- package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +10 -0
- package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +18 -0
- package/src/Common/RJSF/templates/ButtonTemplates/index.ts +3 -0
- package/src/Common/RJSF/templates/Description.tsx +12 -0
- package/src/Common/RJSF/templates/Field.tsx +30 -0
- package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +25 -0
- package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +105 -0
- package/src/Common/RJSF/templates/TitleField.tsx +9 -0
- package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +51 -0
- package/src/Common/RJSF/templates/index.ts +10 -0
- package/src/Common/RJSF/types.ts +4 -0
- package/src/Common/RJSF/utils.ts +123 -0
- package/src/Common/RJSF/widgets/Checkbox.tsx +44 -0
- package/src/Common/RJSF/widgets/Select.tsx +77 -0
- package/src/Common/RJSF/widgets/index.ts +2 -0
- package/src/Common/Types.ts +19 -1
- package/src/Common/index.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DevtronProgressing';
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as Sentry from '@sentry/browser';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { AsyncOptions, UseSearchString } from './Types';
|
|
3
|
+
import { AsyncOptions, CustomInputProps, UseSearchString } from './Types';
|
|
3
4
|
export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
|
|
4
5
|
interface ConditionalWrapper<T> {
|
|
5
6
|
condition: boolean;
|
|
@@ -11,7 +12,7 @@ export declare function sortCallback(key: string, a: any, b: any, isCaseSensitiv
|
|
|
11
12
|
export declare const stopPropagation: (event: any) => void;
|
|
12
13
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
13
14
|
export declare function getRandomColor(email: string): string;
|
|
14
|
-
export declare const getAlphabetIcon: (str: string) => JSX.Element;
|
|
15
|
+
export declare const getAlphabetIcon: (str: string, rootClassName?: string) => JSX.Element;
|
|
15
16
|
export declare const getEmptyArrayOfLength: (length: number) => unknown[];
|
|
16
17
|
export declare function noop(...args: any[]): any;
|
|
17
18
|
export declare function not(e: any): boolean;
|
|
@@ -24,22 +25,7 @@ export declare function useForm(stateSchema: any, validationSchema: {}, callback
|
|
|
24
25
|
handleOnChange: (event: any) => void;
|
|
25
26
|
handleOnSubmit: (event: any) => void;
|
|
26
27
|
};
|
|
27
|
-
export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled,
|
|
28
|
-
name: any;
|
|
29
|
-
value: any;
|
|
30
|
-
error: any;
|
|
31
|
-
onChange: any;
|
|
32
|
-
onBlur?: (e: any) => void;
|
|
33
|
-
onFocus?: (e: any) => void;
|
|
34
|
-
label: any;
|
|
35
|
-
type?: string;
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
autoComplete?: string;
|
|
38
|
-
labelClassName?: string;
|
|
39
|
-
placeholder?: string;
|
|
40
|
-
tabIndex?: number;
|
|
41
|
-
dataTestid?: string;
|
|
42
|
-
}): JSX.Element;
|
|
28
|
+
export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, }: CustomInputProps): JSX.Element;
|
|
43
29
|
export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
|
|
44
30
|
export declare function useSearchString(): UseSearchString;
|
|
45
31
|
export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
|
|
@@ -52,4 +38,15 @@ export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) =>
|
|
|
52
38
|
export declare function copyToClipboard(str: any, callback?: typeof noop): void;
|
|
53
39
|
export declare function useAsync<T>(func: (...rest: any[]) => Promise<T>, dependencyArray?: any[], shouldRun?: boolean, options?: AsyncOptions): [boolean, T, any | null, () => void, React.Dispatch<any>, any[]];
|
|
54
40
|
export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: any) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Appends search parameters to the url as a query string
|
|
43
|
+
*
|
|
44
|
+
* @param url URL to which the search params needs to be added
|
|
45
|
+
* @param params Object for the search parameters
|
|
46
|
+
*/
|
|
47
|
+
export declare const getUrlWithSearchParams: (url: string, params: Record<string | number, any>) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Custom exception logger function for logging errors to sentry
|
|
50
|
+
*/
|
|
51
|
+
export declare const logExceptionToSentry: typeof Sentry.captureException;
|
|
55
52
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldRowProps } from './types';
|
|
3
|
+
import { DO_NOT_SHOW_LABEL } from '../constants';
|
|
4
|
+
export declare const FieldRowWithLabel: ({ showLabel, label, required, children, id, shouldAlignCenter, }: Omit<FieldRowProps, "label"> & {
|
|
5
|
+
label: FieldRowProps['label'] | typeof DO_NOT_SHOW_LABEL;
|
|
6
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ArrayFieldTemplateItemType } from '@rjsf/utils';
|
|
3
|
+
export declare const ArrayFieldItemTemplate: ({ children, className, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ArrayFieldTemplateProps } from '@rjsf/utils';
|
|
3
|
+
export declare const ArrayFieldTemplate: ({ canAdd, className, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, title, }: ArrayFieldTemplateProps) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WrapIfAdditionalTemplateProps } from '@rjsf/utils';
|
|
3
|
+
export declare const WrapIfAdditionalTemplate: ({ id, disabled, label, onKeyChange, onDropPropertyClick, readonly, schema, children, uiSchema, registry, }: WrapIfAdditionalTemplateProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ArrayFieldTemplate } from './ArrayFieldTemplate';
|
|
2
|
+
export { ArrayFieldItemTemplate } from './ArrayFieldItemTemplate';
|
|
3
|
+
export { BaseInput as BaseInputTemplate } from './BaseInput';
|
|
4
|
+
export * from './ButtonTemplates';
|
|
5
|
+
export { Description as DescriptionFieldTemplate } from './Description';
|
|
6
|
+
export { Field as FieldTemplate } from './Field';
|
|
7
|
+
export { FieldErrorTemplate } from './FieldErrorTemplate';
|
|
8
|
+
export { ObjectFieldTemplate } from './ObjectFieldTemplate';
|
|
9
|
+
export { TitleField as TitleFieldTemplate } from './TitleField';
|
|
10
|
+
export { WrapIfAdditionalTemplate } from './WrapIfAdditionalTemplate';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
+
/**
|
|
4
|
+
* Override for the TranslatableString from RJSF
|
|
5
|
+
*/
|
|
6
|
+
export declare const translateString: (stringToTranslate: TranslatableString, params?: string[]) => string;
|
|
7
|
+
export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
|
|
8
|
+
menuList: (base: any) => any;
|
|
9
|
+
control: (base: any, state: any) => any;
|
|
10
|
+
option: (base: any, state: any) => any;
|
|
11
|
+
dropdownIndicator: (base: any, state: any) => any;
|
|
12
|
+
valueContainer: (base: any, state: any) => any;
|
|
13
|
+
loadingMessage: (base: any) => any;
|
|
14
|
+
noOptionsMessage: (base: any) => any;
|
|
15
|
+
multiValue: (base: any, state: any) => any;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Returns the redirection props for a url
|
|
19
|
+
*/
|
|
20
|
+
export declare const getRedirectionProps: (url: string) => import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
21
|
+
url: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Infers the type for json schema from value type
|
|
25
|
+
*/
|
|
26
|
+
export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -322,7 +322,6 @@ export interface CommonNodeAttr {
|
|
|
322
322
|
};
|
|
323
323
|
appReleaseTagNames?: string[];
|
|
324
324
|
tagsEditable?: boolean;
|
|
325
|
-
isGitOpsRepoNotConfigured?: boolean;
|
|
326
325
|
}
|
|
327
326
|
export declare enum DeploymentAppTypes {
|
|
328
327
|
HELM = "helm",
|
|
@@ -564,4 +563,22 @@ export interface CiPipeline {
|
|
|
564
563
|
isOffendingMandatoryPlugin?: boolean;
|
|
565
564
|
pipelineType?: string;
|
|
566
565
|
}
|
|
566
|
+
export interface CustomInputProps {
|
|
567
|
+
name: string;
|
|
568
|
+
value: string;
|
|
569
|
+
error?: React.ReactNode;
|
|
570
|
+
onChange: (e: any) => void;
|
|
571
|
+
onBlur?: (e: any) => void;
|
|
572
|
+
onFocus?: (e: any) => void;
|
|
573
|
+
label?: React.ReactNode;
|
|
574
|
+
type?: string;
|
|
575
|
+
disabled?: boolean;
|
|
576
|
+
labelClassName?: string;
|
|
577
|
+
placeholder?: string;
|
|
578
|
+
tabIndex?: number;
|
|
579
|
+
dataTestid?: string;
|
|
580
|
+
isRequiredField?: boolean;
|
|
581
|
+
autoFocus?: boolean;
|
|
582
|
+
rootClassName?: string;
|
|
583
|
+
}
|
|
567
584
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -40,3 +40,5 @@ export { default as Grid } from './Grid/Grid';
|
|
|
40
40
|
export { default as ClipboardButton } from './ClipboardButton/ClipboardButton';
|
|
41
41
|
export * from './Hooks';
|
|
42
42
|
export { AppStatus } from './AppStatus';
|
|
43
|
+
export * from './RJSF';
|
|
44
|
+
export * from './DevtronProgressing';
|