@devtron-labs/devtron-fe-common-lib 1.18.1 → 1.19.0
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-Cmi_dLiG.js → @code-editor-GtoBp4ff.js} +8406 -7972
- package/dist/{@common-rjsf-DTSwvp93.js → @common-rjsf-BfawWJnS.js} +179 -173
- package/dist/{@framer-motion-j6RIjEIR.js → @framer-motion-DZveCoIL.js} +1 -1
- package/dist/{@react-dates-BVyHiOGU.js → @react-dates-CZ1bNWJM.js} +213 -213
- package/dist/{@react-select-BQNFZu0Y.js → @react-select-DS68hCUM.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-CuElh0mS.js → @react-virtualized-sticky-tree-V-8klKy9.js} +1 -1
- package/dist/{@vendor-DbxoIktR.js → @vendor-3ORIJA0h.js} +22139 -16828
- package/dist/Common/API/CoreAPI.d.ts +11 -0
- package/dist/Common/API/QueryClientProvider.d.ts +2 -0
- package/dist/Common/API/index.d.ts +2 -0
- package/dist/Common/API/reactQueryHooks.d.ts +6 -0
- package/dist/Common/Constants.d.ts +1 -2
- package/dist/Common/Drawer/Drawer.d.ts +3 -2
- package/dist/Common/Modals/Modal.d.ts +1 -2
- package/dist/Common/Modals/VisibleModal.d.ts +6 -8
- package/dist/Common/Modals/VisibleModal2.d.ts +4 -7
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +7 -0
- package/dist/Common/Types.d.ts +0 -1
- package/dist/Pages/BulkEdit/index.d.ts +1 -0
- package/dist/Pages/BulkEdit/types.d.ts +50 -0
- package/dist/Pages/ResourceBrowser/ClusterMap/ClusterMap.d.ts +2 -0
- package/dist/Pages/ResourceBrowser/ClusterMap/index.d.ts +1 -0
- package/dist/Pages/ResourceBrowser/ClusterMap/types.d.ts +27 -0
- package/dist/Pages/ResourceBrowser/ClusterMap/utils.d.ts +14 -0
- package/dist/Pages/ResourceBrowser/index.d.ts +1 -0
- package/dist/Pages/ResourceBrowser/types.d.ts +1 -1
- package/dist/Pages/index.d.ts +1 -0
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/types.d.ts +2 -10
- package/dist/Shared/Components/Button/Button.component.d.ts +24 -12
- package/dist/Shared/Components/Button/types.d.ts +4 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +1 -1
- package/dist/Shared/Components/Chip/Chip.component.d.ts +3 -0
- package/dist/Shared/Components/Chip/index.d.ts +2 -0
- package/dist/Shared/Components/Chip/types.d.ts +64 -0
- package/dist/Shared/Components/Chip/utils.d.ts +6 -0
- package/dist/Shared/Components/DTFocusTrap/DTFocusTrap.d.ts +8 -0
- package/dist/Shared/Components/DTFocusTrap/index.d.ts +2 -0
- package/dist/Shared/Components/DTFocusTrap/types.d.ts +33 -0
- package/dist/Shared/Components/FilterChips/types.d.ts +2 -3
- package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
- package/dist/Shared/Components/Header/types.d.ts +2 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +3 -0
- package/dist/Shared/Components/Popover/types.d.ts +4 -0
- package/dist/Shared/Components/Popover/usePopover.hook.d.ts +1 -1
- package/dist/Shared/Components/Popover/utils.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +2 -3
- package/dist/Shared/Components/SelectPicker/constants.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +14 -3
- package/dist/Shared/Components/Table/types.d.ts +1 -0
- package/dist/Shared/Components/TempAppWindow/TempAppWindow.d.ts +1 -0
- package/dist/Shared/Components/TempAppWindow/index.d.ts +1 -0
- package/dist/Shared/Components/index.d.ts +2 -0
- package/dist/Shared/Helpers.d.ts +1 -2
- package/dist/Shared/Providers/MainContextProvider/index.d.ts +1 -1
- package/dist/Shared/Providers/MainContextProvider/types.d.ts +18 -0
- package/dist/Shared/constants.d.ts +1 -0
- package/dist/Shared/types.d.ts +0 -4
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-bg-environment.1ea03fc5.svg +12 -0
- package/dist/assets/ic-link.52effffd.svg +3 -0
- package/dist/assets/ic-resize-handle.b0afcd2d.svg +9 -0
- package/dist/index.d.ts +16 -6
- package/dist/index.js +947 -938
- package/package.json +6 -2
@@ -0,0 +1,64 @@
|
|
1
|
+
import { MouseEvent, PropsWithChildren } from 'react';
|
2
|
+
import { ComponentSizeType } from '../../constants';
|
3
|
+
import { IconsProps } from '../Icon';
|
4
|
+
import { SelectPickerOptionType } from '../SelectPicker';
|
5
|
+
export type ChipProps = {
|
6
|
+
/**
|
7
|
+
* The label to be displayed on the chip.
|
8
|
+
* This is a required field and should be a string.
|
9
|
+
*/
|
10
|
+
label: string;
|
11
|
+
/**
|
12
|
+
* The size of the chip, which determines its padding and icon size.
|
13
|
+
* @default ComponentSizeType.xs
|
14
|
+
*/
|
15
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.xs | ComponentSizeType.xxs>;
|
16
|
+
/**
|
17
|
+
* If style is 'error', an error icon will be displayed.
|
18
|
+
* If style is 'neutral', a start icon can be provided.
|
19
|
+
* @default 'neutral'
|
20
|
+
*/
|
21
|
+
style?: 'neutral' | 'error';
|
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
|
+
startIconProps?: Pick<IconsProps, 'name' | 'color'>;
|
57
|
+
startIcon?: never;
|
58
|
+
} | {
|
59
|
+
startIconProps?: never;
|
60
|
+
startIcon?: SelectPickerOptionType['startIcon'];
|
61
|
+
});
|
62
|
+
export interface GetIconPropsType extends Pick<ChipProps, 'style' | 'startIconProps' | 'size'> {
|
63
|
+
}
|
64
|
+
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;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { noop } from '../../../Common/Helper';
|
2
|
+
import { DTFocusTrapType } from './types';
|
3
|
+
export declare const useFocusTrapControl: () => {
|
4
|
+
disableFocusTrap: typeof noop;
|
5
|
+
resumeFocusTrap: typeof noop;
|
6
|
+
};
|
7
|
+
declare const DTFocusTrap: ({ onEscape, deactivateFocusOnEscape, children, initialFocus, }: DTFocusTrapType) => JSX.Element;
|
8
|
+
export default DTFocusTrap;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
type FocusTargetValue = HTMLElement | SVGElement | string;
|
3
|
+
type FocusTargetValueOrFalse = FocusTargetValue | false;
|
4
|
+
/**
|
5
|
+
* A DOM node, a selector string (which will be passed to
|
6
|
+
* `document.querySelector()` to find the DOM node), `false` to explicitly indicate
|
7
|
+
* an opt-out, or a function that returns a DOM node or `false`.
|
8
|
+
*/
|
9
|
+
type FocusTargetOrFalse = FocusTargetValueOrFalse | (() => FocusTargetValueOrFalse);
|
10
|
+
export interface DTFocusTrapType {
|
11
|
+
/**
|
12
|
+
* Callback function that gets triggered when the Escape key is pressed. \
|
13
|
+
* Should be wrapped in useCallback to prevent unnecessary re-renders.
|
14
|
+
* @example
|
15
|
+
* const handleEscape = useCallback(() => {
|
16
|
+
* // Handle escape key press
|
17
|
+
* }, []);
|
18
|
+
*/
|
19
|
+
onEscape: (e?: KeyboardEvent | MouseEvent) => void;
|
20
|
+
/**
|
21
|
+
* If focus should be deactivated on escape, pass false when escape is disabled or has no action
|
22
|
+
* true for cases when we are closing modals or dialogs
|
23
|
+
* @default true
|
24
|
+
*/
|
25
|
+
deactivateFocusOnEscape?: boolean;
|
26
|
+
children: ReactNode;
|
27
|
+
/**
|
28
|
+
* With this option, you can specify an element to receive the initial focus, or use false for no initially focused element at all.
|
29
|
+
* Setting this option to undefined (or to a function that returns undefined) will result in the first element in the focus trap's tab order receiving focus.
|
30
|
+
*/
|
31
|
+
initialFocus?: FocusTargetOrFalse | undefined | (() => void);
|
32
|
+
}
|
33
|
+
export {};
|
@@ -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) =>
|
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) =>
|
21
|
+
getFormattedValue?: (filterKey: string, filterValue: unknown) => string;
|
23
22
|
showRemoveIcon: boolean;
|
24
23
|
/**
|
25
24
|
* If true, would hide the label
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { PageHeaderType } from './types';
|
2
|
-
declare const PageHeader: ({ headerName, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, tippyProps, }: PageHeaderType) => JSX.Element;
|
2
|
+
declare const PageHeader: ({ headerName, headerImage, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, onClose, tippyProps, }: PageHeaderType) => JSX.Element;
|
3
3
|
export default PageHeader;
|
@@ -4,6 +4,7 @@ import { ActionMenuProps } from '../ActionMenu';
|
|
4
4
|
import { DOCUMENTATION } from '../DocLink';
|
5
5
|
export interface PageHeaderType {
|
6
6
|
headerName?: string;
|
7
|
+
headerImage?: string;
|
7
8
|
showTabs?: boolean;
|
8
9
|
additionalHeaderInfo?: () => JSX.Element;
|
9
10
|
renderHeaderTabs?: () => JSX.Element;
|
@@ -17,6 +18,7 @@ export interface PageHeaderType {
|
|
17
18
|
tippyMessage?: string;
|
18
19
|
onClickTippyButton?: () => void;
|
19
20
|
};
|
21
|
+
onClose?: () => void;
|
20
22
|
}
|
21
23
|
export interface ServerInfo {
|
22
24
|
currentVersion: string;
|
@@ -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>>;
|
@@ -168,6 +170,7 @@ export declare const iconMap: {
|
|
168
170
|
'ic-play-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
169
171
|
'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
170
172
|
'ic-quote': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
173
|
+
'ic-resize-handle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
171
174
|
'ic-rocket-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
172
175
|
'ic-rocket-launch': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
173
176
|
'ic-selected': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -56,6 +56,10 @@ export interface UsePopoverProps {
|
|
56
56
|
* @default 'menu'
|
57
57
|
*/
|
58
58
|
variant?: 'menu' | 'overlay';
|
59
|
+
/**
|
60
|
+
* Disable popover close
|
61
|
+
*/
|
62
|
+
disableClose?: boolean;
|
59
63
|
}
|
60
64
|
/**
|
61
65
|
* Represents the return type of the `usePopover` hook, providing properties and methods
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { UsePopoverProps, UsePopoverReturnType } from './types';
|
2
|
-
export declare const usePopover: ({ id, position, alignment, width, variant, onOpen, onPopoverKeyDown, onTriggerKeyDown, }: UsePopoverProps) => UsePopoverReturnType;
|
2
|
+
export declare const usePopover: ({ id, position, alignment, width, variant, onOpen, onPopoverKeyDown, onTriggerKeyDown, disableClose, }: UsePopoverProps) => UsePopoverReturnType;
|
@@ -88,5 +88,5 @@ export declare const getPopoverActualPositionAlignment: ({ position, alignment,
|
|
88
88
|
popoverRect: DOMRect;
|
89
89
|
}) => {
|
90
90
|
fallbackPosition: "top" | "bottom" | "right" | "left";
|
91
|
-
fallbackAlignment: "
|
91
|
+
fallbackAlignment: "start" | "middle" | "end";
|
92
92
|
};
|
@@ -133,5 +133,5 @@ import { SelectPickerProps } from './type';
|
|
133
133
|
* />
|
134
134
|
* ```
|
135
135
|
*/
|
136
|
-
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: refFromConsumer, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, menuListFooterConfig, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, autoFocus, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
136
|
+
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, keyboardShortcut, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef: refFromConsumer, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, menuListFooterConfig, isCreatable, onCreateOption, closeMenuOnSelect: _closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, autoFocus, showCheckboxForMultiSelect, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
137
137
|
export default SelectPicker;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ClearIndicatorProps, ControlProps, DropdownIndicatorProps, InputProps, MenuListProps, MultiValueProps,
|
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
|
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;
|
@@ -3,3 +3,4 @@ import { SelectPickerProps } from './type';
|
|
3
3
|
export declare const SELECT_PICKER_FONT_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['fontSize']>;
|
4
4
|
export declare const SELECT_PICKER_ICON_SIZE_MAP: Record<SelectPickerProps['size'], Pick<CSSProperties, 'width' | 'height'>>;
|
5
5
|
export declare const SELECT_PICKER_CONTROL_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['minHeight']>;
|
6
|
+
export declare const SELECT_PICKER_MULTI_VALUE_LABEL_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['lineHeight']>;
|
@@ -9,7 +9,7 @@ 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,
|
12
|
+
export interface SelectPickerOptionType<OptionValue = string | number, OptionLabel = ReactNode> extends OptionType<OptionValue, OptionLabel> {
|
13
13
|
/**
|
14
14
|
* Description to be displayed for the option
|
15
15
|
*/
|
@@ -70,6 +70,17 @@ declare module 'react-select/base' {
|
|
70
70
|
* Icon to be rendered in the control
|
71
71
|
*/
|
72
72
|
icon?: ReactElement;
|
73
|
+
/**
|
74
|
+
* Renders the keyboard shortcut key that opens the select picker \
|
75
|
+
* Shortcut key needs to be defined first in order to use it.
|
76
|
+
* @note This is displayed in place of the dropdown indicator
|
77
|
+
*/
|
78
|
+
keyboardShortcut?: string;
|
79
|
+
/**
|
80
|
+
* If true, checkboxes are shown for options in multi-select mode.
|
81
|
+
* @default true
|
82
|
+
*/
|
83
|
+
showCheckboxForMultiSelect?: boolean;
|
73
84
|
/**
|
74
85
|
* If true, the selected option icon is shown in the container.
|
75
86
|
* startIcon has higher priority than endIcon.
|
@@ -101,7 +112,7 @@ export declare enum SelectPickerVariantType {
|
|
101
112
|
BORDER_LESS = "border-less",
|
102
113
|
COMPACT = "compact"
|
103
114
|
}
|
104
|
-
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue' | 'filterOption' | 'noOptionsMessage' | 'defaultMenuIsOpen' | 'onFocus'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & Omit<FormFieldWrapperProps, 'children'> & {
|
115
|
+
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue' | 'filterOption' | 'noOptionsMessage' | 'defaultMenuIsOpen' | 'onFocus'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea' | 'keyboardShortcut' | 'showCheckboxForMultiSelect'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & Omit<FormFieldWrapperProps, 'children'> & {
|
105
116
|
/**
|
106
117
|
* Config for the footer at the bottom of menu list. It is sticky by default
|
107
118
|
*
|
@@ -223,6 +234,6 @@ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps
|
|
223
234
|
export type SelectPickerTextAreaProps = Omit<SelectPickerProps<string, false>, 'selectRef' | 'inputValue' | 'onInputChange' | 'controlShouldRenderValue' | 'onKeyDown' | 'onCreateOption' | 'shouldRenderTextArea'> & Pick<ResizableTagTextAreaProps, 'maxHeight' | 'minHeight' | 'refVar' | 'dependentRefs'>;
|
224
235
|
export interface GroupedFilterSelectPickerProps<T extends string | number = string | number> extends Omit<ActionMenuProps<T>, 'onClick' | 'disableDescriptionEllipsis' | 'children' | 'buttonProps' | 'isSearchable'> {
|
225
236
|
isFilterApplied?: boolean;
|
226
|
-
filterSelectPickerPropsMap: Record<T, Omit<FilterSelectPickerProps, 'autoFocus' | 'menuIsOpen' | 'onMenuClose' | 'onKeyDown'>>;
|
237
|
+
filterSelectPickerPropsMap: Record<T, Omit<FilterSelectPickerProps, 'autoFocus' | 'menuIsOpen' | 'onMenuClose' | 'onKeyDown' | 'selectRef'>>;
|
227
238
|
}
|
228
239
|
export {};
|
@@ -108,6 +108,7 @@ type AdditionalFilterPropsType<T extends FiltersTypeEnum> = T extends FiltersTyp
|
|
108
108
|
export type ViewWrapperProps<RowData extends unknown = unknown, FilterVariant extends FiltersTypeEnum = FiltersTypeEnum.NONE, AdditionalProps extends Record<string, any> = {}> = PropsWithChildren<(FilterVariant extends FiltersTypeEnum.NONE ? {} : Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'>) & AdditionalProps & Partial<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>> & {
|
109
109
|
areRowsLoading: boolean;
|
110
110
|
filteredRows: RowsType<RowData> | null;
|
111
|
+
rows: RowsType<RowData> | null;
|
111
112
|
} & (FilterVariant extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersReturnType<string>, 'updateSearchParams'> : {})>;
|
112
113
|
type FilterConfig<FilterVariant extends FiltersTypeEnum, RowData extends unknown> = {
|
113
114
|
filtersVariant: FilterVariant;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const TempAppWindow: () => JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './TempAppWindow';
|
@@ -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';
|
@@ -85,6 +86,7 @@ export * from './TabGroup';
|
|
85
86
|
export * from './Table';
|
86
87
|
export * from './TagsKeyValueTable';
|
87
88
|
export * from './TargetPlatforms';
|
89
|
+
export * from './TempAppWindow';
|
88
90
|
export * from './Textarea';
|
89
91
|
export * from './ThemeSwitcher';
|
90
92
|
export * from './ToggleResolveScopedVariables';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { Pair } from 'yaml';
|
|
5
5
|
import { MaterialHistoryType } from './Services/app.types';
|
6
6
|
import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
|
7
7
|
import { AggregatedNodes, PodMetadatum } from './Components';
|
8
|
-
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node,
|
8
|
+
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
9
9
|
interface HighlightSearchTextProps {
|
10
10
|
/**
|
11
11
|
* The text to be highlighted
|
@@ -23,7 +23,6 @@ interface HighlightSearchTextProps {
|
|
23
23
|
export declare const escapeRegExp: (text: string) => string;
|
24
24
|
export declare const highlightSearchText: ({ searchText, text, highlightClasses }: HighlightSearchTextProps) => string;
|
25
25
|
export declare const preventBodyScroll: (lock: boolean) => void;
|
26
|
-
export declare const preventOutsideFocus: ({ identifier, preventFocus }: PreventOutsideFocusProps) => void;
|
27
26
|
export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
|
28
27
|
export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
|
29
28
|
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
export * from './MainContextProvider';
|
2
|
-
export type { MainContext, ReloadVersionConfigTypes, SidePanelConfig } from './types';
|
2
|
+
export type { MainContext, ReloadVersionConfigTypes, SidePanelConfig, TempAppWindowConfig } from './types';
|
3
3
|
export { SidePanelTab } from './types';
|
@@ -26,6 +26,20 @@ type AIAgentContextType = {
|
|
26
26
|
path: string;
|
27
27
|
context: Record<string, string>;
|
28
28
|
};
|
29
|
+
export interface TempAppWindowConfig {
|
30
|
+
/** Whether the temporary window is open */
|
31
|
+
open: boolean;
|
32
|
+
/** Title of the temporary window */
|
33
|
+
title: string;
|
34
|
+
/** URL to load in iframe in the window */
|
35
|
+
url?: string;
|
36
|
+
/** Image URL to display in the window header */
|
37
|
+
image?: string;
|
38
|
+
/** Whether to show an "Open in new tab" button */
|
39
|
+
showOpenInNewTab?: boolean;
|
40
|
+
/** React component to render in the window */
|
41
|
+
component?: JSX.Element;
|
42
|
+
}
|
29
43
|
type CommonMainContextProps = {
|
30
44
|
setServerMode: (serverMode: SERVER_MODE) => void;
|
31
45
|
isHelpGettingStartedClicked: boolean;
|
@@ -90,6 +104,8 @@ export type MainContext = CommonMainContextProps & ({
|
|
90
104
|
*/
|
91
105
|
isFELibAvailable: boolean;
|
92
106
|
aiAgentContext: AIAgentContextType;
|
107
|
+
tempAppWindowConfig: TempAppWindowConfig;
|
108
|
+
setTempAppWindowConfig: Dispatch<SetStateAction<TempAppWindowConfig>>;
|
93
109
|
} | {
|
94
110
|
isLicenseDashboard: true;
|
95
111
|
serverMode: null;
|
@@ -105,6 +121,8 @@ export type MainContext = CommonMainContextProps & ({
|
|
105
121
|
isEnterprise: false;
|
106
122
|
isFELibAvailable: false;
|
107
123
|
aiAgentContext: null;
|
124
|
+
tempAppWindowConfig: null;
|
125
|
+
setTempAppWindowConfig: null;
|
108
126
|
});
|
109
127
|
export interface MainContextProviderProps {
|
110
128
|
children: ReactNode;
|
@@ -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";
|
package/dist/Shared/types.d.ts
CHANGED
@@ -798,10 +798,6 @@ export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalP
|
|
798
798
|
approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
|
799
799
|
}
|
800
800
|
export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
|
801
|
-
export interface PreventOutsideFocusProps {
|
802
|
-
identifier: string;
|
803
|
-
preventFocus: boolean;
|
804
|
-
}
|
805
801
|
export interface PolicyBlockInfo {
|
806
802
|
isBlocked: boolean;
|
807
803
|
blockedBy: TriggerBlockType;
|