@devtron-labs/devtron-fe-common-lib 1.18.0-alpha-5 → 1.18.0-alpha-7

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 (32) hide show
  1. package/dist/{@code-editor-BuXdf5ci.js → @code-editor-BdtT_76p.js} +6944 -6818
  2. package/dist/{@common-rjsf-ffTFKYSV.js → @common-rjsf-H6egnztj.js} +2 -2
  3. package/dist/{@framer-motion-BcOlP2tv.js → @framer-motion-DZveCoIL.js} +1 -1
  4. package/dist/{@react-dates-BkJF0N9I.js → @react-dates-CZ1bNWJM.js} +1 -1
  5. package/dist/{@react-select-Dw-yFFvz.js → @react-select-DS68hCUM.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-YTxUTwpg.js → @react-virtualized-sticky-tree-V-8klKy9.js} +1 -1
  7. package/dist/{@vendor-Dkf3d5cm.js → @vendor-3ORIJA0h.js} +19413 -16811
  8. package/dist/Common/Constants.d.ts +1 -2
  9. package/dist/Common/Modals/Modal.d.ts +1 -1
  10. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  11. package/dist/Common/SearchBar/types.d.ts +6 -0
  12. package/dist/Common/Types.d.ts +0 -1
  13. package/dist/Pages/ResourceBrowser/ClusterMap/ClusterMap.d.ts +2 -0
  14. package/dist/Pages/ResourceBrowser/ClusterMap/index.d.ts +1 -0
  15. package/dist/Pages/ResourceBrowser/ClusterMap/types.d.ts +25 -0
  16. package/dist/Pages/ResourceBrowser/ClusterMap/utils.d.ts +14 -0
  17. package/dist/Pages/ResourceBrowser/index.d.ts +1 -0
  18. package/dist/Pages/ResourceBrowser/types.d.ts +1 -1
  19. package/dist/Shared/Components/Chip/Chip.component.d.ts +1 -1
  20. package/dist/Shared/Components/Chip/types.d.ts +1 -0
  21. package/dist/Shared/Components/Icon/Icon.d.ts +2 -0
  22. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  23. package/dist/Shared/Components/SelectPicker/constants.d.ts +1 -0
  24. package/dist/Shared/Components/SelectPicker/type.d.ts +13 -2
  25. package/dist/Shared/Components/Table/types.d.ts +1 -0
  26. package/dist/Shared/constants.d.ts +1 -0
  27. package/dist/assets/@code-editor.css +1 -1
  28. package/dist/assets/ic-bg-environment.1ea03fc5.svg +12 -0
  29. package/dist/assets/ic-link.52effffd.svg +3 -0
  30. package/dist/index.d.ts +5 -6
  31. package/dist/index.js +946 -944
  32. package/package.json +2 -1
@@ -2,7 +2,7 @@ export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
2
2
  export declare const Host: string;
3
3
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
4
4
  export declare const DEVTRON_HOME_PAGE = "https://devtron.ai/";
5
- export declare const DOCUMENTATION_VERSION = "/devtron/v0.7";
5
+ export declare const DOCUMENTATION_VERSION = "/devtron/v1.7";
6
6
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
7
7
  export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
8
8
  export declare const LICENSE_DASHBOARD_HOME_PAGE = "https://license.devtron.ai/dashboard";
@@ -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;
@@ -33,5 +33,5 @@ import { SearchBarProps } from './types';
33
33
  * <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
