@devtron-labs/devtron-fe-common-lib 1.18.0-pre-1 → 1.18.1-beta-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.
Files changed (35) hide show
  1. package/dist/{@code-editor-ChbMC22a.js → @code-editor-B4fpn5b3.js} +7499 -7549
  2. package/dist/{@common-rjsf-NG-2s0K9.js → @common-rjsf-CahV__Ce.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 +2 -1
  9. package/dist/Common/ErrorPage.d.ts +1 -1
  10. package/dist/Common/ErrorScreenManager.d.ts +1 -1
  11. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  12. package/dist/Common/SearchBar/types.d.ts +6 -0
  13. package/dist/Common/Types.d.ts +11 -2
  14. package/dist/Pages/ResourceBrowser/index.d.ts +0 -1
  15. package/dist/Pages/ResourceBrowser/types.d.ts +1 -1
  16. package/dist/Shared/Components/Icon/Icon.d.ts +5 -2
  17. package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +1 -1
  18. package/dist/Shared/Components/MaterialHistory/types.d.ts +1 -2
  19. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  20. package/dist/Shared/Components/SelectPicker/constants.d.ts +1 -0
  21. package/dist/Shared/Components/SelectPicker/type.d.ts +13 -2
  22. package/dist/Shared/Components/Table/types.d.ts +1 -0
  23. package/dist/assets/@code-editor.css +1 -1
  24. package/dist/assets/ic-group-filter-applied.2cdb11e7.svg +20 -0
  25. package/dist/assets/ic-group-filter.ed1869f5.svg +19 -0
  26. package/dist/assets/ic-storage.03f282b6.svg +21 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +816 -817
  29. package/package.json +2 -1
  30. package/dist/Pages/ResourceBrowser/ClusterMap/ClusterMap.d.ts +0 -2
  31. package/dist/Pages/ResourceBrowser/ClusterMap/index.d.ts +0 -1
  32. package/dist/Pages/ResourceBrowser/ClusterMap/types.d.ts +0 -25
  33. package/dist/Pages/ResourceBrowser/ClusterMap/utils.d.ts +0 -14
  34. package/dist/assets/ic-bg-environment.0afaefb5.svg +0 -12
  35. package/dist/assets/ic-link.52effffd.svg +0 -3
@@ -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,6 +58,7 @@ 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";
61
62
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP: "/global-config/templates/devtron-apps";
62
63
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: "/global-config/templates/devtron-apps/create";
63
64
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: "/global-config/templates/devtron-apps/detail/:appId";
@@ -1,3 +1,3 @@
1
1
  import { ErrorPageType } from './Types';
2
- declare const ErrorPage: ({ code, image, title, subTitle, imageType, redirectURL, reload }: ErrorPageType) => JSX.Element;
2
+ declare const ErrorPage: ({ code, image, title, subTitle, imageType, redirectURL, reload, on404Redirect }: ErrorPageType) => JSX.Element;
3
3
  export default ErrorPage;
@@ -1,3 +1,3 @@
1
1
  import { ErrorScreenManagerProps } from './Types';
2
- declare const ErrorScreenManager: ({ code, reload, subtitle, reloadClass, redirectURL, imageType, }: ErrorScreenManagerProps) => JSX.Element;
2
+ declare const ErrorScreenManager: ({ code, reload, subtitle, reloadClass, redirectURL, on404Redirect, imageType, }: ErrorScreenManagerProps) => JSX.Element;
3
3
  export default ErrorScreenManager;
@@ -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
  }
@@ -141,20 +141,29 @@ export interface GenericEmptyStateType {
141
141
  export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload' | 'redirectURL'> {
142
142
  code: number;
143
143
  redirectURL?: string;
144
+ on404Redirect?: () => void;
144
145
  reload?: () => void;
145
146
  }
146
- export interface ErrorScreenManagerProps {
147
+ export type ErrorScreenManagerProps = {
147
148
  code?: number;
148
149
  imageType?: ImageType;
149
150
  reload?: (...args: any[]) => any;
150
151
  subtitle?: React.ReactChild;
151
152
  reloadClass?: string;
153
+ } & ({
152
154
  /**
153
155
  * Would be used to redirect URL in case of 404
154
156
  * @default - APP_LIST
155
157
  */
156
158
  redirectURL?: string;
157
- }
159
+ on404Redirect?: never;
160
+ } | {
161
+ redirectURL?: never;
162
+ on404Redirect: () => void;
163
+ } | {
164
+ redirectURL?: never;
165
+ on404Redirect?: never;
166
+ });
158
167
  export interface ErrorScreenNotAuthorizedProps {
159
168
  subtitle?: React.ReactChild;
160
169
  title?: string;
@@ -1,4 +1,3 @@
1
- export * from './ClusterMap';
2
1
  export * from './constants';
3
2
  export { default as ForceDeleteOption } from './ForceDeleteOption';
4
3
  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
  }
@@ -18,7 +18,6 @@ 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>>;
22
21
  'ic-bharatpe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
23
22
  'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
24
23
  'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -108,6 +107,8 @@ export declare const iconMap: {
108
107
  'ic-google-gke': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
109
108
  'ic-google': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
110
109
  'ic-grid-view': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
110
+ 'ic-group-filter-applied': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
111
+ 'ic-group-filter': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
111
112
  'ic-hand-pointing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
112
113
  'ic-heart-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
113
114
  'ic-heart-red-animated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -134,7 +135,6 @@ export declare const iconMap: {
134
135
  'ic-lego': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
135
136
  'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
136
137
  'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
137
- 'ic-link': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
138
138
  'ic-linked-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
139
139
  'ic-list-bullets': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
140
140
  'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -187,6 +187,7 @@ export declare const iconMap: {
187
187
  'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
188
188
  'ic-stamp': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
189
189
  'ic-stop-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
190
+ 'ic-storage': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
190
191
  'ic-strategy-blue-green-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
191
192
  'ic-strategy-blue-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
192
193
  'ic-strategy-canary-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -215,6 +216,8 @@ export declare const iconMap: {
215
216
  'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
216
217
  'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
217
218
  'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
219
+ 'ic-visibility-off': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
220
+ 'ic-visibility-on': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
218
221
  'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
219
222
  'ic-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
220
223
  'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -1,3 +1,3 @@
1
1
  import { MaterialHistoryProps } from './types';
2
- declare const MaterialHistory: ({ material, pipelineName, ciPipelineId, selectCommit, isCommitInfoModal, }: MaterialHistoryProps) => JSX.Element;
2
+ declare const MaterialHistory: ({ material, pipelineName, selectCommit, isCommitInfoModal }: MaterialHistoryProps) => JSX.Element;
3
3
  export default MaterialHistory;
@@ -2,7 +2,6 @@ import { CIMaterialType } from '../../Services/app.types';
2
2
  export interface MaterialHistoryProps {
3
3
  material: CIMaterialType;
4
4
  pipelineName: string;
5
- ciPipelineId?: string;
6
- selectCommit?: (materialId: string, commit: string, ciPipelineId?: string) => void;
5
+ selectCommit?: (commitId: string) => void;
7
6
  isCommitInfoModal?: boolean;
8
7
  }
@@ -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']>;
@@ -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;