@devtron-labs/devtron-fe-common-lib 1.18.1-pre-0 → 1.18.1-pre-2

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 (28) hide show
  1. package/dist/{@code-editor-DMWjznh4.js → @code-editor-Bb96VwXB.js} +5567 -5369
  2. package/dist/{@common-rjsf-BE1x3bxN.js → @common-rjsf-BljIUSzx.js} +1 -1
  3. package/dist/Common/Constants.d.ts +0 -1
  4. package/dist/Common/Modals/Modal.d.ts +1 -1
  5. package/dist/Common/Types.d.ts +0 -1
  6. package/dist/Pages/ResourceBrowser/ClusterMap/ClusterMap.d.ts +2 -0
  7. package/dist/Pages/ResourceBrowser/ClusterMap/index.d.ts +1 -0
  8. package/dist/Pages/ResourceBrowser/ClusterMap/types.d.ts +27 -0
  9. package/dist/Pages/ResourceBrowser/ClusterMap/utils.d.ts +14 -0
  10. package/dist/Pages/ResourceBrowser/index.d.ts +1 -0
  11. package/dist/Pages/ResourceBrowser/types.d.ts +1 -1
  12. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +1 -1
  13. package/dist/Shared/Components/Chip/Chip.component.d.ts +3 -0
  14. package/dist/Shared/Components/Chip/index.d.ts +2 -0
  15. package/dist/Shared/Components/Chip/types.d.ts +58 -0
  16. package/dist/Shared/Components/Chip/utils.d.ts +6 -0
  17. package/dist/Shared/Components/FilterChips/types.d.ts +2 -3
  18. package/dist/Shared/Components/Icon/Icon.d.ts +2 -0
  19. package/dist/Shared/Components/SelectPicker/common.d.ts +2 -3
  20. package/dist/Shared/Components/SelectPicker/type.d.ts +4 -3
  21. package/dist/Shared/Components/index.d.ts +1 -0
  22. package/dist/Shared/constants.d.ts +1 -0
  23. package/dist/assets/@code-editor.css +1 -1
  24. package/dist/assets/ic-bg-environment.1ea03fc5.svg +12 -0
  25. package/dist/assets/ic-link.52effffd.svg +3 -0
  26. package/dist/index.d.ts +0 -6
  27. package/dist/index.js +948 -945
  28. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { j as n, au as y, aw as k, av as M } from "./@vendor-3ORIJA0h.js";
2
2
  import W, { forwardRef as J, useMemo as P } from "react";
3
3
  import V, { getDefaultRegistry as K } from "@rjsf/core";
4
- import { T as N, j as w, c as v, b as F, S as q, i as Y, a as G, d as C, e as z } from "./@code-editor-DMWjznh4.js";
4
+ import { T as N, j as w, c as v, b as F, S as q, i as Y, a as G, d as C, e as z } from "./@code-editor-Bb96VwXB.js";
5
5
  import { getUiOptions as I, getTemplate as D, getSubmitButtonOptions as Q, ADDITIONAL_PROPERTY_FLAG as B, errorId as X, englishStringTranslator as Z, TranslatableString as ee, titleId as te, canExpand as ne, deepEquals as re } from "@rjsf/utils";
6
6
  import { ReactComponent as se } from "./assets/ic-add.cfaa779b.svg";
7
7
  import { ReactComponent as ae } from "./assets/ic-warning.ecf7ff97.svg";