34
34
  * ```
35
35
  */
36
- declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, size, }: SearchBarProps) => JSX.Element;
36
+ declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, size, keyboardShortcut, }: SearchBarProps) => JSX.Element;
37
37
  export default SearchBar;
@@ -46,4 +46,10 @@ export interface SearchBarProps {
46
46
  * @default 'ComponentSizeType.medium'
47
47
  */
48
48
  size?: ComponentSizeType.medium | ComponentSizeType.large;
49
+ /**
50
+ * Renders the keyboard shortcut key that opens the select picker \
51
+ * Shortcut key needs to be defined first in order to use it.
52
+ * @note This is displayed in place of the dropdown indicator
53
+ */
54
+ keyboardShortcut?: string;
49
55
  }
@@ -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,25 @@
1
+ import { ClusterStatusType } from '../types';
2
+ export interface ClusterStatusAndType {
3
+ isProd: boolean;
4
+ status: ClusterStatusType;
5
+ }
6
+ export interface ClusterMapProps {
7
+ isLoading?: boolean;
8
+ filteredList: ClusterStatusAndType[];
9
+ }
10
+ export interface StatusCountEnum {
11
+ healthyCount: number;
12
+ unhealthyCount: number;
13
+ connectionFailedCount: number;
14
+ prodCount: number;
15
+ }
16
+ export interface StatusEntity {
17
+ value: number;
18
+ label: string;
19
+ color: string;
20
+ proportionalValue: string;
21
+ }
22
+ export interface ClusterEntitiesTypes {
23
+ statusEntities: StatusEntity[];
24
+ deploymentEntities: StatusEntity[];
25
+ }
@@ -0,0 +1,14 @@
1
+ import { ClusterEntitiesTypes, ClusterStatusAndType, StatusCountEnum } from './types';
2
+ /**
3
+ *
4
+ * @param filteredList
5
+ * @returns healthyCount, unhealthyCount, connectionFailedCount, prodCount
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
  }
@@ -1,3 +1,3 @@
1
1
  import { ChipProps } from './types';
2
- declare const Chip: ({ label, startIconProps, size: userSize, value, onRemove, style, type, onClick, href, }: ChipProps) => JSX.Element;
2
+ declare const Chip: ({ label, startIconProps, size: userSize, value, onRemove, style, type, onClick, capitalizeLabel, href, }: ChipProps) => JSX.Element;
3
3
  export default Chip;
@@ -19,6 +19,7 @@ export type ChipProps = {
19
19
  */
20
20
  style?: 'neutral' | 'error';
21
21
  startIconProps?: Pick<IconsProps, 'name' | 'color'>;
22
+ capitalizeLabel?: boolean;
22
23
  } & ({
23
24
  type: 'button';
24
25
  href?: never;
@@ -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>>;
@@ -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;
@@ -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']>;
@@ -71,6 +71,17 @@ declare module 'react-select/base' {
71
71
  * Icon to be rendered in the control
72
72
  */
73
73
  icon?: ReactElement;
74
+ /**
75
+ * Renders the keyboard shortcut key that opens the select picker \
76
+ * Shortcut key needs to be defined first in order to use it.
77
+ * @note This is displayed in place of the dropdown indicator
78
+ */
79
+ keyboardShortcut?: string;
80
+ /**
81
+ * If true, checkboxes are shown for options in multi-select mode.
82
+ * @default true
83
+ */
84
+ showCheckboxForMultiSelect?: boolean;
74
85
  /**
75
86
  * If true, the selected option icon is shown in the container.
76
87
  * startIcon has higher priority than endIcon.
@@ -102,7 +113,7 @@ export declare enum SelectPickerVariantType {
102
113
  BORDER_LESS = "border-less",
103
114
  COMPACT = "compact"
104
115
  }
105
- 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'> & {
116
+ 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'> & {
106
117
  /**
107
118
  * Config for the footer at the bottom of menu list. It is sticky by default
108
119
  *
@@ -224,6 +235,6 @@ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps
224
235
  export type SelectPickerTextAreaProps = Omit<SelectPickerProps<string, false>, 'selectRef' | 'inputValue' | 'onInputChange' | 'controlShouldRenderValue' | 'onKeyDown' | 'onCreateOption' | 'shouldRenderTextArea'> & Pick<ResizableTagTextAreaProps, 'maxHeight' | 'minHeight' | 'refVar' | 'dependentRefs'>;
225
236
  export interface GroupedFilterSelectPickerProps<T extends string | number = string | number> extends Omit<ActionMenuProps<T>, 'onClick' | 'disableDescriptionEllipsis' | 'children' | 'buttonProps' | 'isSearchable'> {
226
237
  isFilterApplied?: boolean;
227
- filterSelectPickerPropsMap: Record<T, Omit<FilterSelectPickerProps, 'autoFocus' | 'menuIsOpen' | 'onMenuClose' | 'onKeyDown'>>;
238
+ filterSelectPickerPropsMap: Record<T, Omit<FilterSelectPickerProps, 'autoFocus' | 'menuIsOpen' | 'onMenuClose' | 'onKeyDown' | 'selectRef'>>;
228
239
  }
229
240
  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;
@@ -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";