@vuu-ui/vuu-table-types 4.0.0-alpha.2 → 4.0.0-alpha.21
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/index.d.ts +27 -15
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -84,21 +84,11 @@ export interface EditEventState {
|
|
|
84
84
|
value: VuuRowDataItemType;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export interface DataCellEditEvent extends EditEventState {
|
|
88
|
-
columnName?: string;
|
|
89
|
-
dataRow?: DataRow;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export declare type DataCellEditNotification = (
|
|
93
|
-
editEvent: DataCellEditEvent,
|
|
94
|
-
) => void;
|
|
95
|
-
|
|
96
87
|
export interface TableCellProps {
|
|
97
88
|
className?: string;
|
|
98
89
|
column: RuntimeColumnDescriptor;
|
|
99
90
|
dataRow: DataRow;
|
|
100
91
|
onClick?: (event: MouseEvent, column: RuntimeColumnDescriptor) => void;
|
|
101
|
-
onDataEdited?: TableCellEditHandler;
|
|
102
92
|
searchPattern?: Lowercase<string>;
|
|
103
93
|
}
|
|
104
94
|
|
|
@@ -129,8 +119,7 @@ export declare type TableRowClickHandlerInternal = (
|
|
|
129
119
|
keepExistingSelection: boolean,
|
|
130
120
|
) => void;
|
|
131
121
|
|
|
132
|
-
export interface TableCellRendererProps
|
|
133
|
-
extends Omit<TableCellProps, "onDataEdited"> {
|
|
122
|
+
export interface TableCellRendererProps extends TableCellProps {
|
|
134
123
|
/**
|
|
135
124
|
* has the value of this edit control been changed during the current edit session.
|
|
136
125
|
* This can go from true to false if control is edited to revert a previous change
|
|
@@ -199,12 +188,32 @@ export type RoundingRule = "truncate" | "round";
|
|
|
199
188
|
export declare type ColumnTypeFormatting = {
|
|
200
189
|
alignOnDecimals?: boolean;
|
|
201
190
|
decimals?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Temporal values only. Number of sub-second digits to display when the
|
|
193
|
+
* pattern includes a time component. Defaults to 0 for millisecond
|
|
194
|
+
* timestamps (3 if the legacy 'hh:mm:ss.ms' pattern is used) and to 9
|
|
195
|
+
* for nanosecond timestamps.
|
|
196
|
+
*/
|
|
197
|
+
fractionalSecondDigits?: FractionalSecondDigits;
|
|
198
|
+
/**
|
|
199
|
+
* Temporal values only. Overrides the locale implied by the date pattern.
|
|
200
|
+
* The pattern then determines the style of each field (numeric, short or
|
|
201
|
+
* long month name), the locale determines field order and language.
|
|
202
|
+
*/
|
|
203
|
+
locale?: string;
|
|
202
204
|
roundingRule?: RoundingRule;
|
|
203
205
|
pattern?: DateTimePattern;
|
|
206
|
+
/**
|
|
207
|
+
* Temporal values only. Time zone used to display (and edit/filter) the
|
|
208
|
+
* value. 'local' (the default) or 'UTC' or any IANA time zone id.
|
|
209
|
+
*/
|
|
210
|
+
timeZone?: string;
|
|
204
211
|
useLocaleString?: boolean;
|
|
205
212
|
zeroPad?: boolean;
|
|
206
213
|
};
|
|
207
214
|
|
|
215
|
+
export declare type FractionalSecondDigits = 0 | 3 | 6 | 9;
|
|
216
|
+
|
|
208
217
|
export declare type ColumnTypeValueMap = { [key: string]: string };
|
|
209
218
|
|
|
210
219
|
export declare type ListOption = {
|
|
@@ -278,6 +287,8 @@ export declare type PinLocation = "left" | "right";
|
|
|
278
287
|
|
|
279
288
|
export declare type ColumnAlignment = "left" | "right";
|
|
280
289
|
|
|
290
|
+
export type RowAccessor = Record<string, unknown>;
|
|
291
|
+
|
|
281
292
|
/** This is a public description of a Column, defining all the
|
|
282
293
|
* column attributes that can be defined by client. */
|
|
283
294
|
export interface ColumnDescriptor extends DataValueDescriptor {
|
|
@@ -299,8 +310,10 @@ export interface ColumnDescriptor extends DataValueDescriptor {
|
|
|
299
310
|
*/
|
|
300
311
|
colHeaderContentRenderer?: string;
|
|
301
312
|
colHeaderLabelRenderer?: string;
|
|
302
|
-
/**
|
|
303
|
-
|
|
313
|
+
/** Whether this column should be included in file/CSV exports. Defaults to true. */
|
|
314
|
+
exportable?: boolean;
|
|
315
|
+
/** Formats a raw value for CSV export; optionally receives row context. Return value is still CSV-escaped. */
|
|
316
|
+
exportFormatter?: (value: unknown, row: RowAccessor) => string;
|
|
304
317
|
flex?: number;
|
|
305
318
|
/**
|
|
306
319
|
* Only used when the column is included in a grouby clause.
|
|
@@ -551,7 +564,6 @@ export interface RowProps extends BaseRowProps {
|
|
|
551
564
|
offset: number;
|
|
552
565
|
onCellEdit?: CellEditHandler;
|
|
553
566
|
onClick?: TableRowClickHandlerInternal;
|
|
554
|
-
onDataEdited?: TableCellEditHandler;
|
|
555
567
|
onToggleGroup?: (row: DataSourceRow, column: RuntimeColumnDescriptor) => void;
|
|
556
568
|
searchPattern: Lowercase<string>;
|
|
557
569
|
showBookends?: boolean;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-table-types",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.21",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"@vuu-ui/vuu-data-types": "4.0.0-alpha.
|
|
6
|
-
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.
|
|
7
|
-
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.
|
|
5
|
+
"@vuu-ui/vuu-data-types": "4.0.0-alpha.21",
|
|
6
|
+
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.21",
|
|
7
|
+
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.21"
|
|
8
8
|
},
|
|
9
9
|
"author": "heswell",
|
|
10
10
|
"license": "Apache-2.0",
|