@vuu-ui/vuu-data-types 4.0.0-alpha.1 → 4.0.0-alpha.2
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 +45 -62
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -124,8 +124,8 @@ export declare type DecimalValueTypeSimple = "decimal" | "scaleddecimal";
|
|
|
124
124
|
export declare type DateTimeDataValueType =
|
|
125
125
|
| DateTimeColumnTypeSimple
|
|
126
126
|
| (Omit<DataValueTypeDescriptor, "name"> & {
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
name: DateTimeColumnTypeSimple;
|
|
128
|
+
});
|
|
129
129
|
|
|
130
130
|
export declare type BulkEdit = "bulk" | false | "read-only";
|
|
131
131
|
|
|
@@ -136,9 +136,9 @@ export declare type BulkEdit = "bulk" | false | "read-only";
|
|
|
136
136
|
export declare type DataEditable =
|
|
137
137
|
| boolean
|
|
138
138
|
| {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
insert: boolean;
|
|
140
|
+
update: boolean;
|
|
141
|
+
};
|
|
142
142
|
|
|
143
143
|
export interface DataValueDescriptor {
|
|
144
144
|
editable?: DataEditable;
|
|
@@ -153,7 +153,7 @@ export interface DataValueDescriptor {
|
|
|
153
153
|
label?: string;
|
|
154
154
|
/** unique name for this data value */
|
|
155
155
|
name: string;
|
|
156
|
-
|
|
156
|
+
/** Whether the field is required or can be empty/nullable */
|
|
157
157
|
required?: boolean;
|
|
158
158
|
/** The type defined on server for this data value */
|
|
159
159
|
serverDataType?: VuuColumnDataType;
|
|
@@ -198,18 +198,18 @@ type IsNew = boolean;
|
|
|
198
198
|
export declare type DataSourceRow<
|
|
199
199
|
T extends bigint | VuuRowDataItemType = VuuRowDataItemType,
|
|
200
200
|
> = [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
201
|
+
RowIndex,
|
|
202
|
+
RenderKey,
|
|
203
|
+
IsLeaf,
|
|
204
|
+
IsExpanded,
|
|
205
|
+
Depth,
|
|
206
|
+
ChildCount,
|
|
207
|
+
RowKey,
|
|
208
|
+
IsSelected,
|
|
209
|
+
Timestamp,
|
|
210
|
+
IsNew,
|
|
211
|
+
...T[],
|
|
212
|
+
];
|
|
213
213
|
|
|
214
214
|
export declare type DataSourceRowWithBigint = DataSourceRow<
|
|
215
215
|
bigint | VuuRowDataItemType
|
|
@@ -229,7 +229,8 @@ export interface MessageWithClientViewportId {
|
|
|
229
229
|
clientViewportId: string;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
export interface DataSourceAggregateMessage
|
|
232
|
+
export interface DataSourceAggregateMessage
|
|
233
|
+
extends MessageWithClientViewportId {
|
|
233
234
|
aggregations: VuuAggregation[];
|
|
234
235
|
type: "aggregate";
|
|
235
236
|
}
|
|
@@ -286,7 +287,8 @@ export interface DataSourceGroupByMessage extends MessageWithClientViewportId {
|
|
|
286
287
|
groupBy: VuuGroupBy | undefined;
|
|
287
288
|
}
|
|
288
289
|
|
|
289
|
-
export interface DataSourceSetConfigMessage
|
|
290
|
+
export interface DataSourceSetConfigMessage
|
|
291
|
+
extends MessageWithClientViewportId {
|
|
290
292
|
type: "config";
|
|
291
293
|
config: WithFullConfig;
|
|
292
294
|
}
|
|
@@ -305,12 +307,14 @@ export interface DataSourceSortMessage extends MessageWithClientViewportId {
|
|
|
305
307
|
sort: VuuSort;
|
|
306
308
|
}
|
|
307
309
|
|
|
308
|
-
export interface DataSourceSubscribeFailedMessage
|
|
310
|
+
export interface DataSourceSubscribeFailedMessage
|
|
311
|
+
extends MessageWithClientViewportId {
|
|
309
312
|
type: "subscribe-failed";
|
|
310
313
|
msg: string;
|
|
311
314
|
}
|
|
312
315
|
|
|
313
|
-
export interface DataSourceSubscribedMessage
|
|
316
|
+
export interface DataSourceSubscribedMessage
|
|
317
|
+
extends MessageWithClientViewportId {
|
|
314
318
|
aggregations: VuuAggregation[];
|
|
315
319
|
columns: VuuColumns;
|
|
316
320
|
filterSpec: DataSourceFilter;
|
|
@@ -321,18 +325,21 @@ export interface DataSourceSubscribedMessage extends MessageWithClientViewportId
|
|
|
321
325
|
type: "subscribed";
|
|
322
326
|
}
|
|
323
327
|
|
|
324
|
-
export interface DataSourceVisualLinkCreatedMessage
|
|
328
|
+
export interface DataSourceVisualLinkCreatedMessage
|
|
329
|
+
extends MessageWithClientViewportId {
|
|
325
330
|
colName: string;
|
|
326
331
|
parentViewportId: string;
|
|
327
332
|
parentColName: string;
|
|
328
333
|
type: "vuu-link-created";
|
|
329
334
|
}
|
|
330
335
|
|
|
331
|
-
export interface DataSourceVisualLinkRemovedMessage
|
|
336
|
+
export interface DataSourceVisualLinkRemovedMessage
|
|
337
|
+
extends MessageWithClientViewportId {
|
|
332
338
|
type: "vuu-link-removed";
|
|
333
339
|
}
|
|
334
340
|
|
|
335
|
-
export interface DataSourceVisualLinksMessage
|
|
341
|
+
export interface DataSourceVisualLinksMessage
|
|
342
|
+
extends MessageWithClientViewportId {
|
|
336
343
|
type: "vuu-links";
|
|
337
344
|
links: VuuLinkDescriptor[];
|
|
338
345
|
}
|
|
@@ -406,7 +413,7 @@ export declare type TableSchemaTable = VuuTable & {
|
|
|
406
413
|
export declare type RangeLimits = {
|
|
407
414
|
maxRangeEnd: number;
|
|
408
415
|
maxRangeWidth: number;
|
|
409
|
-
}
|
|
416
|
+
};
|
|
410
417
|
|
|
411
418
|
export declare type TableSchema = {
|
|
412
419
|
columns: readonly SchemaColumn[];
|
|
@@ -441,7 +448,8 @@ export interface WithSort extends DataSourceConfig {
|
|
|
441
448
|
sort: VuuSort;
|
|
442
449
|
}
|
|
443
450
|
|
|
444
|
-
export interface DataSourceConstructorProps
|
|
451
|
+
export interface DataSourceConstructorProps
|
|
452
|
+
extends WithBaseFilter<DataSourceConfig> {
|
|
445
453
|
/**
|
|
446
454
|
* If provided, these column names will always be included in subscription, even
|
|
447
455
|
* if not directly requested, via columns property. Useful where columns may not
|
|
@@ -476,9 +484,8 @@ export interface RemoteModuleConnection {
|
|
|
476
484
|
websocketUrl?: string;
|
|
477
485
|
}
|
|
478
486
|
|
|
479
|
-
export interface DataSourceSubscribeProps
|
|
480
|
-
WithBaseFilter<WithFullConfig
|
|
481
|
-
> {
|
|
487
|
+
export interface DataSourceSubscribeProps
|
|
488
|
+
extends Partial<WithBaseFilter<WithFullConfig>> {
|
|
482
489
|
viewport?: string;
|
|
483
490
|
range?: Range;
|
|
484
491
|
revealSelected?: boolean;
|
|
@@ -619,16 +626,17 @@ export declare type SessionDataSourceOverrides = {
|
|
|
619
626
|
table?: VuuTable;
|
|
620
627
|
};
|
|
621
628
|
|
|
622
|
-
export
|
|
629
|
+
export declare type UndoRowChangeResult = {
|
|
630
|
+
wasInsertedRow?: boolean;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
export interface DataSourceBase<
|
|
623
634
|
T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
|
|
624
|
-
>
|
|
635
|
+
> extends IEventEmitter<DataSourceEvents>,
|
|
636
|
+
Partial<TypeaheadSuggestionProvider> {
|
|
625
637
|
addRow?: (
|
|
626
638
|
rowData?: Record<string, VuuRowDataItemType>,
|
|
627
639
|
) => Promise<RpcResult> | undefined;
|
|
628
|
-
deleteRow?: (
|
|
629
|
-
key: string,
|
|
630
|
-
mode?: DeleteRowMode,
|
|
631
|
-
) => Promise<RpcResult> | undefined;
|
|
632
640
|
deleteSelectedRows?: (mode?: DeleteRowMode) => Promise<RpcResult> | undefined;
|
|
633
641
|
editCell?: (
|
|
634
642
|
rowKey: string,
|
|
@@ -656,31 +664,6 @@ export interface EditApi<
|
|
|
656
664
|
saveChanges?: boolean,
|
|
657
665
|
force?: boolean,
|
|
658
666
|
) => Promise<RpcResult> | undefined;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Data payload returned in RpcResultSuccess.data by the beginEditSession service.
|
|
663
|
-
* Contains the server-assigned session table reference used to create the session datasource.
|
|
664
|
-
*/
|
|
665
|
-
export declare type BeginEditSessionResult = {
|
|
666
|
-
table: VuuTable;
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
export declare type DeleteSelectedRowsResult = {
|
|
670
|
-
deletedKeys: string[];
|
|
671
|
-
};
|
|
672
|
-
|
|
673
|
-
export declare type UndoRowChangeResult = {
|
|
674
|
-
wasInsertedRow?: boolean;
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
export interface DataSourceBase<
|
|
678
|
-
T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
|
|
679
|
-
>
|
|
680
|
-
extends
|
|
681
|
-
EditApi<T>,
|
|
682
|
-
IEventEmitter<DataSourceEvents>,
|
|
683
|
-
Partial<TypeaheadSuggestionProvider> {
|
|
684
667
|
aggregations: VuuAggregation[];
|
|
685
668
|
closeTreeNode: (keyOrIndex: string | number, cascade?: boolean) => void;
|
|
686
669
|
columns: string[];
|
|
@@ -1100,4 +1083,4 @@ export interface ServerAPI {
|
|
|
1100
1083
|
callback: PostMessageToClientCallback,
|
|
1101
1084
|
) => void;
|
|
1102
1085
|
unsubscribe: (viewport: string) => void;
|
|
1103
|
-
}
|
|
1086
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-types",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.2",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.2",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.2"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|