@redhat-cloud-services/frontend-components-utilities 4.0.18-0 → 4.0.19
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/MiddlewareListener/MiddlewareListener.js.map +1 -1
- package/MiddlewareListener/index.js.map +1 -1
- package/RBAC/RBAC.d.ts +1 -0
- package/RBAC/RBAC.js +18 -18
- package/RBAC/RBAC.js.map +1 -1
- package/RBAC/index.js.map +1 -1
- package/RBACHook/RBACHook.d.ts +1 -1
- package/RBACHook/RBACHook.js +4 -4
- package/RBACHook/RBACHook.js.map +1 -1
- package/RBACHook/index.js.map +1 -1
- package/README.md +92 -0
- package/ReducerRegistry/ReducerRegistry.js +3 -3
- package/ReducerRegistry/ReducerRegistry.js.map +1 -1
- package/ReducerRegistry/index.js.map +1 -1
- package/Registry/Registry.js +3 -3
- package/Registry/Registry.js.map +1 -1
- package/Registry/index.d.ts +2 -2
- package/Registry/index.js.map +1 -1
- package/RouterParams/RouterParams.d.ts +1 -0
- package/RouterParams/RouterParams.js.map +1 -1
- package/RouterParams/index.js.map +1 -1
- package/RowLoader/RowLoader.js.map +1 -1
- package/RowLoader/index.js.map +1 -1
- package/TestingUtils/CypressUtils/CustomCommands.js +5 -6
- package/TestingUtils/CypressUtils/CustomCommands.js.map +1 -1
- package/TestingUtils/CypressUtils/PaginationUtils.js +5 -5
- package/TestingUtils/CypressUtils/PaginationUtils.js.map +1 -1
- package/TestingUtils/CypressUtils/TableUtils.js +6 -6
- package/TestingUtils/CypressUtils/TableUtils.js.map +1 -1
- package/TestingUtils/CypressUtils/UIFilters.js +6 -5
- package/TestingUtils/CypressUtils/UIFilters.js.map +1 -1
- package/TestingUtils/CypressUtils/index.js.map +1 -1
- package/TestingUtils/CypressUtils/selectors.d.ts +3 -3
- package/TestingUtils/CypressUtils/selectors.js +1 -1
- package/TestingUtils/CypressUtils/selectors.js.map +1 -1
- package/TestingUtils/JestUtils/TestWrapper.js.map +1 -1
- package/TestingUtils/JestUtils/index.js.map +1 -1
- package/TestingUtils/package.json +1 -1
- package/debounce/debounce.js.map +1 -1
- package/debounce/index.js.map +1 -1
- package/esm/MiddlewareListener/MiddlewareListener.js.map +1 -1
- package/esm/MiddlewareListener/index.js.map +1 -1
- package/esm/RBAC/RBAC.js +14 -14
- package/esm/RBAC/RBAC.js.map +1 -1
- package/esm/RBAC/index.js.map +1 -1
- package/esm/RBACHook/RBACHook.js +2 -2
- package/esm/RBACHook/RBACHook.js.map +1 -1
- package/esm/RBACHook/index.js.map +1 -1
- package/esm/ReducerRegistry/ReducerRegistry.js.map +1 -1
- package/esm/ReducerRegistry/index.js.map +1 -1
- package/esm/Registry/Registry.js.map +1 -1
- package/esm/Registry/index.js.map +1 -1
- package/esm/RouterParams/RouterParams.js.map +1 -1
- package/esm/RouterParams/index.js.map +1 -1
- package/esm/RowLoader/RowLoader.js.map +1 -1
- package/esm/RowLoader/index.js.map +1 -1
- package/esm/TestingUtils/CypressUtils/CustomCommands.js +2 -4
- package/esm/TestingUtils/CypressUtils/CustomCommands.js.map +1 -1
- package/esm/TestingUtils/CypressUtils/PaginationUtils.js.map +1 -1
- package/esm/TestingUtils/CypressUtils/TableUtils.js.map +1 -1
- package/esm/TestingUtils/CypressUtils/UIFilters.js.map +1 -1
- package/esm/TestingUtils/CypressUtils/index.js.map +1 -1
- package/esm/TestingUtils/CypressUtils/selectors.js +1 -1
- package/esm/TestingUtils/CypressUtils/selectors.js.map +1 -1
- package/esm/TestingUtils/JestUtils/TestWrapper.js.map +1 -1
- package/esm/TestingUtils/JestUtils/index.js.map +1 -1
- package/esm/debounce/debounce.js.map +1 -1
- package/esm/debounce/index.js.map +1 -1
- package/esm/helpers/helpers.js.map +1 -1
- package/esm/helpers/index.js.map +1 -1
- package/esm/helpers/urlPathHelpers.js.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/interceptors/index.js.map +1 -1
- package/esm/interceptors/interceptors.js +4 -3
- package/esm/interceptors/interceptors.js.map +1 -1
- package/esm/mergeMessages/index.js +3 -0
- package/esm/mergeMessages/index.js.map +1 -0
- package/esm/mergeMessages/mergeMessages.js +71 -0
- package/esm/mergeMessages/mergeMessages.js.map +1 -0
- package/esm/parseCvssScore/index.js.map +1 -1
- package/esm/parseCvssScore/parseCvssScore.js +1 -1
- package/esm/parseCvssScore/parseCvssScore.js.map +1 -1
- package/esm/styles/_all.scss +3 -3
- package/esm/useExportPDF/index.js.map +1 -1
- package/esm/useExportPDF/useExportPDF.js +29 -6
- package/esm/useExportPDF/useExportPDF.js.map +1 -1
- package/esm/useFetchBatched/index.js.map +1 -1
- package/esm/useFetchBatched/useFetchBatched.js.map +1 -1
- package/esm/useInsightsNavigate/index.js.map +1 -1
- package/esm/useInsightsNavigate/useInsightsNavigate.js +2 -1
- package/esm/useInsightsNavigate/useInsightsNavigate.js.map +1 -1
- package/esm/useInventory/index.js.map +1 -1
- package/esm/useInventory/useInventory.js +2 -2
- package/esm/useInventory/useInventory.js.map +1 -1
- package/esm/usePromiseQueue/index.js.map +1 -1
- package/esm/usePromiseQueue/usePromiseQueue.js +3 -10
- package/esm/usePromiseQueue/usePromiseQueue.js.map +1 -1
- package/esm/useSuspenseLoader/index.js.map +1 -1
- package/esm/useSuspenseLoader/useSuspenseLoader.js.map +1 -1
- package/helpers/helpers.js +5 -5
- package/helpers/helpers.js.map +1 -1
- package/helpers/index.js.map +1 -1
- package/helpers/urlPathHelpers.d.ts +1 -1
- package/helpers/urlPathHelpers.js.map +1 -1
- package/index.js.map +1 -1
- package/interceptors/index.js.map +1 -1
- package/interceptors/interceptors.js +10 -9
- package/interceptors/interceptors.js.map +1 -1
- package/mergeMessages/index.d.ts +1 -0
- package/mergeMessages/index.js +3 -0
- package/mergeMessages/index.js.map +1 -0
- package/mergeMessages/mergeMessages.d.ts +1 -0
- package/mergeMessages/mergeMessages.js +71 -0
- package/mergeMessages/mergeMessages.js.map +1 -0
- package/mergeMessages/package.json +1 -0
- package/package.json +53 -45
- package/parseCvssScore/index.js.map +1 -1
- package/parseCvssScore/parseCvssScore.js.map +1 -1
- package/styles/_all.scss +3 -3
- package/useExportPDF/index.js.map +1 -1
- package/useExportPDF/useExportPDF.d.ts +1 -1
- package/useExportPDF/useExportPDF.js +29 -6
- package/useExportPDF/useExportPDF.js.map +1 -1
- package/useFetchBatched/index.js.map +1 -1
- package/useFetchBatched/useFetchBatched.js.map +1 -1
- package/useInsightsNavigate/index.js.map +1 -1
- package/useInsightsNavigate/useInsightsNavigate.d.ts +1 -1
- package/useInsightsNavigate/useInsightsNavigate.js +5 -1
- package/useInsightsNavigate/useInsightsNavigate.js.map +1 -1
- package/useInventory/index.js.map +1 -1
- package/useInventory/useInventory.js +2 -2
- package/useInventory/useInventory.js.map +1 -1
- package/usePromiseQueue/index.js.map +1 -1
- package/usePromiseQueue/usePromiseQueue.js +4 -11
- package/usePromiseQueue/usePromiseQueue.js.map +1 -1
- package/useSuspenseLoader/index.js.map +1 -1
- package/useSuspenseLoader/useSuspenseLoader.js.map +1 -1
- package/esm/MiddlewareListener/MiddlewareListener.d.ts +0 -17
- package/esm/MiddlewareListener/index.d.ts +0 -2
- package/esm/RBAC/RBAC.d.ts +0 -29
- package/esm/RBAC/index.d.ts +0 -2
- package/esm/RBACHook/RBACHook.d.ts +0 -10
- package/esm/RBACHook/index.d.ts +0 -2
- package/esm/ReducerRegistry/ReducerRegistry.d.ts +0 -19
- package/esm/ReducerRegistry/index.d.ts +0 -2
- package/esm/Registry/Registry.d.ts +0 -6
- package/esm/Registry/index.d.ts +0 -2
- package/esm/RouterParams/RouterParams.d.ts +0 -6
- package/esm/RouterParams/index.d.ts +0 -2
- package/esm/RowLoader/RowLoader.d.ts +0 -3
- package/esm/RowLoader/index.d.ts +0 -2
- package/esm/TestingUtils/CypressUtils/CustomCommands.d.ts +0 -4
- package/esm/TestingUtils/CypressUtils/PaginationUtils.d.ts +0 -11
- package/esm/TestingUtils/CypressUtils/TableUtils.d.ts +0 -12
- package/esm/TestingUtils/CypressUtils/UIFilters.d.ts +0 -18
- package/esm/TestingUtils/CypressUtils/index.d.ts +0 -5
- package/esm/TestingUtils/CypressUtils/selectors.d.ts +0 -52
- package/esm/TestingUtils/JestUtils/TestWrapper.d.ts +0 -20
- package/esm/TestingUtils/JestUtils/index.d.ts +0 -1
- package/esm/debounce/debounce.d.ts +0 -4
- package/esm/debounce/index.d.ts +0 -2
- package/esm/helpers/helpers.d.ts +0 -11
- package/esm/helpers/index.d.ts +0 -3
- package/esm/helpers/urlPathHelpers.d.ts +0 -3
- package/esm/index.d.ts +0 -22
- package/esm/interceptors/index.d.ts +0 -2
- package/esm/interceptors/interceptors.d.ts +0 -14
- package/esm/parseCvssScore/index.d.ts +0 -2
- package/esm/parseCvssScore/parseCvssScore.d.ts +0 -2
- package/esm/useExportPDF/index.d.ts +0 -2
- package/esm/useExportPDF/useExportPDF.d.ts +0 -3
- package/esm/useFetchBatched/index.d.ts +0 -1
- package/esm/useFetchBatched/useFetchBatched.d.ts +0 -7
- package/esm/useInsightsNavigate/index.d.ts +0 -2
- package/esm/useInsightsNavigate/useInsightsNavigate.d.ts +0 -3
- package/esm/useInventory/index.d.ts +0 -2
- package/esm/useInventory/useInventory.d.ts +0 -13
- package/esm/usePromiseQueue/index.d.ts +0 -1
- package/esm/usePromiseQueue/usePromiseQueue.d.ts +0 -6
- package/esm/useSuspenseLoader/index.d.ts +0 -2
- package/esm/useSuspenseLoader/useSuspenseLoader.d.ts +0 -6
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export function ouiaId(id: any): string;
|
|
2
|
-
export const BUTTON: "[data-ouia-component-type=\"PF5/Button\"]";
|
|
3
|
-
export const DROPDOWN: "[data-ouia-component-type=\"PF5/Dropdown\"]";
|
|
4
|
-
export const DROPDOWN_TOGGLE: "[data-ouia-component-type=\"PF5/DropdownToggle\"]";
|
|
5
|
-
export const DROPDOWN_ITEM: "[data-ouia-component-type=\"PF5/DropdownItem\"]";
|
|
6
|
-
export const CHIP: "[data-ouia-component-type=\"PF5/Chip\"]";
|
|
7
|
-
export const CHIP_GROUP: "div[data-ouia-component-type=\"PF5/ChipGroup\"]";
|
|
8
|
-
export const MENU: "[data-ouia-component-type=\"PF5/Menu\"]";
|
|
9
|
-
export const MENU_TOGGLE_CHECKBOX: "[data-ouia-component-type=\"PF5/MenuToggleCheckbox\"]";
|
|
10
|
-
export const MODAL_CONTENT: "[data-ouia-component-type=\"PF5/ModalContent\"]";
|
|
11
|
-
export const CHECKBOX: "[data-ouia-component-type=\"PF5/Checkbox\"]";
|
|
12
|
-
export const TITLE: "[data-ouia-component-type=\"PF5/Title\"]";
|
|
13
|
-
export const PAGINATION: "[data-ouia-component-type=\"PF5/Pagination\"]";
|
|
14
|
-
export const TEXT_INPUT: "[data-ouia-component-type=\"PF5/TextInput\"]";
|
|
15
|
-
export const TOOLBAR: "[data-ouia-component-type=\"PF5/Toolbar\"]";
|
|
16
|
-
export const TABLE: "[data-ouia-component-type=\"PF5/Table\"]";
|
|
17
|
-
export const TABLE_HEADER: "thead [data-ouia-component-type=\"PF5/TableRow\"]";
|
|
18
|
-
export const TABLE_ROW: "tbody [data-ouia-component-type=\"PF5/TableRow\"]";
|
|
19
|
-
export const TABLE_ROW_CHECKBOX: "tbody [data-ouia-component-type=\"PF5/TableRow\"] input";
|
|
20
|
-
export const EMPTY_STATE: "[data-ouia-component-type=\"PF4/EmptyState\"]";
|
|
21
|
-
export const CARD: "[data-ouia-component-type=\"PF5/Card\"]";
|
|
22
|
-
export const BREADCRUMB: "[data-ouia-component-type=\"PF5/Breadcrumb\"]";
|
|
23
|
-
export const TAB_CONTENT: "[data-ouia-component-type=\"PF5/TabContent\"]";
|
|
24
|
-
export const TAB_BUTTON: "[data-ouia-component-type=\"PF5/TabButton\"]";
|
|
25
|
-
export const ALERT: "[data-ouia-component-type=\"PF5/Alert\"]";
|
|
26
|
-
export const MENU_TOGGLE: ".pf-v5-c-menu-toggle";
|
|
27
|
-
export const MENU_LIST: ".pf-v5-c-menu__list";
|
|
28
|
-
export const MENU_TOGGLE_TEXT: ".pf-v5-c-menu-toggle__text";
|
|
29
|
-
export const MENU_ITEM: ".pf-v5-c-menu__list-item";
|
|
30
|
-
export const SELECT_MENU_ITEM: ".pf-v5-c-select__menu-item";
|
|
31
|
-
export const PAGINATION_TOP: "[data-ouia-component-type=\"PF5/Pagination\"]:not(.pf-m-bottom)";
|
|
32
|
-
export const PAGINATION_BOTTOM: "[data-ouia-component-type=\"PF5/Pagination\"].pf-m-bottom";
|
|
33
|
-
export const EMPTY_STATE_TITLE: ".pf-v5-c-empty-state__title";
|
|
34
|
-
export const EMPTY_STATE_ICON: ".pf-v5-c-empty-state__icon";
|
|
35
|
-
export const CARD_TITLE: ".pf-v5-c-card__title";
|
|
36
|
-
export const PAGINATION_NEXT: "button[aria-label=\"Go to next page\"]";
|
|
37
|
-
export const PAGINATION_PREV: "button[aria-label=\"Go to previous page\"]";
|
|
38
|
-
export const PAGINATION_LAST: "button[aria-label=\"Go to last page\"]";
|
|
39
|
-
export const PAGINATION_FIRST: "button[aria-label=\"Go to first page\"]";
|
|
40
|
-
export const PAGINATION_CURRENT: "[aria-label=\"Current page\"]";
|
|
41
|
-
export const PRIMARY_TOOLBAR: "[data-ouia-component-id=\"PrimaryToolbar\"]";
|
|
42
|
-
export const PRIMARY_TOOLBAR_ACTIONS: ".ins-c-primary-toolbar__actions";
|
|
43
|
-
export const CONDITIONAL_FILTER: "[data-ouia-component-id=\"ConditionalFilter\"]";
|
|
44
|
-
export const CONDITIONAL_FILTER_TOGGLE: "[data-ouia-component-id=\"ConditionalFilterToggle\"]";
|
|
45
|
-
export const PT_CONDITIONAL_FILTER: "[data-ouia-component-id=\"ConditionalFilter\"]";
|
|
46
|
-
export const PT_CONDITIONAL_FILTER_TOGGLE: "[data-ouia-component-id=\"ConditionalFilterToggle\"]";
|
|
47
|
-
export const PT_CONDITIONAL_FILTER_LIST: "[data-ouia-component-id=\"ConditionalFilterList\"]";
|
|
48
|
-
export const PT_BULK_SELECT: "[data-ouia-component-id=\"BulkSelect\"]";
|
|
49
|
-
export const PT_BULK_SELECT_CHECKBOX: "[data-ouia-component-id=\"BulkSelectCheckbox\"]";
|
|
50
|
-
export const PT_BULK_SELECT_LIST: "[data-ouia-component-id=\"BulkSelectList\"]";
|
|
51
|
-
export const PT_BULK_ACTIONS_TOGGLE: "[data-ouia-component-id=\"BulkActionsToggle\"]";
|
|
52
|
-
export const PT_BULK_ACTIONS_LIST: "[data-ouia-component-id=\"BulkActionsList\"]";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export default TestWrapper;
|
|
2
|
-
declare function TestWrapper({ children, routerProps, componentPath, store }: {
|
|
3
|
-
children: any;
|
|
4
|
-
routerProps?: {
|
|
5
|
-
initialEntries: string[];
|
|
6
|
-
} | undefined;
|
|
7
|
-
componentPath: any;
|
|
8
|
-
store?: import("redux-mock-store").MockStoreEnhanced<any, {}> | undefined;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare namespace TestWrapper {
|
|
11
|
-
namespace propTypes {
|
|
12
|
-
let children: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
13
|
-
let routerProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
|
-
initialEntries: PropTypes.Requireable<any[]>;
|
|
15
|
-
}>>;
|
|
16
|
-
let componentPath: PropTypes.Requireable<string>;
|
|
17
|
-
let store: PropTypes.Requireable<object>;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
import PropTypes from 'prop-types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./TestWrapper";
|
package/esm/debounce/index.d.ts
DELETED
package/esm/helpers/helpers.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const CSV_TYPE = "text/csv;charset=utf-8;";
|
|
2
|
-
export declare const JSON_TYPE = "data:text/json;charset=utf-8,";
|
|
3
|
-
export declare function mergeArraysByKey(arrays: Record<string, unknown>[][], key?: string): Record<string, unknown>[];
|
|
4
|
-
export declare function downloadFile(data: unknown, filename?: string, format?: string): void;
|
|
5
|
-
export declare function processDate(dateString: string | number | Date): string;
|
|
6
|
-
export declare function getBaseName(pathname: string, level?: number): string;
|
|
7
|
-
export type FilterData<T = Record<string, unknown | string | Date | ((...args: unknown[]) => unknown)>> = object | null | Record<string, unknown | string | Date | ((...args: unknown[]) => unknown) | T>;
|
|
8
|
-
export declare const generateFilter: (data: FilterData, path?: string, options?: {
|
|
9
|
-
arrayEnhancer: string;
|
|
10
|
-
}) => Record<string, string>;
|
|
11
|
-
export declare const toUpperCase: (text?: string) => string;
|
package/esm/helpers/index.d.ts
DELETED
package/esm/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { default as debounceFunction } from './debounce';
|
|
2
|
-
export * as helpers from './helpers';
|
|
3
|
-
export { default as axiosInstance } from './interceptors';
|
|
4
|
-
export * as interceptors from './interceptors';
|
|
5
|
-
export { default as MiddlewareListener } from './MiddlewareListener';
|
|
6
|
-
export { default as parseCvssScore } from './parseCvssScore';
|
|
7
|
-
export * as RBAC from './RBAC';
|
|
8
|
-
export * as RBACHook from './RBACHook';
|
|
9
|
-
export { default as ReducerRegistry } from './ReducerRegistry';
|
|
10
|
-
export * as reduxHelpers from './ReducerRegistry';
|
|
11
|
-
export { default as registryDecorator } from './Registry';
|
|
12
|
-
export * from './Registry';
|
|
13
|
-
export { default as routerParams } from './RouterParams';
|
|
14
|
-
export { default as RowLoader } from './RowLoader';
|
|
15
|
-
export { useInventory } from './useInventory';
|
|
16
|
-
export * from './TestingUtils/CypressUtils';
|
|
17
|
-
export * from './useInsightsNavigate';
|
|
18
|
-
export * from './useExportPDF';
|
|
19
|
-
export * from './usePromiseQueue';
|
|
20
|
-
export * from './useFetchBatched';
|
|
21
|
-
export * from './useSuspenseLoader';
|
|
22
|
-
export * from './TestingUtils/JestUtils';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare class HttpError extends Error {
|
|
2
|
-
description: string;
|
|
3
|
-
constructor(description: string);
|
|
4
|
-
}
|
|
5
|
-
export declare function authInterceptorWithChrome(chrome: any): (config: any) => Promise<any>;
|
|
6
|
-
export declare const authInterceptor: (config: any) => Promise<any>;
|
|
7
|
-
export declare function responseDataInterceptor(response: any): any;
|
|
8
|
-
export declare function interceptor401WithChrome(chrome: any): (error: any) => boolean;
|
|
9
|
-
export declare const interceptor401: (error: any) => boolean;
|
|
10
|
-
export declare function interceptor500(error: any): void;
|
|
11
|
-
export declare function errorInterceptor(err: any): void;
|
|
12
|
-
export declare const useAxiosWithPlatformInterceptors: () => import("axios").AxiosInstance;
|
|
13
|
-
export declare const instance: import("axios").AxiosInstance;
|
|
14
|
-
export default instance;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './useFetchBatched';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type FetchFunctionType = (filter: object | Array<string>, options?: object) => void;
|
|
2
|
-
declare const useFetchBatched: () => {
|
|
3
|
-
isLoading: boolean;
|
|
4
|
-
fetchBatched: (fetchFunction: FetchFunctionType, total: number, filter: object, batchSize?: number) => Promise<any>;
|
|
5
|
-
fetchBatchedInline: (fetchFunction: FetchFunctionType, list: Array<string>, batchSize?: number) => Promise<any>;
|
|
6
|
-
};
|
|
7
|
-
export default useFetchBatched;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function useInventory({ store, tableReducer, detailReducer, getRegistry }: {
|
|
2
|
-
store: any;
|
|
3
|
-
tableReducer: any;
|
|
4
|
-
detailReducer: any;
|
|
5
|
-
getRegistry: any;
|
|
6
|
-
}): {
|
|
7
|
-
InventoryTable: null;
|
|
8
|
-
InventoryDetail: null;
|
|
9
|
-
TagWithDialog: null;
|
|
10
|
-
newReducers: null;
|
|
11
|
-
rawReducers: null;
|
|
12
|
-
};
|
|
13
|
-
export default useInventory;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './usePromiseQueue';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare function useSuspenseLoader<R, T extends Array<unknown>>(asyncMethod: (...args: T) => Promise<R>, afterResolve?: (result: R) => void, afterReject?: (error: unknown) => void): {
|
|
2
|
-
loader: (...args: Parameters<typeof asyncMethod>) => NonNullable<R>;
|
|
3
|
-
purgeCache: () => void;
|
|
4
|
-
};
|
|
5
|
-
export type UnwrappedLoader<F extends (...args: any[]) => Promise<unknown>> = (...arhs: Parameters<F>) => Awaited<ReturnType<F>>;
|
|
6
|
-
export default useSuspenseLoader;
|