@vuu-ui/vuu-data-types 2.1.15 → 2.1.17

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 +31 -10
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -303,6 +303,12 @@ export interface DataSourceSortMessage extends MessageWithClientViewportId {
303
303
  sort: VuuSort;
304
304
  }
305
305
 
306
+ export interface DataSourceSubscribeFailedMessage
307
+ extends MessageWithClientViewportId {
308
+ type: "subscribe-failed";
309
+ msg: string;
310
+ }
311
+
306
312
  export interface DataSourceSubscribedMessage
307
313
  extends MessageWithClientViewportId {
308
314
  aggregations: VuuAggregation[];
@@ -361,6 +367,7 @@ export declare type DataSourceCallbackMessage =
361
367
  | DataSourceUnfrozenMessage
362
368
  | DataSourceMenusMessage
363
369
  | DataSourceSubscribedMessage
370
+ | DataSourceSubscribeFailedMessage
364
371
  | DataSourceVisualLinkCreatedMessage
365
372
  | DataSourceVisualLinkRemovedMessage
366
373
  | DataSourceVisualLinksMessage
@@ -437,6 +444,12 @@ export interface DataSourceConstructorProps
437
444
  */
438
445
  autosubscribeColumns?: string[];
439
446
  bufferSize?: number;
447
+ /**
448
+ * For datasources that support edit sessions, some services support an additional
449
+ * column on session tables that will be used to return status information for a row
450
+ * after an edit session is saved. Default is no additional column.
451
+ */
452
+ sessionTableMessageColumn?: string;
440
453
  suspenseProps?: DataSourceSuspenseProps;
441
454
  table: VuuTable;
442
455
  title?: string;
@@ -463,27 +476,30 @@ export declare type RowSelectionEventHandler = (
463
476
  selectedRowCount: number,
464
477
  ) => void;
465
478
 
466
- export type DataSourceConfigChangeHandler = (
479
+ export declare type DataSourceConfigChangeHandler = (
467
480
  config: ConfigWithVisualLink,
468
481
  range: Range,
469
482
  confirmed?: boolean,
470
483
  configChanges?: DataSourceConfigChanges,
471
484
  ) => void;
472
485
 
486
+ export declare type RemoteUpdateHandler = (rows: DataSourceRow[]) => void;
487
+
473
488
  export declare type DataSourceEvents = {
474
489
  config: DataSourceConfigChangeHandler;
490
+ disabled: DataSourceEventHandler;
491
+ enabled: DataSourceEventHandler;
475
492
  freeze: (isFrozen: boolean, freezeTimeStamp: number) => void;
476
493
  optimize: (optimize: OptimizeStrategy) => void;
477
494
  "page-count": (pageCount: number) => void;
478
495
  range: (range: Range) => void;
479
496
  resize: (size: number) => void;
497
+ resumed: DataSourceEventHandler;
498
+ "remote-update-during-local-edit": RemoteUpdateHandler;
480
499
  "row-selection": RowSelectionEventHandler;
481
500
  subscribed: (subscription: DataSourceSubscribedMessage) => void;
482
501
  unsubscribed: DataSourceEventHandler;
483
502
  suspended: DataSourceEventHandler;
484
- resumed: DataSourceEventHandler;
485
- disabled: DataSourceEventHandler;
486
- enabled: DataSourceEventHandler;
487
503
  "title-changed": (id: string, title: string) => void;
488
504
  "visual-link-created": (message: DataSourceVisualLinkCreatedMessage) => void;
489
505
  "visual-link-removed": () => void;
@@ -528,7 +544,7 @@ export declare type DataSourceStatus =
528
544
  export declare type SuggestionFetcher = (
529
545
  params: TypeaheadParams,
530
546
  ) => Promise<string[] | false>;
531
- export type SuggestionProvider = () => SuggestionFetcher;
547
+ export declare type SuggestionProvider = () => SuggestionFetcher;
532
548
 
533
549
  export interface TypeaheadSuggestionProvider {
534
550
  getTypeaheadSuggestions: (
@@ -550,16 +566,18 @@ export declare type DataSourceSuspenseProps = {
550
566
  * An inline edit session allows user to apply edits directly to
551
567
  * the existing component. e.g. directly edit cells within a table.
552
568
  */
553
- export type InlineEditSessionMode = "inline-all-rows";
569
+ export declare type InlineEditSessionMode = "inline-all-rows";
554
570
  /**
555
571
  * A standalone edit session re-renders editable data in an edit component.
556
572
  * e.g an edit panel may be displayed in a dialog.
557
573
  */
558
- export type StandaloneEditSessionMode =
574
+ export declare type StandaloneEditSessionMode =
559
575
  | "selected-rows"
560
576
  | "all-rows"
561
577
  | "empty-session-table";
562
- export type EditSessionMode = InlineEditSessionMode | StandaloneEditSessionMode;
578
+ export declare type EditSessionMode =
579
+ | InlineEditSessionMode
580
+ | StandaloneEditSessionMode;
563
581
 
564
582
  export interface EditApi {
565
583
  beginEditSession?: (
@@ -570,7 +588,10 @@ export interface EditApi {
570
588
  colun: string,
571
589
  value: VuuRowDataItemType,
572
590
  ) => Promise<RpcResult> | undefined;
573
- endEditSession?: (saveChanges?: boolean) => Promise<RpcResult> | undefined;
591
+ endEditSession?: (
592
+ saveChanges?: boolean,
593
+ force?: boolean,
594
+ ) => Promise<RpcResult> | undefined;
574
595
  }
575
596
 
576
597
  export interface DataSource
@@ -962,7 +983,7 @@ export declare type VuuUIMessageOut =
962
983
  | WithRequestId<VuuTableListRequest | VuuTableMetaRequest>
963
984
  | SelectRequest;
964
985
 
965
- export type ConnectOptions = {
986
+ export declare type ConnectOptions = {
966
987
  url: string;
967
988
  token: string;
968
989
  protocol?: WebSocketProtocol;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "2.1.15",
3
+ "version": "2.1.17",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "2.1.15",
8
- "@vuu-ui/vuu-protocol-types": "2.1.15"
7
+ "@vuu-ui/vuu-filter-types": "2.1.17",
8
+ "@vuu-ui/vuu-protocol-types": "2.1.17"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},