@devtron-labs/devtron-fe-common-lib 1.7.2 → 1.7.4
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/{@code-editor-DNNW9VT4.js → @code-editor-eNie_Z1c.js} +7430 -7182
- package/dist/{@common-rjsf-BwlfG32o.js → @common-rjsf-CeBDaYTw.js} +2 -2
- package/dist/{@framer-motion-C88ROIS4.js → @framer-motion-C9i0O6dh.js} +1 -1
- package/dist/{@react-dates-Ct1VA7V6.js → @react-dates-DEMedmhG.js} +1 -1
- package/dist/{@react-select-qU4oRypC.js → @react-select-DD4GMsWv.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DmvoaDNw.js → @react-virtualized-sticky-tree-BlYAzsAg.js} +1 -1
- package/dist/{@vendor-C6rSXA7p.js → @vendor-CIA81cZg.js} +2343 -2346
- package/dist/Common/Constants.d.ts +2 -3
- package/dist/Common/Helper.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Tooltip/index.d.ts +1 -0
- package/dist/Common/index.d.ts +0 -2
- package/dist/Shared/Components/Button/Button.component.d.ts +2 -2
- package/dist/Shared/Components/Button/types.d.ts +10 -10
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/utils.d.ts +2 -2
- package/dist/Shared/Components/CustomInput/CustomInput.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/PasswordField.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/constants.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/index.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/types.d.ts +36 -0
- package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +1 -1
- package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +1 -1
- package/dist/Shared/Components/FormFieldWrapper/types.d.ts +19 -4
- package/dist/Shared/Components/GitProviderIcon/GitProviderIcon.d.ts +2 -0
- package/dist/Shared/Components/GitProviderIcon/index.d.ts +2 -0
- package/dist/Shared/Components/GitProviderIcon/types.d.ts +10 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +48 -0
- package/dist/Shared/Components/Icon/IconBase.d.ts +2 -0
- package/dist/Shared/Components/Icon/index.d.ts +1 -0
- package/dist/Shared/Components/Icon/types.d.ts +23 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +0 -1
- package/dist/Shared/Components/RegistryIcon/RegistryIcon.d.ts +2 -0
- package/dist/Shared/Components/RegistryIcon/constants.d.ts +2 -0
- package/dist/Shared/Components/RegistryIcon/index.d.ts +2 -0
- package/dist/Shared/Components/RegistryIcon/types.d.ts +10 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/StatusComponent/AppStatus.d.ts +2 -0
- package/dist/Shared/Components/StatusComponent/DeploymentStatus.d.ts +2 -0
- package/dist/Shared/Components/StatusComponent/StatusComponent.d.ts +2 -0
- package/dist/Shared/Components/StatusComponent/constants.d.ts +7 -0
- package/dist/Shared/Components/StatusComponent/index.d.ts +5 -0
- package/dist/Shared/Components/StatusComponent/types.d.ts +48 -0
- package/dist/Shared/Components/StatusComponent/utils.d.ts +5 -0
- package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +5 -0
- package/dist/Shared/Helpers.d.ts +4 -2
- package/dist/Shared/Services/ToastManager/types.d.ts +3 -3
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-aborted.d162b12b.svg +21 -0
- package/dist/assets/ic-azure.fb4a8598.svg +23 -0
- package/dist/assets/ic-build-color.37484d39.svg +33 -0
- package/dist/assets/ic-cancelled.3cd048aa.svg +20 -0
- package/dist/assets/ic-cd.165ef184.svg +46 -0
- package/dist/assets/ic-ci-linked.b25fbb2f.svg +34 -0
- package/dist/assets/ic-ci-webhook.a2ab6db6.svg +42 -0
- package/dist/assets/ic-circle-loader.d46f797f.svg +1 -0
- package/dist/assets/ic-clock.4109c84f.svg +19 -0
- package/dist/assets/ic-close-small.e16620af.svg +3 -0
- package/dist/assets/ic-container.4e1e6455.svg +19 -0
- package/dist/assets/ic-dockerhub.016af724.svg +3 -0
- package/dist/assets/ic-ecr.36433895.svg +9 -0
- package/dist/assets/ic-env.c0634f19.svg +29 -0
- package/dist/assets/ic-error.1794c183.svg +4 -0
- package/dist/assets/ic-failure.0220b612.svg +24 -0
- package/dist/assets/ic-git.bb72e063.svg +17 -0
- package/dist/assets/ic-github.b6e9d0f3.svg +19 -0
- package/dist/assets/ic-google-artifact-registry.73ff5bb0.svg +25 -0
- package/dist/assets/ic-google-container-registry.815ede09.svg +25 -0
- package/dist/assets/ic-heart-green.6d3bb9cf.svg +20 -0
- package/dist/assets/ic-heart-red-animated.5f500b76.svg +58 -0
- package/dist/assets/ic-heart-red.ae773db3.svg +19 -0
- package/dist/assets/ic-hibernate.988d2323.svg +28 -0
- package/dist/assets/ic-in-progress.2557f822.svg +4 -0
- package/dist/assets/ic-info-outline.9f0ddc8d.svg +3 -0
- package/dist/assets/ic-job-color.bb826301.svg +25 -0
- package/dist/assets/ic-missing.917a1291.svg +20 -0
- package/dist/assets/ic-node-script.88af3604.svg +35 -0
- package/dist/assets/ic-out-of-sync.824fb5c6.svg +24 -0
- package/dist/assets/ic-paper-plane-color.b290f604.svg +36 -0
- package/dist/assets/ic-quay.d9df1c86.svg +11 -0
- package/dist/assets/ic-success.22477863.svg +4 -0
- package/dist/assets/ic-suspended.8a62c6bc.svg +25 -0
- package/dist/assets/ic-timeout-two-dash.fed11c84.svg +5 -0
- package/dist/assets/ic-unknown.89dc351a.svg +21 -0
- package/dist/assets/ic-visibility-off.d91d3844.svg +19 -0
- package/dist/assets/ic-visibility-on.7505dd12.svg +20 -0
- package/dist/index.js +627 -622
- package/package.json +5 -4
- package/dist/Common/AppStatus/AppStatus.d.ts +0 -2
- package/dist/Common/AppStatus/constants.d.ts +0 -36
- package/dist/Common/AppStatus/index.d.ts +0 -2
- package/dist/Common/AppStatus/types.d.ts +0 -12
- package/dist/Common/AppStatus/utils.d.ts +0 -2
- package/dist/Common/CustomInput/CustomInput.d.ts +0 -2
- package/dist/Common/CustomInput/Types.d.ts +0 -30
- package/dist/Common/CustomInput/index.d.ts +0 -2
- package/dist/Common/utils.d.ts +0 -1
@@ -1,4 +1,3 @@
|
|
1
|
-
import { RegistryTypeDetailType } from './Types';
|
2
1
|
export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
|
3
2
|
export declare const Host: string;
|
4
3
|
export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
|
@@ -176,7 +175,6 @@ export declare const BuildStageVariable: {
|
|
176
175
|
Build: string;
|
177
176
|
PostBuild: string;
|
178
177
|
};
|
179
|
-
export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
|
180
178
|
export declare const RepositoryAction: {
|
181
179
|
CONTAINER: string;
|
182
180
|
CHART_PULL: string;
|
@@ -328,7 +326,8 @@ export declare enum GitProviderType {
|
|
328
326
|
GITLAB = "gitlab",
|
329
327
|
BITBUCKET = "bitbucket",
|
330
328
|
AZURE = "azure",
|
331
|
-
GITEA = "gitea"
|
329
|
+
GITEA = "gitea",
|
330
|
+
GIT = "git"
|
332
331
|
}
|
333
332
|
/**
|
334
333
|
* Formats the schema removing any irregularity in the existing schema
|
package/dist/Common/Helper.d.ts
CHANGED
@@ -10,7 +10,7 @@ interface ConditionalWrapper<T> {
|
|
10
10
|
children: T;
|
11
11
|
}
|
12
12
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
13
|
-
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean):
|
13
|
+
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 1 | 0 | -1;
|
14
14
|
export declare const stopPropagation: (event: any) => void;
|
15
15
|
export declare const preventDefault: (event: SyntheticEvent) => void;
|
16
16
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
2
2
|
import { FormProps } from './types';
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "method" | "autoComplete" | "tagName" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
package/dist/Common/index.d.ts
CHANGED
@@ -42,13 +42,11 @@ export * from './RJSF';
|
|
42
42
|
export * from './DevtronProgressing';
|
43
43
|
export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
|
44
44
|
export * from './AddCDButton';
|
45
|
-
export * from './CustomInput';
|
46
45
|
export * from './DraggableWrapper';
|
47
46
|
export * from './Pagination';
|
48
47
|
export * from './Markdown';
|
49
48
|
export * from './GenericDescription';
|
50
49
|
export * from './SegmentedBarChart';
|
51
50
|
export * from './CodeEditor';
|
52
|
-
export * from './AppStatus';
|
53
51
|
export * from './Tooltip';
|
54
52
|
export * from './SegmentedControl';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonProps } from './types';
|
1
|
+
import { ButtonComponentType, ButtonProps } from './types';
|
2
2
|
/**
|
3
3
|
* Generic component for Button.
|
4
4
|
* Should be used in combination of variant, size and style.
|
@@ -63,5 +63,5 @@ import { ButtonProps } from './types';
|
|
63
63
|
* <Button icon={<ICCube />} ariaLabel="Label" />
|
64
64
|
* ```
|
65
65
|
*/
|
66
|
-
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps) => JSX.Element;
|
66
|
+
declare const Button: <ComponentType extends ButtonComponentType>({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps<ComponentType>) => JSX.Element;
|
67
67
|
export default Button;
|
@@ -20,27 +20,27 @@ export declare enum ButtonComponentType {
|
|
20
20
|
button = "button",
|
21
21
|
link = "link"
|
22
22
|
}
|
23
|
-
export type ButtonProps = ({
|
23
|
+
export type ButtonProps<ComponentType extends ButtonComponentType = ButtonComponentType.button> = (ComponentType extends ButtonComponentType.link ? {
|
24
|
+
component: ButtonComponentType.link;
|
25
|
+
/**
|
26
|
+
* Props for the link component
|
27
|
+
*/
|
28
|
+
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
29
|
+
buttonProps?: never;
|
30
|
+
onClick?: LinkProps['onClick'];
|
31
|
+
} : {
|
24
32
|
/**
|
25
33
|
* Component to be rendered from the available options
|
26
34
|
*
|
27
35
|
* @default ButtonComponentType.button
|
28
36
|
*/
|
29
|
-
component?:
|
37
|
+
component?: ComponentType | never;
|
30
38
|
/**
|
31
39
|
* Props for the button component
|
32
40
|
*/
|
33
41
|
buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'styles' | 'className' | 'disabled' | 'onClick'>;
|
34
42
|
linkProps?: never;
|
35
43
|
onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
|
36
|
-
} | {
|
37
|
-
component: ButtonComponentType.link;
|
38
|
-
/**
|
39
|
-
* Props for the link component
|
40
|
-
*/
|
41
|
-
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
42
|
-
buttonProps?: never;
|
43
|
-
onClick?: LinkProps['onClick'];
|
44
44
|
}) & {
|
45
45
|
/**
|
46
46
|
* Variant of the button
|
@@ -2,5 +2,4 @@ import { DeploymentConfigDiffProps } from '@Shared/Components/DeploymentConfigDi
|
|
2
2
|
import { History } from '../types';
|
3
3
|
import { DeploymentHistoryConfigDiffProps } from './types';
|
4
4
|
export declare const renderDeploymentHistoryConfig: (config: DeploymentConfigDiffProps["configList"], heading: string, pathname: string, hideDiffState: boolean) => JSX.Element;
|
5
|
-
export declare const renderPipelineDeploymentStatusIcon: (status: string) => JSX.Element;
|
6
5
|
export declare const renderPipelineDeploymentOptionDescription: ({ stage, triggeredBy, triggeredByEmail, artifact, renderRunSource, resourceId, runSource, }: Pick<History, "triggeredBy" | "triggeredByEmail" | "artifact" | "stage" | "runSource"> & Pick<DeploymentHistoryConfigDiffProps, "renderRunSource" | "resourceId">) => JSX.Element;
|
@@ -6,8 +6,6 @@ export declare const getParsedTriggerHistory: (result: any) => DeploymentHistory
|
|
6
6
|
export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
|
7
7
|
export declare const renderIcon: (iconState: string) => JSX.Element;
|
8
8
|
export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
|
9
|
-
export declare const renderProgressingTriggerIcon: (baseClass?: string) => JSX.Element;
|
10
|
-
export declare const getTriggerStatusIcon: (triggerDetailStatus: string) => JSX.Element;
|
11
9
|
export declare const getLogSearchIndex: ({ stageIndex, lineNumberInsideStage, }: Record<"stageIndex" | "lineNumberInsideStage", number>) => string;
|
12
10
|
export declare const sanitizeWorkflowExecutionStages: (workflowExecutionStages: WorkflowExecutionStagesMapDTO["workflowExecutionStages"]) => ExecutionInfoType | null;
|
13
11
|
export declare const getIconFromWorkflowStageStatusType: (status: WorkflowStageStatusType, baseClass?: string) => ReactElement;
|
@@ -36,3 +34,5 @@ export declare const getStatusFilters: ({ allNodeCount, missingNodeCount, failed
|
|
36
34
|
count: number;
|
37
35
|
})[];
|
38
36
|
};
|
37
|
+
export declare const getAppStatusIcon: (status: NodeStatus | NodeFilters, hideMessage?: boolean) => JSX.Element;
|
38
|
+
export declare const getTriggerStatusIcon: (status: string) => string;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { CustomInputProps } from './types';
|
2
|
+
declare const CustomInput: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderConfig, borderRadiusConfig, type, autoFocus, endIconButtonConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...props }: CustomInputProps) => JSX.Element;
|
3
|
+
export default CustomInput;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
2
|
+
import { ComponentSizeType } from '../../constants';
|
3
|
+
import { FormFieldWrapperProps } from '../FormFieldWrapper';
|
4
|
+
import { ButtonComponentType, ButtonProps } from '../Button';
|
5
|
+
export interface CustomInputProps extends Omit<FormFieldWrapperProps, 'children' | 'inputId'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'disabled' | 'autoFocus' | 'onFocus' | 'onKeyDown'>, Required<Pick<InputHTMLAttributes<HTMLInputElement>, 'placeholder' | 'onChange' | 'value' | 'name'>> {
|
6
|
+
/**
|
7
|
+
* If false, the input is not trimmed on blur
|
8
|
+
*
|
9
|
+
* @default true
|
10
|
+
*/
|
11
|
+
shouldTrim?: boolean;
|
12
|
+
/**
|
13
|
+
* Size of the input
|
14
|
+
*
|
15
|
+
* @default ComponentSizeType.large
|
16
|
+
*/
|
17
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
18
|
+
/**
|
19
|
+
* Type for the input
|
20
|
+
*
|
21
|
+
* Note: For password field, use PasswordField component
|
22
|
+
*
|
23
|
+
* @default 'text'
|
24
|
+
*/
|
25
|
+
type?: Exclude<InputHTMLAttributes<HTMLInputElement>['type'], 'password'>;
|
26
|
+
/**
|
27
|
+
* End icon button configuration
|
28
|
+
*/
|
29
|
+
endIconButtonConfig?: Required<Pick<ButtonProps<ButtonComponentType.button>, 'icon' | 'onClick' | 'ariaLabel'>> & Pick<ButtonProps<ButtonComponentType.button>, 'disabled' | 'showAriaLabelInTippy' | 'style'>;
|
30
|
+
}
|
31
|
+
export interface PasswordFieldProps extends Omit<CustomInputProps, 'endIconButtonConfig' | 'type'> {
|
32
|
+
/**
|
33
|
+
* If true, the value is cleared & default placeholder is shown on blur
|
34
|
+
*/
|
35
|
+
shouldShowDefaultPlaceholderOnBlur: boolean;
|
36
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FormFieldLabelProps } from './types';
|
2
|
-
declare const FormFieldLabel: ({ label, inputId, required, layout }: FormFieldLabelProps) => JSX.Element;
|
2
|
+
declare const FormFieldLabel: ({ label, inputId, required, layout, labelTooltipConfig, labelTippyCustomizedConfig, }: FormFieldLabelProps) => JSX.Element;
|
3
3
|
export default FormFieldLabel;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FormFieldWrapperProps } from './types';
|
2
|
-
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, }: Required<FormFieldWrapperProps>) => JSX.Element;
|
2
|
+
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, }: Required<FormFieldWrapperProps>) => JSX.Element;
|
3
3
|
export default FormFieldWrapper;
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
2
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
3
|
+
import { InfoIconTippyProps } from '../../../Common/Types';
|
2
4
|
import { BorderConfigType, ComponentLayoutType } from '../../types';
|
3
5
|
export type LabelOrAriaLabelType = {
|
4
6
|
label: ReactNode;
|
@@ -7,7 +9,7 @@ export type LabelOrAriaLabelType = {
|
|
7
9
|
label?: never;
|
8
10
|
ariaLabel: string;
|
9
11
|
};
|
10
|
-
export type FormFieldLabelProps = LabelOrAriaLabelType & {
|
12
|
+
export type FormFieldLabelProps<Layout extends ComponentLayoutType = ComponentLayoutType> = LabelOrAriaLabelType & {
|
11
13
|
/**
|
12
14
|
* If true, the field is required and * is shown with the label
|
13
15
|
*/
|
@@ -19,8 +21,20 @@ export type FormFieldLabelProps = LabelOrAriaLabelType & {
|
|
19
21
|
/**
|
20
22
|
* Layout of the field
|
21
23
|
*/
|
22
|
-
layout?:
|
23
|
-
}
|
24
|
+
layout?: Layout;
|
25
|
+
} & (Layout extends 'row' ? {
|
26
|
+
/**
|
27
|
+
* Tooltip configuration for the label in row layout
|
28
|
+
*/
|
29
|
+
labelTooltipConfig?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'>;
|
30
|
+
labelTippyCustomizedConfig?: never;
|
31
|
+
} : {
|
32
|
+
labelTooltipConfig?: never;
|
33
|
+
/**
|
34
|
+
* Tippy configuration for the label in column layout
|
35
|
+
*/
|
36
|
+
labelTippyCustomizedConfig?: Required<Pick<InfoIconTippyProps, 'heading' | 'infoText'>> & Pick<InfoIconTippyProps, 'documentationLink' | 'documentationLinkText'>;
|
37
|
+
});
|
24
38
|
export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
|
25
39
|
/**
|
26
40
|
* Error message for the field
|
@@ -41,11 +55,12 @@ export interface FormInfoItemProps {
|
|
41
55
|
textClass: string;
|
42
56
|
icon: ReactElement;
|
43
57
|
}
|
44
|
-
export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout'>, FormFieldInfoProps {
|
58
|
+
export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout' | 'labelTippyCustomizedConfig' | 'labelTooltipConfig'>, FormFieldInfoProps {
|
45
59
|
/**
|
46
60
|
* If true, the field takes the full width of the parent
|
47
61
|
*/
|
48
62
|
fullWidth?: boolean;
|
49
63
|
children: ReactElement;
|
50
64
|
borderRadiusConfig?: BorderConfigType;
|
65
|
+
borderConfig?: BorderConfigType;
|
51
66
|
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { GitProviderType } from '../../../Common/Constants';
|
2
|
+
import { IconsProps } from '../Icon';
|
3
|
+
export interface GitProviderIconProps {
|
4
|
+
gitProvider: GitProviderType;
|
5
|
+
/**
|
6
|
+
* The size of the icon in pixels.
|
7
|
+
* @default 20
|
8
|
+
*/
|
9
|
+
size?: IconsProps['size'];
|
10
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { IconBaseProps } from './types';
|
2
|
+
export declare const iconMap: {
|
3
|
+
'ic-aborted': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
4
|
+
'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
5
|
+
'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
6
|
+
'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
7
|
+
'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
8
|
+
'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
9
|
+
'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
10
|
+
'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
11
|
+
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
12
|
+
'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
|
+
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
14
|
+
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
15
|
+
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
16
|
+
'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
17
|
+
'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
18
|
+
'ic-error': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
|
+
'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
|
+
'ic-git': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
|
+
'ic-github': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
22
|
+
'ic-gitlab': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
|
+
'ic-google-artifact-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
24
|
+
'ic-google-container-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
25
|
+
'ic-heart-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
26
|
+
'ic-heart-red-animated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
27
|
+
'ic-heart-red': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
28
|
+
'ic-hibernate': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
29
|
+
'ic-in-progress': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
30
|
+
'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
31
|
+
'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
32
|
+
'ic-missing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
33
|
+
'ic-node-script': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
34
|
+
'ic-open-in-new': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
35
|
+
'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
36
|
+
'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
37
|
+
'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
38
|
+
'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
39
|
+
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
40
|
+
'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
41
|
+
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
42
|
+
};
|
43
|
+
export type IconName = keyof typeof iconMap;
|
44
|
+
export interface IconsProps extends Omit<IconBaseProps, 'name' | 'iconMap'> {
|
45
|
+
/** The name of the icon to render. */
|
46
|
+
name: keyof typeof iconMap;
|
47
|
+
}
|
48
|
+
export declare const Icon: (props: IconsProps) => JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Icon';
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { FC, SVGAttributes, SVGProps } from 'react';
|
2
|
+
import { TooltipProps } from '@Common/Tooltip/types';
|
3
|
+
type IconMap = Record<string, FC<SVGProps<SVGSVGElement>>>;
|
4
|
+
export interface IconBaseProps extends Pick<SVGAttributes<SVGSVGElement>, 'strokeWidth'> {
|
5
|
+
/** The name of the icon to render. */
|
6
|
+
name: keyof IconMap;
|
7
|
+
/** The map containing all available icons. */
|
8
|
+
iconMap: IconMap;
|
9
|
+
/**
|
10
|
+
* The size of the icon in pixels.
|
11
|
+
* @default 16
|
12
|
+
*/
|
13
|
+
size?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 28 | 30 | 32 | 34 | 36 | 40 | 42 | 44 | 48 | 72 | 80;
|
14
|
+
/** Props to configure the tooltip when hovering over the icon. */
|
15
|
+
tooltipProps?: TooltipProps;
|
16
|
+
/**
|
17
|
+
* The color of the icon (color tokens). \
|
18
|
+
* If `null`, the default color present in icon is used.
|
19
|
+
* @example `'B500'`, `'N200'`, `'G50'`, `'R700'`
|
20
|
+
*/
|
21
|
+
color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50'}` | null;
|
22
|
+
}
|
23
|
+
export {};
|
@@ -2,7 +2,6 @@ import { MenuListProps, StylesConfig, ValueContainerProps } from 'react-select';
|
|
2
2
|
import { OptionType } from '../../../Common';
|
3
3
|
export declare const getCommonSelectStyle: (styleOverrides?: {}) => StylesConfig;
|
4
4
|
export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (base: any, state: any) => any;
|
5
|
-
export declare const SelectOption: (props: any) => JSX.Element;
|
6
5
|
export declare const LoadingIndicator: () => JSX.Element;
|
7
6
|
export declare const GroupHeading: (props: any) => JSX.Element;
|
8
7
|
export declare const commonSelectStyles: StylesConfig;
|
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
|
|
134
134
|
* />
|
135
135
|
* ```
|
136
136
|
*/
|
137
|
-
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderRadiusConfig, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
137
|
+
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
138
138
|
export default SelectPicker;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { IconsProps } from '../Icon';
|
2
|
+
export declare enum StatusType {
|
3
|
+
QUEUED = "QUEUED",
|
4
|
+
FAILED = "FAILED",
|
5
|
+
ERROR = "ERROR",
|
6
|
+
CANCELLED = "CANCELLED",
|
7
|
+
ABORTED = "ABORTED",
|
8
|
+
HEALTHY = "HEALTHY",
|
9
|
+
SUCCEEDED = "SUCCEEDED",
|
10
|
+
DRIFTED = "DRIFTED",
|
11
|
+
MISSING = "MISSING",
|
12
|
+
UNKNOWN = "UNKNOWN",
|
13
|
+
NOT_DEPLOYED = "NOT-DEPLOYED",
|
14
|
+
SUSPENDED = "SUSPENDED",
|
15
|
+
DEGRADED = "DEGRADED",
|
16
|
+
PROGRESSING = "PROGRESSING",
|
17
|
+
INPROGRESS = "INPROGRESS",
|
18
|
+
HIBERNATING = "HIBERNATING",
|
19
|
+
TIMED_OUT = "TIMED_OUT"
|
20
|
+
}
|
21
|
+
export interface StatusComponentProps {
|
22
|
+
/** The status to display, either a predefined StatusType or a custom string. */
|
23
|
+
status: StatusType | string;
|
24
|
+
/** A custom message to display instead of the status. If not provided, the status is shown. */
|
25
|
+
message?: string;
|
26
|
+
/** If true, hides the status icon. */
|
27
|
+
hideIcon?: boolean;
|
28
|
+
/**
|
29
|
+
* If true, hides the status message and displays it in a tooltip instead.
|
30
|
+
* @default false
|
31
|
+
*/
|
32
|
+
hideMessage?: boolean;
|
33
|
+
/** Size of the status icon. */
|
34
|
+
iconSize?: IconsProps['size'];
|
35
|
+
/** If true, displays an animated version of the icon (if available). */
|
36
|
+
showAnimatedIcon?: boolean;
|
37
|
+
/**
|
38
|
+
* If true, hides the tooltip on the status icon.
|
39
|
+
* @note Tooltip is only shown when `hideMessage` is true.
|
40
|
+
*/
|
41
|
+
hideIconTooltip?: boolean;
|
42
|
+
}
|
43
|
+
export interface AppStatusProps extends Omit<StatusComponentProps, 'statusMessage'> {
|
44
|
+
isJobView?: boolean;
|
45
|
+
isVirtualEnv?: boolean;
|
46
|
+
}
|
47
|
+
export interface DeploymentStatusProps extends Omit<AppStatusProps, 'isJobView'> {
|
48
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IconName, IconsProps } from '../Icon';
|
2
|
+
export declare const getIconName: (status: string, showAnimatedIcon: boolean) => IconName;
|
3
|
+
export declare const getIconColor: (status: string) => IconsProps["color"];
|
4
|
+
export declare const getDeploymentStatusFromStatus: (status: string) => string;
|
5
|
+
export declare const getJobStatusFromStatus: (status: string) => string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { TextareaProps } from './types';
|
2
|
-
declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, value, ...props }: TextareaProps) => JSX.Element;
|
2
|
+
declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, value, borderConfig, ...props }: TextareaProps) => JSX.Element;
|
3
3
|
export default Textarea;
|
@@ -60,4 +60,9 @@ export * from './ThemeSwitcher';
|
|
60
60
|
export * from './TargetPlatforms';
|
61
61
|
export * from './UnsavedChanges';
|
62
62
|
export * from './UnsavedChangesDialog';
|
63
|
+
export * from './Icon';
|
64
|
+
export * from './StatusComponent';
|
65
|
+
export * from './RegistryIcon';
|
66
|
+
export * from './GitProviderIcon';
|
67
|
+
export * from './CustomInput';
|
63
68
|
export * from './InfoBlock';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -95,6 +95,8 @@ export declare const checkIfPathIsMatching: (currentPathName: string, customMess
|
|
95
95
|
export declare const sanitizeTargetPlatforms: (targetPlatforms: TargetPlatformsDTO["targetPlatforms"]) => TargetPlatformItemDTO[];
|
96
96
|
export declare const isAWSCodeCommitURL: (url?: string) => boolean;
|
97
97
|
export declare const renderMaterialIcon: (url?: string) => JSX.Element;
|
98
|
-
export declare const
|
99
|
-
|
98
|
+
export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig, borderRadiusConfig, }: {
|
99
|
+
borderConfig: BorderConfigType | undefined;
|
100
|
+
borderRadiusConfig: BorderConfigType | undefined;
|
101
|
+
}) => string;
|
100
102
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonProps } from '../../Components';
|
1
|
+
import { ButtonComponentType, ButtonProps } from '../../Components';
|
2
2
|
import { ReactElement } from 'react';
|
3
3
|
export declare enum ToastVariantType {
|
4
4
|
info = "info",
|
@@ -30,9 +30,9 @@ export interface ToastProps {
|
|
30
30
|
/**
|
31
31
|
* Props for the action button to be displayed in the toast
|
32
32
|
*
|
33
|
-
* Note: Size, variant and style are hard-coded and cannot be
|
33
|
+
* Note: Size, variant and style are hard-coded and cannot be overridden
|
34
34
|
*/
|
35
|
-
buttonProps?: ButtonProps
|
35
|
+
buttonProps?: ButtonProps<ButtonComponentType>;
|
36
36
|
/**
|
37
37
|
* Custom progress bar color
|
38
38
|
*/
|