@vuu-ui/vuu-data-types 2.1.19-beta.3 → 2.1.19

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 +14 -10
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -594,11 +594,15 @@ export declare type StandaloneEditSessionMode =
594
594
  * `"inline-all-rows"` is a client-only concept and is NOT mapped — it passes
595
595
  * through to the RPC unchanged so the server can create an all-rows session table.
596
596
  */
597
- export declare type EditSessionModeAlias = "All" | "Empty" | "Selected";
597
+ export declare type CopyOption = "All" | "Empty" | "Selected";
598
+ /**
599
+ * @deprecated Prefer `CopyOption` ("All" | "Empty" | "Selected") for standalone
600
+ * edit sessions supported by vuu server. Long-form values (e.g. `"all-rows"`) are used
601
+ * by `beginEditSession`; new code should use `CopyOption` with `createSessionDataSource`.
602
+ */
598
603
  export declare type EditSessionMode =
599
604
  | InlineEditSessionMode
600
- | StandaloneEditSessionMode
601
- | EditSessionModeAlias;
605
+ | StandaloneEditSessionMode;
602
606
 
603
607
  export interface EditApi<
604
608
  T extends DataSourceRow | DataSourceRowWithBigint = DataSourceRow,
@@ -620,6 +624,13 @@ export interface EditApi<
620
624
  value: VuuRowDataItemType,
621
625
  ) => Promise<RpcResult> | undefined;
622
626
  undoRowChange?: (key: string) => Promise<RpcResult> | undefined;
627
+ /**
628
+ * Create a session datasource by requesting the server to create a session table
629
+ * via the `createSessionTable` RPC and wrapping the returned table.
630
+ */
631
+ createSessionDataSource?: (
632
+ copyOption: CopyOption,
633
+ ) => Promise<DataSource<T> | undefined>;
623
634
  endEditSession?: (
624
635
  saveChanges?: boolean,
625
636
  force?: boolean,
@@ -690,13 +701,6 @@ export interface DataSourceBase<
690
701
  resume?: (callback?: DataSourceSubscribeCallback) => void;
691
702
 
692
703
  deleteRow?: DataSourceDeleteHandler;
693
- /**
694
- * create a DataSource on a session table. The concrete DataSource implementation that
695
- * implements this method will always return a session table datasource of the same concrete type.
696
- * @param table the sessionTable (module and table name)
697
- * @returns
698
- */
699
- createSessionDataSource?: (table: VuuTable) => DataSource<T>;
700
704
  /**
701
705
  * For a dataSource that has been previously disabled and is currently in disabled state , this will restore
702
706
  * the subscription to active status. Fresh data will be dispatched to client. The enable call optionally
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "2.1.19-beta.3",
3
+ "version": "2.1.19",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "2.1.19-beta.3",
8
- "@vuu-ui/vuu-protocol-types": "2.1.19-beta.3"
7
+ "@vuu-ui/vuu-filter-types": "2.1.19",
8
+ "@vuu-ui/vuu-protocol-types": "2.1.19"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},