@vuu-ui/vuu-data-types 2.1.4 → 2.1.6

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 +29 -1
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -546,8 +546,36 @@ export declare type DataSourceSuspenseProps = {
546
546
  escalateDelay?: number;
547
547
  };
548
548
 
549
+ /**
550
+ * An inline edit session allows user to apply edits directly to
551
+ * the existing component. e.g. directly edit cells within a table.
552
+ */
553
+ export type InlineEditSessionMode = "inline-all-rows";
554
+ /**
555
+ * A standalone edit session re-renders editable data in an edit component.
556
+ * e.g an edit panel may be displayed in a dialog.
557
+ */
558
+ export type StandaloneEditSessionMode =
559
+ | "selected-rows"
560
+ | "all-rows"
561
+ | "empty-session-table";
562
+ export type EditSessionMode = InlineEditSessionMode | StandaloneEditSessionMode;
563
+
564
+ export interface EditApi {
565
+ beginEditSession?: (
566
+ editSessionMode?: EditSessionMode,
567
+ ) => Promise<DataSource | undefined>;
568
+ editCell?: (
569
+ rowKey: string,
570
+ colun: string,
571
+ value: VuuRowDataItemType,
572
+ ) => Promise<RpcResult> | undefined;
573
+ endEditSession?: (saveChanges?: boolean) => Promise<RpcResult> | undefined;
574
+ }
575
+
549
576
  export interface DataSource
550
- extends IEventEmitter<DataSourceEvents>,
577
+ extends EditApi,
578
+ IEventEmitter<DataSourceEvents>,
551
579
  Partial<TypeaheadSuggestionProvider> {
552
580
  aggregations: VuuAggregation[];
553
581
  closeTreeNode: (keyOrIndex: string | number, cascade?: boolean) => void;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "2.1.4",
8
- "@vuu-ui/vuu-protocol-types": "2.1.4"
7
+ "@vuu-ui/vuu-filter-types": "2.1.6",
8
+ "@vuu-ui/vuu-protocol-types": "2.1.6"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},