@@ -58,7 +58,6 @@ export declare const URLS: {
58
58
  readonly COMPARE_CLUSTERS: "/compare-clusters";
59
59
  readonly APP_CONFIG: "edit";
60
60
  readonly GLOBAL_CONFIG: "/global-config";
61
- readonly GLOBAL_CONFIG_MANAGE_CATEGORIES: "/global-config/cluster-env/manage-categories";
62
61
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP: "/global-config/templates/devtron-apps";
63
62
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: "/global-config/templates/devtron-apps/create";
64
63
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: "/global-config/templates/devtron-apps/detail/:appId";
@@ -2,4 +2,4 @@ import { ModalType } from '../Types';
2
2
  /**
3
3
  * @deprecated Use VisibleModal instead
4
4
  */
5
- export declare const Modal: ({ style, children, modal, rootClassName, onClick, callbackRef, preventWheelDisable, noBackDrop, }: ModalType) => JSX.Element;
5
+ export declare const Modal: ({ style, children, rootClassName, onClick, callbackRef, preventWheelDisable, noBackDrop, }: ModalType) => JSX.Element;
@@ -245,7 +245,6 @@ export interface PopupMenuBodyType {
245
245
  export interface ModalType {
246
246
  style?: React.CSSProperties;
247
247
  children?: ReactNode;
248
- modal?: boolean;
249
248
  rootClassName?: string;
250
249
  onClick?: any;
251
250
  callbackRef?: (element?: any) => any;
@@ -0,0 +1,2 @@
1
+ import { ClusterMapProps } from './types';
2
+ export declare const ClusterMap: ({ filteredList, isLoading }: ClusterMapProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './ClusterMap';
@@ -0,0 +1,27 @@
1
+ import { ClusterStatusType } from '../types';
2
+ export interface ClusterStatusAndType {
3
+ isProd: boolean;
4
+ status: ClusterStatusType;
5
+ isVirtualCluster?: boolean;
6
+ }
7
+ export interface ClusterMapProps {
8
+ isLoading?: boolean;
9
+ filteredList: ClusterStatusAndType[];
10
+ }
11
+ export interface StatusCountEnum {
12
+ healthyCount: number;
13
+ unhealthyCount: number;
14
+ connectionFailedCount: number;
15
+ prodCount: number;
16
+ virtualCount: number;
17
+ }
18
+ export interface StatusEntity {
19
+ value: number;
20
+ label: string;
21
+ color: string;
22
+ proportionalValue: string;
23
+ }
24
+ export interface ClusterEntitiesTypes {
25
+ statusEntities: StatusEntity[];
26
+ deploymentEntities: StatusEntity[];
27
+ }
@@ -0,0 +1,14 @@
1
+ import { ClusterEntitiesTypes, ClusterStatusAndType, StatusCountEnum } from './types';
2
+ /**
3
+ *
4
+ * @param filteredList
5
+ * @returns healthyCount, unhealthyCount, connectionFailedCount, prodCount, virtualCount
6
+ */
7
+ export declare const getStatusCount: (filteredList: ClusterStatusAndType[]) => StatusCountEnum;
8
+ /**
9
+ *
10
+ * @param filteredList
11
+ * @returns statusEntities, deploymentEntities
12
+ *
13
+ */
14
+ export declare const getEntities: (filteredList: ClusterStatusAndType[]) => ClusterEntitiesTypes;
@@ -1,3 +1,4 @@
1
+ export * from './ClusterMap';
1
2
  export * from './constants';
2
3
  export { default as ForceDeleteOption } from './ForceDeleteOption';
3
4
  export * from './Helper';
@@ -51,7 +51,7 @@ export interface ClusterCapacityType {
51
51
  serverVersion: string;
52
52
  nodeDetails?: NodeDetailsType[];
53
53
  nodeErrors: Record<string, string>[];
54
- status?: ClusterStatusType;
54
+ status: ClusterStatusType;
55
55
  isProd: boolean;
56
56
  installationId?: number;
57
57
  }
@@ -13,7 +13,7 @@ export declare const getPipelineDeploymentsOptions: ({ pipelineDeployments, wfrI
13
13
  wfrId: number;
14
14
  }) => {
15
15
  currentDeployment: string;
16
- pipelineDeploymentsOptions: SelectPickerOptionType<number>[];
16
+ pipelineDeploymentsOptions: SelectPickerOptionType<number, import('react').ReactNode>[];
17
17
  };
18
18
  export declare const parseDeploymentHistoryDiffSearchParams: (compareWfrId: number) => (searchParams: URLSearchParams) => {
19
19
  compareWfrId: number;
@@ -0,0 +1,3 @@
1
+ import { ChipProps } from './types';
2
+ declare const Chip: ({ label, startIconProps, size: userSize, value, onRemove, style, type, onClick, capitalizeLabel, href, }: ChipProps) => JSX.Element;
3
+ export default Chip;
@@ -0,0 +1,2 @@
1
+ export { default as Chip } from './Chip.component';
2
+ export type { ChipProps } from './types';
@@ -0,0 +1,58 @@
1
+ import { MouseEvent, PropsWithChildren } from 'react';
2
+ import { ComponentSizeType } from '../../constants';
3
+ import { IconsProps } from '../Icon';
4
+ export type ChipProps = {
5
+ /**
6
+ * The label to be displayed on the chip.
7
+ * This is a required field and should be a string.
8
+ */
9
+ label: string;
10
+ /**
11
+ * The size of the chip, which determines its padding and icon size.
12
+ * @default ComponentSizeType.xs
13
+ */
14
+ size?: Extract<ComponentSizeType, ComponentSizeType.xs | ComponentSizeType.xxs>;
15
+ /**
16
+ * If style is 'error', an error icon will be displayed.
17
+ * If style is 'neutral', a start icon can be provided.
18
+ * @default 'neutral'
19
+ */
20
+ style?: 'neutral' | 'error';
21
+ startIconProps?: Pick<IconsProps, 'name' | 'color'>;
22
+ capitalizeLabel?: boolean;
23
+ } & ({
24
+ type: 'button';
25
+ href?: never;
26
+ onClick: (event: MouseEvent<HTMLButtonElement>) => void;
27
+ value?: never;
28
+ onRemove?: () => void;
29
+ } | {
30
+ type: 'link';
31
+ href: string;
32
+ onClick?: never;
33
+ value?: never;
34
+ onRemove?: never;
35
+ } | {
36
+ /**
37
+ * The type of the chip, which can be 'button', 'link', or 'non-interactive'.
38
+ * This determines the behavior of the chip when clicked.
39
+ * @default 'non-interactive'
40
+ */
41
+ type?: 'non-interactive';
42
+ href?: never;
43
+ onClick?: never;
44
+ /**
45
+ * The value to be displayed in the chip, if any.
46
+ * This is optional and can be used to show additional information.
47
+ * @default undefined
48
+ */
49
+ value?: string | number;
50
+ /**
51
+ * A function that will be called when the remove button is clicked.
52
+ * This is optional and can be used to handle the removal of the chip.
53
+ */
54
+ onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
55
+ });
56
+ export interface GetIconPropsType extends Pick<ChipProps, 'style' | 'startIconProps' | 'size'> {
57
+ }
58
+ export type ChipWrapperProps = PropsWithChildren<Required<Pick<ChipProps, 'type' | 'style' | 'onClick' | 'href' | 'size'>>>;
@@ -0,0 +1,6 @@
1
+ import { ComponentSizeType } from '../../constants';
2
+ import { ChipProps } from './types';
3
+ export declare const getIconSize: (size: ChipProps["size"]) => 14 | 16;
4
+ export declare const getPadding: (size: ChipProps["size"]) => "px-4 py-2" | "px-6 py-2";
5
+ export declare const getFontSize: (size: ChipProps["size"]) => "fs-12 lh-16" | "fs-12 lh-20";
6
+ export declare const getSupportedChipSizes: (size: ComponentSizeType) => ComponentSizeType.xxs | ComponentSizeType.xs;
@@ -1,4 +1,3 @@
1
- import { ReactNode } from 'react';
2
1
  export interface FilterChipProps {
3
2
  /**
4
3
  * Filter label
@@ -15,11 +14,11 @@ export interface FilterChipProps {
15
14
  /**
16
15
  * If passed, the label will be formatted accordingly
17
16
  */
18
- getFormattedLabel?: (filterKey: string) => ReactNode;
17
+ getFormattedLabel?: (filterKey: string) => string;
19
18
  /**
20
19
  * If passed, the label will be formatted accordingly
21
20
  */
22
- getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
21
+ getFormattedValue?: (filterKey: string, filterValue: unknown) => string;
23
22
  showRemoveIcon: boolean;
24
23
  /**
25
24
  * If true, would hide the label
@@ -18,6 +18,7 @@ export declare const iconMap: {
18
18
  'ic-azure-aks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
19
19
  'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
20
20
  'ic-bg-cluster': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
21
+ 'ic-bg-environment': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
21
22
  'ic-bharatpe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
22
23
  'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
23
24
  'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -133,6 +134,7 @@ export declare const iconMap: {
133
134
  'ic-lego': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
134
135
  'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
135
136
  'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
137
+ 'ic-link': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
136
138
  'ic-linked-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
137
139
  'ic-list-bullets': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
138
140
  'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -1,4 +1,4 @@
1
- import { ClearIndicatorProps, ControlProps, DropdownIndicatorProps, InputProps, MenuListProps, MultiValueProps, MultiValueRemoveProps, OptionProps, ValueContainerProps } from 'react-select';
1
+ import { ClearIndicatorProps, ControlProps, DropdownIndicatorProps, InputProps, MenuListProps, MultiValueProps, OptionProps, ValueContainerProps } from 'react-select';
2
2
  import { TooltipProps } from '../../../Common/Tooltip';
3
3
  import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
4
4
  export declare const getTooltipProps: (tooltipProps?: SelectPickerOptionType["tooltipProps"]) => TooltipProps;
@@ -10,8 +10,7 @@ export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends b
10
10
  export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
11
11
  export declare const SelectPickerMenuListFooter: ({ menuListFooterConfig, }: Required<Pick<SelectPickerProps, "menuListFooterConfig">>) => JSX.Element;
12
12
  export declare const SelectPickerMenuList: <OptionValue>(props: MenuListProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
13
- export declare const SelectPickerMultiValueLabel: <OptionValue, IsMulti extends boolean>({ getIsOptionValid, ...props }: MultiValueProps<SelectPickerOptionType<OptionValue>, true> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid">) => JSX.Element;
14
- export declare const SelectPickerMultiValueRemove: (props: MultiValueRemoveProps) => JSX.Element;
13
+ export declare const SelectPickerMultiValue: <OptionValue, IsMulti extends boolean>({ getIsOptionValid, ...props }: MultiValueProps<SelectPickerOptionType<OptionValue>, true> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid">) => JSX.Element;
15
14
  export declare const SelectPickerGroupHeading: <OptionValue>({ isGroupHeadingSelectable, ...props }: SelectPickerGroupHeadingProps<OptionValue>) => JSX.Element;
16
15
  export declare const renderLoadingMessage: () => JSX.Element;
17
16
  export declare const ValueContainerWithLoadingShimmer: (props: ValueContainerProps) => JSX.Element;
@@ -9,7 +9,8 @@ import { ComponentSizeType } from '../../constants';
9
9
  import { ActionMenuProps } from '../ActionMenu';
10
10
  import { ButtonComponentType, ButtonProps, ButtonVariantType } from '../Button';
11
11
  import { FormFieldWrapperProps } from '../FormFieldWrapper/types';
12
- export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
12
+ import { IconsProps } from '../Icon';
13
+ export interface SelectPickerOptionType<OptionValue = string | number, OptionLabel = ReactNode> extends OptionType<OptionValue, OptionLabel> {
13
14
  /**
14
15
  * Description to be displayed for the option
15
16
  */
@@ -17,11 +18,11 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
17
18
  /**
18
19
  * Icon at the start of the option
19
20
  */
20
- startIcon?: ReactElement;
21
+ startIcon?: ReactElement<IconsProps>;
21
22
  /**
22
23
  * Icon at the end of the option
23
24
  */
24
- endIcon?: ReactElement;
25
+ endIcon?: ReactElement<IconsProps>;
25
26
  /**
26
27
  * Props passed to show the tippy on option
27
28
  */
@@ -13,6 +13,7 @@ export * from './BulkSelection';
13
13
  export * from './Button';
14
14
  export * from './ButtonWithLoader';
15
15
  export * from './ButtonWithSelector';
16
+ export * from './Chip';
16
17
  export * from './CICDHistory';
17
18
  export * from './CMCS';
18
19
  export * from './CodeEditor';
@@ -432,3 +432,4 @@ export declare const APP_DETAILS_FALLBACK_POLLING_INTERVAL = 30000;
432
432
  export declare const PROGRESSING_DEPLOYMENT_STATUS_POLLING_INTERVAL = 10000;
433
433
  export declare const STRATEGY_TYPE_TO_TITLE_MAP: Record<DeploymentStrategyTypeWithDefault, string>;
434
434
  export declare const CUBIC_BEZIER_CURVE: [number, number, number, number];
435
+ export declare const ALLOW_ACTION_OUTSIDE_FOCUS_TRAP = "allow-action-outside-focus-trap";