@vuu-ui/vuu-data-test 3.5.3 → 3.5.5

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.5.3",
2
+ "version": "3.5.5",
3
3
  "main": "./src/index.js",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
@@ -9,13 +9,13 @@
9
9
  "type-defs": "node ../../scripts/build-type-defs.mjs"
10
10
  },
11
11
  "dependencies": {
12
- "@vuu-ui/vuu-data-local": "3.5.3",
13
- "@vuu-ui/vuu-utils": "3.5.3"
12
+ "@vuu-ui/vuu-data-local": "3.5.5",
13
+ "@vuu-ui/vuu-utils": "3.5.5"
14
14
  },
15
15
  "devDependencies": {
16
- "@vuu-ui/vuu-protocol-types": "3.5.3",
17
- "@vuu-ui/vuu-data-types": "3.5.3",
18
- "@vuu-ui/vuu-table-types": "3.5.3"
16
+ "@vuu-ui/vuu-protocol-types": "3.5.5",
17
+ "@vuu-ui/vuu-data-types": "3.5.5",
18
+ "@vuu-ui/vuu-table-types": "3.5.5"
19
19
  },
20
20
  "sideEffects": false,
21
21
  "files": [
@@ -181,14 +181,19 @@ class TickingArrayDataSource extends ArrayDataSource {
181
181
  get columns() {
182
182
  return super.columns;
183
183
  }
184
- async endEditSession(saveChanges = false) {
184
+ async endEditSession(saveChanges = false, force = false) {
185
+ if ("unsubscribed" === this.status || !this.viewport) {
186
+ if (!saveChanges) return;
187
+ throw Error("Cannot save changes: datasource is unsubscribed");
188
+ }
185
189
  const type = "RPC_REQUEST";
186
190
  const rpcName = "endEditSession";
187
191
  const rpcResponse = await this.rpcRequest(saveChanges ? {
188
192
  type,
189
193
  rpcName,
190
194
  params: {
191
- save: true
195
+ save: true,
196
+ force
192
197
  }
193
198
  } : {
194
199
  type,
@@ -469,7 +469,9 @@ class VuuModule {
469
469
  sessionTable.insert(row);
470
470
  return {
471
471
  type: "SUCCESS_RESULT",
472
- data: void 0
472
+ data: {
473
+ key: rowKey
474
+ }
473
475
  };
474
476
  }
475
477
  return {
@@ -33,7 +33,7 @@ export declare class TickingArrayDataSource extends ArrayDataSource {
33
33
  undoRowChange: (key: string) => Promise<RpcResultSuccess | RpcResultError>;
34
34
  set columns(columns: string[]);
35
35
  get columns(): string[];
36
- endEditSession(saveChanges?: boolean): Promise<void>;
36
+ endEditSession(saveChanges?: boolean, force?: boolean): Promise<void>;
37
37
  rpcRequest(rpcRequest: Omit<VuuRpcServiceRequest, "context">): Promise<RpcResultSuccess | RpcResultError>;
38
38
  menuRpcCall(rpcRequest: Omit<VuuRpcMenuRequest, "vpId">): Promise<VuuRpcMenuResponse>;
39
39
  getTypeaheadSuggestions(column: string, pattern?: string): Promise<string[]>;