@ansible/ansible-ui-framework 0.0.298 → 0.0.300

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,4 +24,7 @@ export interface BulkActionDialogProps<T extends object> {
24
24
  /** Indicates if this is a destructive operation */
25
25
  isDanger?: boolean;
26
26
  }
27
+ /**
28
+ * useBulkActionDialog - react hook to open a BulkActionDialog by calling the hook with BulkActionDialogProps
29
+ */
27
30
  export declare function useBulkActionDialog<T extends object>(): import("react").Dispatch<import("react").SetStateAction<BulkActionDialogProps<T> | undefined>>;
@@ -98,9 +98,13 @@ var PageTable_1 = require("./PageTable");
98
98
  var useFrameworkTranslations_1 = require("./useFrameworkTranslations");
99
99
  var useTableItems_1 = require("./useTableItems");
100
100
  /**
101
- * BulkActionDialog
101
+ * BulkActionDialog is a generic dialog for process bulk actions.
102
+ *
103
+ * It processes the actions in parallel up to 5 concurrently.
104
+ * The easiest way to use the BulkActionDialog is then useBulkActionDialog hook.
105
+ *
102
106
  * @param {string} title - The title of the model.
103
- * @param {Array(T)} items - The items to confirm for the bulk action.
107
+ * @param {T[]} items - The items to confirm for the bulk action.
104
108
  * @param {function} keyFn - A function that gets a unique key for each item.
105
109
  * @param {Array(ITableColumn<T>)} actionColumns - The columns to display when processing the actions.
106
110
  * @param {function} actionFn - The action function to perform on each item
@@ -268,6 +272,9 @@ function BulkActionDialog(props) {
268
272
  ? react_core_1.ProgressVariant.success
269
273
  : undefined }) }))] })));
270
274
  }
275
+ /**
276
+ * useBulkActionDialog - react hook to open a BulkActionDialog by calling the hook with BulkActionDialogProps
277
+ */
271
278
  function useBulkActionDialog() {
272
279
  var _a = __read((0, PageDialog_1.usePageDialog)(), 2), _ = _a[0], setDialog = _a[1];
273
280
  var _b = __read((0, react_1.useState)(), 2), props = _b[0], setProps = _b[1];
@@ -1,15 +1,21 @@
1
1
  # BulkActionDialog
2
2
 
3
- BulkActionDialog
4
-
5
- | Param | Type | Description |
6
- | ---------------- | ------------------------ | ------------------------------------------------------------------------- |
7
- | title | `string` | The title of the model. |
8
- | items | `Array(T)` | The items to confirm for the bulk action. |
9
- | keyFn | `function` | A function that gets a unique key for each item. |
10
- | actionColumns | `Array(ITableColumn<T>)` | The columns to display when processing the actions. |
11
- | actionFn | `function` | The action function to perform on each item |
12
- | [onComplete] | `function` | Callback when all the actions are complete. Returns the successful items. |
13
- | [onClose] | `function` | Callback called when the dialog closes. |
14
- | [processingText] | `string` | The text to show for each item when the action is happening. |
15
- | [isDanger] | `boolean` | Indicates if this is a destructive operation. |
3
+ BulkActionDialog is a generic dialog for process bulk actions.
4
+ It processes the actions in parallel up to 5 concurrently.
5
+ The easiest way to use the BulkActionDialog is then useBulkActionDialog hook.
6
+
7
+ | Param | Type | Description |
8
+ | ---------------- | ------------------- | ------------------------------------------------------------------------- |
9
+ | title | `string` | The title of the model. |
10
+ | items | `T[]` | The items to confirm for the bulk action. |
11
+ | keyFn | `function` | A function that gets a unique key for each item. |
12
+ | actionColumns | `ITableColumn<T>[]` | The columns to display when processing the actions. |
13
+ | actionFn | `function` | The action function to perform on each item |
14
+ | [onComplete] | `function` | Callback when all the actions are complete. Returns the successful items. |
15
+ | [onClose] | `function` | Callback called when the dialog closes. |
16
+ | [processingText] | `string` | The text to show for each item when the action is happening. |
17
+ | [isDanger] | `boolean` | Indicates if this is a destructive operation. |
18
+
19
+ ## useBulkActionDialog()
20
+
21
+ useBulkActionDialog - react hook to open a BulkActionDialog by calling the hook with BulkActionDialogProps
@@ -2,15 +2,15 @@
2
2
 
3
3
  PageHeader enables the responsive layout of the header.
4
4
 
5
- | Param | Type | Description |
6
- | -------------- | -------------------- | --------------------------------- |
7
- | breadcrumbs | `Array.<Breadcrumb>` | The breadcrumbs for the page. |
8
- | title | `string` | The title of the page. |
9
- | titleHelpTitle | `string` | The title of help popover. |
10
- | titleHelp | `ReactNode` | The content for the help popover. |
11
- | description | `string` | The description of the page. |
12
- | controls | `ReactNode` | Support for extra page controls. |
13
- | headerActions | `ReactNode` | The actions for the page. |
5
+ | Param | Type | Description |
6
+ | -------------- | -------------- | --------------------------------- |
7
+ | breadcrumbs | `Breadcrumb[]` | The breadcrumbs for the page. |
8
+ | title | `string` | The title of the page. |
9
+ | titleHelpTitle | `string` | The title of help popover. |
10
+ | titleHelp | `ReactNode` | The content for the help popover. |
11
+ | description | `string` | The description of the page. |
12
+ | controls | `ReactNode` | Support for extra page controls. |
13
+ | headerActions | `ReactNode` | The actions for the page. |
14
14
 
15
15
  ## Example
16
16
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "Framework for building consistent responsive web applications using PatternFly.",
4
- "version": "0.0.298",
4
+ "version": "0.0.300",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "repository": {