@vuu-ui/vuu-data-types 4.0.0-alpha.1 → 4.0.0-alpha.11
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 +47 -63
- 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
|
}
|
|
@@ -387,8 +394,9 @@ export declare type ConfigChangeMessage =
|
|
|
387
394
|
export declare type ConfigChangeHandler = (msg: ConfigChangeMessage) => void;
|
|
388
395
|
|
|
389
396
|
export declare type SchemaColumn = {
|
|
390
|
-
editable?:
|
|
397
|
+
editable?: DataEditable;
|
|
391
398
|
name: string;
|
|
399
|
+
required?: boolean;
|
|
392
400
|
serverDataType: VuuColumnDataType;
|
|
393
401
|
};
|
|
394
402
|
|
|
@@ -406,7 +414,7 @@ export declare type TableSchemaTable = VuuTable & {
|
|
|
406
414
|
export declare type RangeLimits = {
|
|
407
415
|
maxRangeEnd: number;
|
|
408
416
|
maxRangeWidth: number;
|
|
409
|
-
}
|
|
417
|
+
};
|
|
410
418
|
|
|
411
419
|
export declare type TableSchema = {
|
|
412
420
|
columns: readonly SchemaColumn[];
|
|
@@ -441,7 +449,8 @@ export interface WithSort extends DataSourceConfig {
|
|
|
441
449
|
sort: VuuSort;
|
|
442
450
|
}
|
|
443
451
|
|
|
444
|
-
export interface DataSourceConstructorProps
|
|
452
|
+
export interface DataSourceConstructorProps
|
|
453
|
+
extends WithBaseFilter<DataSourceConfig> {
|
|
445
454
|
/**
|
|
446
455
|
* If provided, these column names will always be included in subscription, even
|
|
447
456
|
* if not directly requested, via columns property. Useful where columns may not
|
|
@@ -476,9 +485,8 @@ export interface RemoteModuleConnection {
|
|
|
476
485
|
websocketUrl?: string;
|
|
477
486
|
}
|
|
478
487
|
|
|
479
|
-
export interface DataSourceSubscribeProps
|
|
480
|
-
WithBaseFilter<WithFullConfig
|
|
481
|
-
> {
|
|
488
|
+
export interface DataSourceSubscribeProps
|
|
489
|
+
extends Partial<WithBaseFilter<WithFullConfig>> {
|
|
482
490
|
viewport?: string;
|
|
483
491
|
range?: Range;
|
|
484
492
|
revealSelected?: boolean;
|
|
@@ -619,16 +627,17 @@ export declare type SessionDataSourceOverrides = {
|
|
|
619
627
|
table?: VuuTable;
|
|
620
628
|
};
|
|
621
629
|
|
|
622
|
-
export
|
|
630
|
+
export declare type UndoRowChangeResult = {
|
|
631
|
+
wasInsertedRow?: boolean;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
export interface DataSourceBase<
|
|
623
635
|
T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
|
|
624
|
-
>
|
|
636
|
+
> extends IEventEmitter<DataSourceEvents>,
|
|
637
|
+
Partial<TypeaheadSuggestionProvider> {
|
|
625
638
|
addRow?: (
|
|
626
639
|
rowData?: Record<string, VuuRowDataItemType>,
|
|
627
640
|
) => Promise<RpcResult> | undefined;
|
|
628
|
-
deleteRow?: (
|
|
629
|
-
key: string,
|
|
630
|
-
mode?: DeleteRowMode,
|
|
631
|
-
) => Promise<RpcResult> | undefined;
|
|
632
641
|
deleteSelectedRows?: (mode?: DeleteRowMode) => Promise<RpcResult> | undefined;
|
|
633
642
|
editCell?: (
|
|
634
643
|
rowKey: string,
|
|
@@ -656,31 +665,6 @@ export interface EditApi<
|
|
|
656
665
|
saveChanges?: boolean,
|
|
657
666
|
force?: boolean,
|
|
658
667
|
) => 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
668
|
aggregations: VuuAggregation[];
|
|
685
669
|
closeTreeNode: (keyOrIndex: string | number, cascade?: boolean) => void;
|
|
686
670
|
columns: string[];
|
|
@@ -1100,4 +1084,4 @@ export interface ServerAPI {
|
|
|
1100
1084
|
callback: PostMessageToClientCallback,
|
|
1101
1085
|
) => void;
|
|
1102
1086
|
unsubscribe: (viewport: string) => void;
|
|
1103
|
-
}
|
|
1087
|
+
}
|
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.11",
|
|
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.11",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.11"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|