@vuu-ui/vuu-data-react 0.11.3 → 0.12.1
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/cjs/data-editing/EditForm.js +3 -10
- package/cjs/data-editing/EditForm.js.map +1 -1
- package/cjs/data-editing/edit-validation-rules.js.map +1 -1
- package/cjs/datasource-provider/RestDataSourceProvider.js +1 -1
- package/cjs/datasource-provider/RestDataSourceProvider.js.map +1 -1
- package/cjs/datasource-provider/VuuDataSourceProvider.js +1 -1
- package/cjs/datasource-provider/VuuDataSourceProvider.js.map +1 -1
- package/cjs/hooks/useSessionDataSource.js +2 -2
- package/cjs/hooks/useSessionDataSource.js.map +1 -1
- package/cjs/hooks/useTypeaheadSuggestions.js +1 -1
- package/cjs/hooks/useTypeaheadSuggestions.js.map +1 -1
- package/cjs/hooks/useVuuMenuActions.js +166 -17
- package/cjs/hooks/useVuuMenuActions.js.map +1 -1
- package/cjs/hooks/useVuuTables.js +1 -1
- package/cjs/hooks/useVuuTables.js.map +1 -1
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/esm/data-editing/EditForm.js +3 -10
- package/esm/data-editing/EditForm.js.map +1 -1
- package/esm/data-editing/edit-validation-rules.js.map +1 -1
- package/esm/datasource-provider/RestDataSourceProvider.js +2 -2
- package/esm/datasource-provider/RestDataSourceProvider.js.map +1 -1
- package/esm/datasource-provider/VuuDataSourceProvider.js +2 -2
- package/esm/datasource-provider/VuuDataSourceProvider.js.map +1 -1
- package/esm/hooks/useSessionDataSource.js +2 -2
- package/esm/hooks/useSessionDataSource.js.map +1 -1
- package/esm/hooks/useTypeaheadSuggestions.js +2 -2
- package/esm/hooks/useTypeaheadSuggestions.js.map +1 -1
- package/esm/hooks/useVuuMenuActions.js +163 -16
- package/esm/hooks/useVuuMenuActions.js.map +1 -1
- package/esm/hooks/useVuuTables.js +2 -2
- package/esm/hooks/useVuuTables.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +16 -15
- package/types/hooks/useSessionDataSource.d.ts +1 -1
- package/types/hooks/useVuuMenuActions.d.ts +24 -8
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { type MenuActionHandler, type MenuBuilder } from "@vuu-ui/vuu-context-menu";
|
|
2
|
+
import { DataSource, DataSourceVisualLinkCreatedMessage, RpcResponseHandler } from "@vuu-ui/vuu-data-types";
|
|
3
|
+
import type { LinkDescriptorWithLabel, VuuDataRowDto, VuuMenu, VuuMenuItem, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
+
import { TableContextMenuOptions, TableMenuLocation } from "@vuu-ui/vuu-table";
|
|
5
|
+
import type { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
6
|
+
export interface VuuMenuActionHookResult {
|
|
7
|
+
menuBuilder: MenuBuilder<TableMenuLocation, TableContextMenuOptions>;
|
|
8
|
+
menuActionHandler: MenuActionHandler;
|
|
7
9
|
}
|
|
8
10
|
export interface MenuActionConfig {
|
|
9
11
|
vuuMenu?: VuuMenu;
|
|
@@ -20,9 +22,23 @@ export interface VuuMenuActionHookProps {
|
|
|
20
22
|
* actioned, even when no custom handling is intended. If the handler returns false,
|
|
21
23
|
* Vuu will process the menuItem.
|
|
22
24
|
*/
|
|
23
|
-
clientSideMenuActionHandler?:
|
|
25
|
+
clientSideMenuActionHandler?: MenuActionHandler;
|
|
24
26
|
dataSource?: DataSource;
|
|
25
27
|
menuActionConfig?: MenuActionConfig;
|
|
26
28
|
onRpcResponse?: RpcResponseHandler;
|
|
27
29
|
}
|
|
28
|
-
export
|
|
30
|
+
export interface VuuCellContextMenuItemOptions extends VuuMenuItem {
|
|
31
|
+
rowKey: string;
|
|
32
|
+
field: string;
|
|
33
|
+
value: VuuRowDataItemType;
|
|
34
|
+
}
|
|
35
|
+
export interface VuuRowContextMenuItemOptions extends VuuMenuItem {
|
|
36
|
+
rowKey: string;
|
|
37
|
+
row: VuuDataRowDto;
|
|
38
|
+
}
|
|
39
|
+
export interface VuuSelectedRowsContextMenuItemOptions extends VuuMenuItem {
|
|
40
|
+
columns: ColumnDescriptor[];
|
|
41
|
+
}
|
|
42
|
+
export declare const isRowMenu: (options: VuuMenuItem) => options is VuuRowContextMenuItemOptions;
|
|
43
|
+
export declare const isSelectionMenu: (options: VuuMenuItem) => options is VuuSelectedRowsContextMenuItemOptions;
|
|
44
|
+
export declare const useVuuMenuActions: ({ clientSideMenuActionHandler, dataSource, onRpcResponse, }: VuuMenuActionHookProps) => VuuMenuActionHookResult;
|