@devtron-labs/devtron-fe-common-lib 1.19.0-beta-1 → 1.19.0-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.
- package/dist/{@code-editor-Bliy6MDD.js → @code-editor-C0-_KohH.js} +6367 -6384
- package/dist/{@common-rjsf-GByQqqeZ.js → @common-rjsf-DcR-0Oxx.js} +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/index.d.ts +1 -0
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/index.d.ts +0 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +1 -3
- package/dist/Shared/Components/Table/TableContent.d.ts +1 -1
- package/dist/Shared/Components/Table/types.d.ts +4 -8
- package/dist/Shared/Components/Table/utils.d.ts +1 -1
- package/dist/Shared/Services/ToastManager/ToastContent.d.ts +2 -1
- package/dist/Shared/Services/ToastManager/constants.d.ts +2 -2
- package/dist/Shared/Services/ToastManager/toastManager.service.d.ts +1 -1
- package/dist/Shared/Services/ToastManager/types.d.ts +23 -3
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-input.57281408.svg +3 -0
- package/dist/index.js +617 -618
- package/package.json +1 -1
- package/dist/Common/InteractiveCellText/InteractiveCellText.d.ts +0 -27
- package/dist/Common/InteractiveCellText/index.d.ts +0 -2
- package/dist/Common/InteractiveCellText/types.d.ts +0 -10
- package/dist/assets/ic-diff-added.6ef6f938.svg +0 -3
- package/dist/assets/ic-diff-deleted.54eb24dd.svg +0 -3
- package/dist/assets/ic-diff-updated.294b925e.svg +0 -4
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as n, au as T, aw as J, av as K } from "./@vendor-3ORIJA0h.js";
|
2
2
|
import V, { useState as q, useEffect as Y, forwardRef as G, useMemo as E } from "react";
|
3
3
|
import z, { getDefaultRegistry as Q } from "@rjsf/core";
|
4
|
-
import { T as O, j as F, c as w, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-
|
4
|
+
import { T as O, j as F, c as w, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-C0-_KohH.js";
|
5
5
|
import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as re, ADDITIONAL_PROPERTY_FLAG as L, errorId as se, englishStringTranslator as ae, TranslatableString as oe, titleId as le, canExpand as ie, deepEquals as ce } from "@rjsf/utils";
|
6
6
|
import { ReactComponent as de } from "./assets/ic-add.cfaa779b.svg";
|
7
7
|
import { ReactComponent as ue } from "./assets/ic-warning.ecf7ff97.svg";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ShortcutType } from './types';
|
2
2
|
export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
|
3
|
-
keys: ("N" | "R" | "Enter" | "/" | "
|
3
|
+
keys: ("N" | "R" | "Enter" | "/" | "Alt" | "F" | "E" | "K" | "X" | "A" | "S" | "Home" | "End" | "." | "Space" | "Control" | "Shift" | "Meta" | "Escape" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowDown" | "PageUp" | "PageDown" | "Backspace" | "Delete")[];
|
4
4
|
id: string;
|
5
5
|
};
|
6
6
|
export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
|
package/dist/Common/index.d.ts
CHANGED
@@ -25,7 +25,6 @@ export * from './Helper';
|
|
25
25
|
export * from './Hooks';
|
26
26
|
export * from './ImageTags';
|
27
27
|
export * from './ImageTags.Types';
|
28
|
-
export * from './InteractiveCellText';
|
29
28
|
export * from './Markdown';
|
30
29
|
export * from './Modals/Modal';
|
31
30
|
export * from './Modals/VisibleModal';
|
@@ -67,9 +67,6 @@ export declare const iconMap: {
|
|
67
67
|
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
68
68
|
'ic-devtron-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
69
69
|
'ic-devtron': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
70
|
-
'ic-diff-added': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
71
|
-
'ic-diff-deleted': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
72
|
-
'ic-diff-updated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
73
70
|
'ic-disconnect': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
74
71
|
'ic-discord-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
75
72
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -127,6 +124,7 @@ export declare const iconMap: {
|
|
127
124
|
'ic-info-filled-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
128
125
|
'ic-info-filled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
129
126
|
'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
127
|
+
'ic-input': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
130
128
|
'ic-install': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
131
129
|
'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
132
130
|
'ic-k3s': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FiltersTypeEnum, TableContentProps } from './types';
|
2
|
-
declare const TableContent: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ filterData, rows, resizableConfig, additionalProps, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent, pageSizeOptions, filteredRows, areFilteredRowsLoading,
|
2
|
+
declare const TableContent: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ filterData, rows, resizableConfig, additionalProps, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent, pageSizeOptions, filteredRows, areFilteredRowsLoading, }: TableContentProps<RowData, FilterVariant, AdditionalProps>) => JSX.Element;
|
3
3
|
export default TableContent;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Dispatch, FunctionComponent, MouseEvent, PropsWithChildren, SetStateAction } from 'react';
|
2
2
|
import { GenericFilterEmptyStateProps } from '../../../Common/EmptyState/types';
|
3
3
|
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps, UseUrlFiltersReturnType } from '../../../Common/Hooks';
|
4
|
-
import {
|
4
|
+
import { GenericEmptyStateType } from '../../../Common/index';
|
5
5
|
import { PageSizeOption } from '../../../Common/Pagination/types';
|
6
6
|
import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
|
7
7
|
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
|
@@ -105,7 +105,7 @@ export interface ConfigurableColumnsType<RowData extends unknown, FilterVariant
|
|
105
105
|
interface GetRowsProps extends Pick<UseFiltersReturnType, 'offset' | 'pageSize' | 'searchKey' | 'sortBy' | 'sortOrder'> {
|
106
106
|
}
|
107
107
|
type AdditionalFilterPropsType<T extends FiltersTypeEnum> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey' | 'defaultPageSize'> : T extends FiltersTypeEnum.STATE ? Pick<UseStateFiltersProps<string>, 'initialSortKey' | 'defaultPageSize'> : never;
|
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'
|
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
111
|
rows: RowsType<RowData> | null;
|
@@ -177,10 +177,7 @@ export type InternalTableProps<RowData extends unknown, FilterVariant extends Fi
|
|
177
177
|
} | {
|
178
178
|
rows?: never;
|
179
179
|
/** NOTE: Sorting on frontend is only handled if rows is provided instead of getRows */
|
180
|
-
getRows: (props: GetRowsProps
|
181
|
-
rows: RowsType<RowData>;
|
182
|
-
totalRows: number;
|
183
|
-
}>;
|
180
|
+
getRows: (props: GetRowsProps) => Promise<RowsType<RowData>>;
|
184
181
|
}) & ({
|
185
182
|
paginationVariant: PaginationEnum.PAGINATED;
|
186
183
|
pageSizeOptions?: PageSizeOption[];
|
@@ -206,9 +203,8 @@ export interface GetFilteringPromiseProps<RowData extends unknown> {
|
|
206
203
|
searchSortTimeoutRef: React.MutableRefObject<number>;
|
207
204
|
callback: () => Promise<RowsType<RowData>> | RowsType<RowData>;
|
208
205
|
}
|
209
|
-
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions'
|
206
|
+
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions'> {
|
210
207
|
filteredRows: RowsType<RowData>;
|
211
208
|
areFilteredRowsLoading: boolean;
|
212
|
-
totalRows: number;
|
213
209
|
}
|
214
210
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Column, ConfigurableColumnsType, FiltersTypeEnum, GetFilteringPromiseProps, RowsType, TableProps, UseFiltersReturnType } from './types';
|
2
|
-
export declare const searchAndSortRows: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>(rows: TableProps<RowData, FilterVariant, AdditionalProps>["rows"], filter: TableProps<RowData, FilterVariant, AdditionalProps>["filter"], filterData: UseFiltersReturnType, comparator?: Column<RowData, FilterVariant, AdditionalProps>["comparator"]) =>
|
2
|
+
export declare const searchAndSortRows: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>(rows: TableProps<RowData, FilterVariant, AdditionalProps>["rows"], filter: TableProps<RowData, FilterVariant, AdditionalProps>["filter"], filterData: UseFiltersReturnType, comparator?: Column<RowData, FilterVariant, AdditionalProps>["comparator"]) => RowsType<RowData>;
|
3
3
|
export declare const getVisibleColumnsFromLocalStorage: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ allColumns, id, }: Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, "allColumns"> & Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "id">) => Column<RowData, FilterVariant, AdditionalProps>[];
|
4
4
|
export declare const setVisibleColumnsToLocalStorage: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ id, visibleColumns, }: Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, "visibleColumns"> & Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "id">) => void;
|
5
5
|
export declare const getVisibleColumns: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ areColumnsConfigurable, columns, id, }: Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "areColumnsConfigurable" | "columns" | "id">) => Column<RowData, FilterVariant, AdditionalProps>[];
|
@@ -1,2 +1,3 @@
|
|
1
|
-
import { ToastProps } from './types';
|
1
|
+
import { ShortcutToastContentProps, ToastProps } from './types';
|
2
2
|
export declare const ToastContent: ({ title, description, buttonProps, }: Pick<ToastProps, "title" | "description" | "buttonProps">) => JSX.Element;
|
3
|
+
export declare const ShortcutToastContent: ({ shortcuts, text }: ShortcutToastContentProps) => JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ToastContainerProps, ToastOptions } from 'react-toastify';
|
2
|
-
import {
|
2
|
+
import { BaseToastProps, ToastProps } from './types';
|
3
3
|
export declare const TOAST_BASE_CONFIG: ToastContainerProps;
|
4
|
-
export declare const TOAST_VARIANT_TO_CONFIG_MAP: Record<
|
4
|
+
export declare const TOAST_VARIANT_TO_CONFIG_MAP: Record<BaseToastProps['variant'], Required<Pick<ToastProps, 'icon' | 'title' | 'progressBarBg'>> & Pick<ToastOptions, 'type'>>;
|
@@ -65,7 +65,7 @@ declare class ToastManager {
|
|
65
65
|
/**
|
66
66
|
* Handler for showing the toast
|
67
67
|
*/
|
68
|
-
showToast: ({ variant, icon: customIcon, title, description, buttonProps, progressBarBg: customProgressBarBg, }: ToastProps, options?: Pick<ToastOptions, "autoClose">) => import('react-toastify').Id;
|
68
|
+
showToast: ({ variant, icon: customIcon, title, description, buttonProps, progressBarBg: customProgressBarBg, text, shortcuts, }: ToastProps, options?: Pick<ToastOptions, "autoClose">) => import('react-toastify').Id;
|
69
69
|
/**
|
70
70
|
* Handler for dismissing an existing toast
|
71
71
|
*/
|
@@ -1,13 +1,28 @@
|
|
1
1
|
import { ReactElement } from 'react';
|
2
|
+
import { SupportedKeyboardKeysType } from '../../../Common/Hooks';
|
2
3
|
import { ButtonComponentType, ButtonProps } from '../../Components';
|
3
4
|
export declare enum ToastVariantType {
|
4
5
|
info = "info",
|
5
6
|
success = "success",
|
6
7
|
error = "error",
|
7
8
|
warn = "warn",
|
8
|
-
notAuthorized = "notAuthorized"
|
9
|
+
notAuthorized = "notAuthorized",
|
10
|
+
shortcut = "shortcut"
|
9
11
|
}
|
10
|
-
export interface
|
12
|
+
export interface ShortcutToastProps {
|
13
|
+
variant: ToastVariantType.shortcut;
|
14
|
+
/**
|
15
|
+
* Text to display along the shortcuts in the toast
|
16
|
+
* Example: "Press [S] to switch context"
|
17
|
+
*/
|
18
|
+
text: string;
|
19
|
+
/**
|
20
|
+
* The shortcuts to be displayed in the toast
|
21
|
+
* Note: The shortcuts should be in the format of `['Ctrl', 'A']
|
22
|
+
*/
|
23
|
+
shortcuts: SupportedKeyboardKeysType[];
|
24
|
+
}
|
25
|
+
export interface BaseToastProps {
|
11
26
|
/**
|
12
27
|
* Title for the toast
|
13
28
|
* If not provided, defaults to a value based on the selected variant
|
@@ -26,7 +41,7 @@ export interface ToastProps {
|
|
26
41
|
*
|
27
42
|
* @default ToastVariantType.info
|
28
43
|
*/
|
29
|
-
variant?: ToastVariantType
|
44
|
+
variant?: Exclude<ToastVariantType, ToastVariantType.shortcut>;
|
30
45
|
/**
|
31
46
|
* Props for the action button to be displayed in the toast
|
32
47
|
*
|
@@ -38,3 +53,8 @@ export interface ToastProps {
|
|
38
53
|
*/
|
39
54
|
progressBarBg?: string;
|
40
55
|
}
|
56
|
+
export type ToastProps = (BaseToastProps & Partial<Record<Exclude<keyof ShortcutToastProps, 'variant'>, never>>) | (ShortcutToastProps & Partial<Record<Exclude<keyof BaseToastProps, 'variant'>, never>>);
|
57
|
+
export interface ShortcutToastContentProps {
|
58
|
+
text: string;
|
59
|
+
shortcuts: SupportedKeyboardKeysType[];
|
60
|
+
}
|