@vuu-ui/vuu-table-types 0.13.106 → 0.13.108

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.
Files changed (2) hide show
  1. package/index.d.ts +10 -10
  2. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import type {
8
8
  } from "@vuu-ui/vuu-data-types";
9
9
  import type { Filter } from "@vuu-ui/vuu-filter-types";
10
10
  import type {
11
+ RpcResult,
11
12
  SelectRequest,
12
13
  VuuAggType,
13
14
  VuuRowDataItemType,
@@ -51,16 +52,17 @@ export declare type ValueFormatter<T extends string | ReactElement = string> = (
51
52
  ) => T;
52
53
 
53
54
  export interface EditEventState {
55
+ columnName?: string;
54
56
  editType?: EditType;
55
57
  isValid?: boolean;
56
- // value: unknown;
57
58
  previousValue?: VuuRowDataItemType;
59
+ row?: DataSourceRow;
58
60
  value: VuuRowDataItemType;
59
61
  }
60
62
 
61
63
  export interface DataCellEditEvent extends EditEventState {
62
- row: DataSourceRow;
63
- columnName: string;
64
+ row?: DataSourceRow;
65
+ columnName?: string;
64
66
  }
65
67
 
66
68
  export declare type DataCellEditNotification = (
@@ -72,19 +74,17 @@ export interface TableCellProps {
72
74
  column: RuntimeColumnDescriptor;
73
75
  columnMap: ColumnMap;
74
76
  onClick?: (event: MouseEvent, column: RuntimeColumnDescriptor) => void;
75
- onDataEdited?: DataCellEditHandler;
77
+ onDataEdited?: TableCellEditHandler;
76
78
  row: DataSourceRow;
77
79
  searchPattern?: Lowercase<string>;
78
80
  }
79
81
 
80
- export declare type CommitResponse = Promise<true | string>;
81
-
82
82
  export declare type EditType = "commit" | "change" | "cancel";
83
83
 
84
- declare type DataItemEditHandler<T extends EditType = EditType> = (
84
+ export declare type TableCellEditHandler<T extends EditType = EditType> = (
85
85
  editState: EditEventState,
86
86
  editPhase: T,
87
- ) => T extends "commit" ? Promise<string | true> : void;
87
+ ) => T extends "commit" ? Promise<RpcResult | undefined> : undefined;
88
88
 
89
89
  export declare type TableRowSelectHandler = (
90
90
  row: DataSourceRowObject | null,
@@ -110,7 +110,7 @@ export declare type TableRowClickHandlerInternal = (
110
110
 
111
111
  export interface TableCellRendererProps
112
112
  extends Omit<TableCellProps, "onDataEdited"> {
113
- onEdit?: DataItemEditHandler;
113
+ onEdit?: TableCellEditHandler;
114
114
  }
115
115
 
116
116
  /**
@@ -467,7 +467,7 @@ export interface RowProps extends BaseRowProps {
467
467
  offset: number;
468
468
  onCellEdit?: CellEditHandler;
469
469
  onClick?: TableRowClickHandlerInternal;
470
- onDataEdited?: DataCellEditHandler;
470
+ onDataEdited?: TableCellEditHandler;
471
471
  onToggleGroup?: (row: DataSourceRow, column: RuntimeColumnDescriptor) => void;
472
472
  row: DataSourceRow;
473
473
  searchPattern: Lowercase<string>;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-table-types",
3
- "version": "0.13.106",
3
+ "version": "0.13.108",
4
4
  "devDependencies": {
5
- "@vuu-ui/vuu-data-types": "0.13.106",
6
- "@vuu-ui/vuu-filter-types": "0.13.106",
7
- "@vuu-ui/vuu-protocol-types": "0.13.106"
5
+ "@vuu-ui/vuu-data-types": "0.13.108",
6
+ "@vuu-ui/vuu-filter-types": "0.13.108",
7
+ "@vuu-ui/vuu-protocol-types": "0.13.108"
8
8
  },
9
9
  "author": "heswell",
10
10
  "license": "Apache-2.0",