@vuu-ui/vuu-data-types 3.3.11 → 4.0.0-alpha.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/index.d.ts +64 -46
- 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,8 +229,7 @@ export interface MessageWithClientViewportId {
|
|
|
229
229
|
clientViewportId: string;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
export interface DataSourceAggregateMessage
|
|
233
|
-
extends MessageWithClientViewportId {
|
|
232
|
+
export interface DataSourceAggregateMessage extends MessageWithClientViewportId {
|
|
234
233
|
aggregations: VuuAggregation[];
|
|
235
234
|
type: "aggregate";
|
|
236
235
|
}
|
|
@@ -287,8 +286,7 @@ export interface DataSourceGroupByMessage extends MessageWithClientViewportId {
|
|
|
287
286
|
groupBy: VuuGroupBy | undefined;
|
|
288
287
|
}
|
|
289
288
|
|
|
290
|
-
export interface DataSourceSetConfigMessage
|
|
291
|
-
extends MessageWithClientViewportId {
|
|
289
|
+
export interface DataSourceSetConfigMessage extends MessageWithClientViewportId {
|
|
292
290
|
type: "config";
|
|
293
291
|
config: WithFullConfig;
|
|
294
292
|
}
|
|
@@ -307,14 +305,12 @@ export interface DataSourceSortMessage extends MessageWithClientViewportId {
|
|
|
307
305
|
sort: VuuSort;
|
|
308
306
|
}
|
|
309
307
|
|
|
310
|
-
export interface DataSourceSubscribeFailedMessage
|
|
311
|
-
extends MessageWithClientViewportId {
|
|
308
|
+
export interface DataSourceSubscribeFailedMessage extends MessageWithClientViewportId {
|
|
312
309
|
type: "subscribe-failed";
|
|
313
310
|
msg: string;
|
|
314
311
|
}
|
|
315
312
|
|
|
316
|
-
export interface DataSourceSubscribedMessage
|
|
317
|
-
extends MessageWithClientViewportId {
|
|
313
|
+
export interface DataSourceSubscribedMessage extends MessageWithClientViewportId {
|
|
318
314
|
aggregations: VuuAggregation[];
|
|
319
315
|
columns: VuuColumns;
|
|
320
316
|
filterSpec: DataSourceFilter;
|
|
@@ -325,21 +321,18 @@ export interface DataSourceSubscribedMessage
|
|
|
325
321
|
type: "subscribed";
|
|
326
322
|
}
|
|
327
323
|
|
|
328
|
-
export interface DataSourceVisualLinkCreatedMessage
|
|
329
|
-
extends MessageWithClientViewportId {
|
|
324
|
+
export interface DataSourceVisualLinkCreatedMessage extends MessageWithClientViewportId {
|
|
330
325
|
colName: string;
|
|
331
326
|
parentViewportId: string;
|
|
332
327
|
parentColName: string;
|
|
333
328
|
type: "vuu-link-created";
|
|
334
329
|
}
|
|
335
330
|
|
|
336
|
-
export interface DataSourceVisualLinkRemovedMessage
|
|
337
|
-
extends MessageWithClientViewportId {
|
|
331
|
+
export interface DataSourceVisualLinkRemovedMessage extends MessageWithClientViewportId {
|
|
338
332
|
type: "vuu-link-removed";
|
|
339
333
|
}
|
|
340
334
|
|
|
341
|
-
export interface DataSourceVisualLinksMessage
|
|
342
|
-
extends MessageWithClientViewportId {
|
|
335
|
+
export interface DataSourceVisualLinksMessage extends MessageWithClientViewportId {
|
|
343
336
|
type: "vuu-links";
|
|
344
337
|
links: VuuLinkDescriptor[];
|
|
345
338
|
}
|
|
@@ -413,7 +406,7 @@ export declare type TableSchemaTable = VuuTable & {
|
|
|
413
406
|
export declare type RangeLimits = {
|
|
414
407
|
maxRangeEnd: number;
|
|
415
408
|
maxRangeWidth: number;
|
|
416
|
-
}
|
|
409
|
+
}
|
|
417
410
|
|
|
418
411
|
export declare type TableSchema = {
|
|
419
412
|
columns: readonly SchemaColumn[];
|
|
@@ -448,8 +441,7 @@ export interface WithSort extends DataSourceConfig {
|
|
|
448
441
|
sort: VuuSort;
|
|
449
442
|
}
|
|
450
443
|
|
|
451
|
-
export interface DataSourceConstructorProps
|
|
452
|
-
extends WithBaseFilter<DataSourceConfig> {
|
|
444
|
+
export interface DataSourceConstructorProps extends WithBaseFilter<DataSourceConfig> {
|
|
453
445
|
/**
|
|
454
446
|
* If provided, these column names will always be included in subscription, even
|
|
455
447
|
* if not directly requested, via columns property. Useful where columns may not
|
|
@@ -458,6 +450,7 @@ export interface DataSourceConstructorProps
|
|
|
458
450
|
*/
|
|
459
451
|
autosubscribeColumns?: string[];
|
|
460
452
|
bufferSize?: number;
|
|
453
|
+
connectionId?: string;
|
|
461
454
|
/**
|
|
462
455
|
* For datasources that support edit sessions, some services support an additional
|
|
463
456
|
* column on session tables that will be used to return status information for a row
|
|
@@ -483,8 +476,9 @@ export interface RemoteModuleConnection {
|
|
|
483
476
|
websocketUrl?: string;
|
|
484
477
|
}
|
|
485
478
|
|
|
486
|
-
export interface DataSourceSubscribeProps
|
|
487
|
-
|
|
479
|
+
export interface DataSourceSubscribeProps extends Partial<
|
|
480
|
+
WithBaseFilter<WithFullConfig>
|
|
481
|
+
> {
|
|
488
482
|
viewport?: string;
|
|
489
483
|
range?: Range;
|
|
490
484
|
revealSelected?: boolean;
|
|
@@ -625,17 +619,16 @@ export declare type SessionDataSourceOverrides = {
|
|
|
625
619
|
table?: VuuTable;
|
|
626
620
|
};
|
|
627
621
|
|
|
628
|
-
export
|
|
629
|
-
wasInsertedRow?: boolean;
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
export interface DataSourceBase<
|
|
622
|
+
export interface EditApi<
|
|
633
623
|
T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
|
|
634
|
-
>
|
|
635
|
-
Partial<TypeaheadSuggestionProvider> {
|
|
624
|
+
> {
|
|
636
625
|
addRow?: (
|
|
637
626
|
rowData?: Record<string, VuuRowDataItemType>,
|
|
638
627
|
) => Promise<RpcResult> | undefined;
|
|
628
|
+
deleteRow?: (
|
|
629
|
+
key: string,
|
|
630
|
+
mode?: DeleteRowMode,
|
|
631
|
+
) => Promise<RpcResult> | undefined;
|
|
639
632
|
deleteSelectedRows?: (mode?: DeleteRowMode) => Promise<RpcResult> | undefined;
|
|
640
633
|
editCell?: (
|
|
641
634
|
rowKey: string,
|
|
@@ -663,6 +656,31 @@ export interface DataSourceBase<
|
|
|
663
656
|
saveChanges?: boolean,
|
|
664
657
|
force?: boolean,
|
|
665
658
|
) => 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> {
|
|
666
684
|
aggregations: VuuAggregation[];
|
|
667
685
|
closeTreeNode: (keyOrIndex: string | number, cascade?: boolean) => void;
|
|
668
686
|
columns: string[];
|
|
@@ -837,7 +855,7 @@ export interface ServerProxySubscribeMessage extends WithFullConfig {
|
|
|
837
855
|
// };
|
|
838
856
|
|
|
839
857
|
export declare type VuuUIMessageInConnected = {
|
|
840
|
-
sessionId: string;
|
|
858
|
+
loginResponse: VuuLoginSuccessResponse & { sessionId: string };
|
|
841
859
|
type: "connected";
|
|
842
860
|
};
|
|
843
861
|
|
|
@@ -1082,4 +1100,4 @@ export interface ServerAPI {
|
|
|
1082
1100
|
callback: PostMessageToClientCallback,
|
|
1083
1101
|
) => void;
|
|
1084
1102
|
unsubscribe: (viewport: string) => void;
|
|
1085
|
-
}
|
|
1103
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.1",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.1"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|