@vuu-ui/vuu-data-types 3.3.7 → 3.3.9

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 +45 -62
  2. 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
- name: DateTimeColumnTypeSimple;
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
- insert: boolean;
140
- update: boolean;
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
- /** Whether the field is required or can be empty/nullable */
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
- RowIndex,
202
- RenderKey,
203
- IsLeaf,
204
- IsExpanded,
205
- Depth,
206
- ChildCount,
207
- RowKey,
208
- IsSelected,
209
- Timestamp,
210
- IsNew,
211
- ...T[],
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 extends MessageWithClientViewportId {
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 extends MessageWithClientViewportId {
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 extends MessageWithClientViewportId {
310
+ export interface DataSourceSubscribeFailedMessage
311
+ extends MessageWithClientViewportId {
309
312
  type: "subscribe-failed";
310
313
  msg: string;
311
314
  }
312
315
 
313
- export interface DataSourceSubscribedMessage extends MessageWithClientViewportId {
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 extends MessageWithClientViewportId {
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 extends MessageWithClientViewportId {
336
+ export interface DataSourceVisualLinkRemovedMessage
337
+ extends MessageWithClientViewportId {
332
338
  type: "vuu-link-removed";
333
339
  }
334
340
 
335
- export interface DataSourceVisualLinksMessage extends MessageWithClientViewportId {
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 extends WithBaseFilter<DataSourceConfig> {
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
@@ -475,9 +483,8 @@ export interface RemoteModuleConnection {
475
483
  websocketUrl?: string;
476
484
  }
477
485
 
478
- export interface DataSourceSubscribeProps extends Partial<
479
- WithBaseFilter<WithFullConfig>
480
- > {
486
+ export interface DataSourceSubscribeProps
487
+ extends Partial<WithBaseFilter<WithFullConfig>> {
481
488
  viewport?: string;
482
489
  range?: Range;
483
490
  revealSelected?: boolean;
@@ -618,16 +625,17 @@ export declare type SessionDataSourceOverrides = {
618
625
  table?: VuuTable;
619
626
  };
620
627
 
621
- export interface EditApi<
628
+ export declare type UndoRowChangeResult = {
629
+ wasInsertedRow?: boolean;
630
+ };
631
+
632
+ export interface DataSourceBase<
622
633
  T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
623
- > {
634
+ > extends IEventEmitter<DataSourceEvents>,
635
+ Partial<TypeaheadSuggestionProvider> {
624
636
  addRow?: (
625
637
  rowData?: Record<string, VuuRowDataItemType>,
626
638
  ) => Promise<RpcResult> | undefined;
627
- deleteRow?: (
628
- key: string,
629
- mode?: DeleteRowMode,
630
- ) => Promise<RpcResult> | undefined;
631
639
  deleteSelectedRows?: (mode?: DeleteRowMode) => Promise<RpcResult> | undefined;
632
640
  editCell?: (
633
641
  rowKey: string,
@@ -655,31 +663,6 @@ export interface EditApi<
655
663
  saveChanges?: boolean,
656
664
  force?: boolean,
657
665
  ) => Promise<RpcResult> | undefined;
658
- }
659
-
660
- /**
661
- * Data payload returned in RpcResultSuccess.data by the beginEditSession service.
662
- * Contains the server-assigned session table reference used to create the session datasource.
663
- */
664
- export declare type BeginEditSessionResult = {
665
- table: VuuTable;
666
- };
667
-
668
- export declare type DeleteSelectedRowsResult = {
669
- deletedKeys: string[];
670
- };
671
-
672
- export declare type UndoRowChangeResult = {
673
- wasInsertedRow?: boolean;
674
- };
675
-
676
- export interface DataSourceBase<
677
- T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
678
- >
679
- extends
680
- EditApi<T>,
681
- IEventEmitter<DataSourceEvents>,
682
- Partial<TypeaheadSuggestionProvider> {
683
666
  aggregations: VuuAggregation[];
684
667
  closeTreeNode: (keyOrIndex: string | number, cascade?: boolean) => void;
685
668
  columns: string[];
@@ -1099,4 +1082,4 @@ export interface ServerAPI {
1099
1082
  callback: PostMessageToClientCallback,
1100
1083
  ) => void;
1101
1084
  unsubscribe: (viewport: string) => void;
1102
- }
1085
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "3.3.7",
8
- "@vuu-ui/vuu-protocol-types": "3.3.7"
7
+ "@vuu-ui/vuu-filter-types": "3.3.9",
8
+ "@vuu-ui/vuu-protocol-types": "3.3.9"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},