@ansible/ansible-ui-framework 2.4.2478 → 2.4.2479
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/PageDialogs/BulkActionDialog.d.ts +6 -1
- package/PageDialogs/BulkConfirmationDialog.d.ts +2 -2
- package/index.js +1185 -1170
- package/index.umd.cjs +64 -64
- package/package.json +1 -1
- package/publish/index.d.ts +4 -4
@@ -1,6 +1,10 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { ErrorAdapter } from '../PageForm/typesErrorAdapter';
|
3
3
|
import { ITableColumn } from '../PageTable/PageTableColumn';
|
4
|
+
export type StatusWithMessageAndUrl = {
|
5
|
+
message: string;
|
6
|
+
url: string;
|
7
|
+
};
|
4
8
|
export interface BulkActionDialogProps<T extends object> {
|
5
9
|
title: string;
|
6
10
|
description?: ReactNode | string;
|
@@ -13,6 +17,7 @@ export interface BulkActionDialogProps<T extends object> {
|
|
13
17
|
processingText?: string;
|
14
18
|
isDanger?: boolean;
|
15
19
|
errorAdapter?: ErrorAdapter;
|
20
|
+
statusParser?: (response: unknown) => null | StatusWithMessageAndUrl;
|
16
21
|
}
|
17
22
|
export declare function BulkActionDialog<T extends object>(props: BulkActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
18
|
-
export declare function useBulkActionDialog<T extends object>(defaultErrorAdapter?: ErrorAdapter): import("react").Dispatch<import("react").SetStateAction<BulkActionDialogProps<T> | undefined>>;
|
23
|
+
export declare function useBulkActionDialog<T extends object>(defaultErrorAdapter?: ErrorAdapter, statusParser?: (response: unknown) => null | StatusWithMessageAndUrl): import("react").Dispatch<import("react").SetStateAction<BulkActionDialogProps<T> | undefined>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ErrorAdapter } from '../PageForm/typesErrorAdapter';
|
2
2
|
import { ITableColumn } from '../PageTable/PageTableColumn';
|
3
|
-
import { BulkActionDialogProps } from './BulkActionDialog';
|
3
|
+
import { BulkActionDialogProps, StatusWithMessageAndUrl } from './BulkActionDialog';
|
4
4
|
export interface BulkConfirmationDialog<T extends object> {
|
5
5
|
title: string;
|
6
6
|
prompt?: string;
|
@@ -16,4 +16,4 @@ export interface BulkConfirmationDialog<T extends object> {
|
|
16
16
|
isDanger?: boolean;
|
17
17
|
errorAdapter?: ErrorAdapter;
|
18
18
|
}
|
19
|
-
export declare function useBulkConfirmation<T extends object>(errorAdapter?: ErrorAdapter): (options: Omit<BulkConfirmationDialog<T>, "onConfirm" | "onClose"> & Omit<BulkActionDialogProps<T>, "onClose">) => void;
|
19
|
+
export declare function useBulkConfirmation<T extends object>(errorAdapter?: ErrorAdapter, statusParser?: (response: unknown) => null | StatusWithMessageAndUrl): (options: Omit<BulkConfirmationDialog<T>, "onConfirm" | "onClose"> & Omit<BulkActionDialogProps<T>, "onClose">) => void;
|