@candidstartup/simple-spreadsheet-data 0.9.0 → 0.10.0

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![NPM Type Definitions](https://img.shields.io/npm/types/@candidstartup/simple-spreadsheet-data)](https://www.npmjs.com/package/@candidstartup/simple-spreadsheet-data)
1
+ [![TypeScript](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FTheCandidStartup%2Finfinisheet%2Fmain%2Fpackage.json&query=%24.devDependencies.typescript&label=TypeScript&color=blue)](https://github.com/TheCandidStartup/infinisheet/blob/main/README.md#typescript-semantic-versioning)
2
2
  [![NPM Version](https://img.shields.io/npm/v/@candidstartup/simple-spreadsheet-data)](https://www.npmjs.com/package/@candidstartup/simple-spreadsheet-data)
3
3
  [![NPM bundle size](https://img.shields.io/bundlephobia/minzip/@candidstartup/simple-spreadsheet-data)](https://www.npmjs.com/package/@candidstartup/simple-spreadsheet-data)
4
4
  [![Build Status](https://github.com/TheCandidStartup/infinisheet/actions/workflows/build.yml/badge.svg?event=push)](https://github.com/TheCandidStartup/infinisheet/actions/workflows/build.yml)
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SpreadsheetData, ItemOffsetMapping, CellValue } from '@candidstartup/infinisheet-types';
1
+ import { SpreadsheetData, ItemOffsetMapping, CellValue, Result, SpreadsheetDataError, ValidationError } from '@candidstartup/infinisheet-types';
2
2
 
3
3
  /**
4
4
  * Branding Enum. Used by {@link SimpleSnapshot} to ensure that
@@ -37,7 +37,8 @@ declare class SimpleSpreadsheetData implements SpreadsheetData<SimpleSnapshot> {
37
37
  getColumnItemOffsetMapping(_snapshot: SimpleSnapshot): ItemOffsetMapping;
38
38
  getCellValue(snapshot: SimpleSnapshot, row: number, column: number): CellValue;
39
39
  getCellFormat(snapshot: SimpleSnapshot, row: number, column: number): string | undefined;
40
- setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): boolean;
40
+ setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): Result<void, SpreadsheetDataError>;
41
+ isValidCellValueAndFormat(_row: number, _column: number, _value: CellValue, _format: string | undefined): Result<void, ValidationError>;
41
42
  }
42
43
 
43
44
  /**
@@ -93,7 +94,8 @@ declare class LayeredSpreadsheetData<BaseData extends SpreadsheetData<BaseSnapsh
93
94
  getColumnItemOffsetMapping(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): ItemOffsetMapping;
94
95
  getCellValue(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>, row: number, column: number): CellValue;
95
96
  getCellFormat(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>, row: number, column: number): string | undefined;
96
- setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): boolean;
97
+ setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): Result<void, SpreadsheetDataError>;
98
+ isValidCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): Result<void, ValidationError>;
97
99
  }
98
100
 
99
101
  export { type LayeredSnapshot, LayeredSpreadsheetData, type SimpleSnapshot, SimpleSpreadsheetData, type SnapshotType, _LayeredSnapshotBrand, _SimpleSnapshotBrand };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { FixedSizeItemOffsetMapping, rowColCoordsToRef } from '@candidstartup/infinisheet-types';
1
+ import { FixedSizeItemOffsetMapping, rowColCoordsToRef, ok } from '@candidstartup/infinisheet-types';
2
2
 
3
3
  /**
4
4
  * Branding Enum. Used by {@link SimpleSnapshot} to ensure that
@@ -78,7 +78,10 @@ class SimpleSpreadsheetData {
78
78
  colCount: Math.max(curr.colCount, column + 1)
79
79
  };
80
80
  this.#notifyListeners();
81
- return true;
81
+ return ok();
82
+ }
83
+ isValidCellValueAndFormat(_row, _column, _value, _format) {
84
+ return ok();
82
85
  }
83
86
  #notifyListeners() {
84
87
  for (const listener of this.#listeners)
@@ -173,7 +176,13 @@ class LayeredSpreadsheetData {
173
176
  return (editValue === undefined) ? this.#base.getCellFormat(content.base, row, column) : this.#edit.getCellFormat(content.edit, row, column);
174
177
  }
175
178
  setCellValueAndFormat(row, column, value, format) {
176
- return this.#edit.setCellValueAndFormat(row, column, value, format);
179
+ const result = this.#base.isValidCellValueAndFormat(row, column, value, format);
180
+ return result.andThen(() => this.#edit.setCellValueAndFormat(row, column, value, format));
181
+ }
182
+ // Must be valid for both layers
183
+ isValidCellValueAndFormat(row, column, value, format) {
184
+ const result = this.#base.isValidCellValueAndFormat(row, column, value, format);
185
+ return result.andThen(() => this.#edit.isValidCellValueAndFormat(row, column, value, format));
177
186
  }
178
187
  #base;
179
188
  #edit;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/SimpleSpreadsheetData.ts","../src/LayeredSpreadsheetData.ts"],"sourcesContent":["import type { CellValue, SpreadsheetData, RowColRef, ItemOffsetMapping } from \"@candidstartup/infinisheet-types\";\nimport { FixedSizeItemOffsetMapping, rowColCoordsToRef } from \"@candidstartup/infinisheet-types\";\n\ninterface CellContent {\n value: CellValue;\n format: string|undefined;\n}\n\ninterface SimpleSnapshotContent {\n values: Record<RowColRef,CellContent>;\n rowCount: number;\n colCount: number;\n}\n\n/** \n * Branding Enum. Used by {@link SimpleSnapshot} to ensure that\n * you'll get a type error if you pass some random object where a `SimpleSnapshot`\n * is expected.\n * @internal\n */\nexport enum _SimpleSnapshotBrand { _DO_NOT_USE=\"\" };\n\n/**\n * Opaque type representing a {@link SimpleSpreadsheetData} snapshot. All the\n * internal implementation details are hidden from the exported API.\n */\nexport interface SimpleSnapshot {\n /** @internal */\n _brand: _SimpleSnapshotBrand;\n}\n\nconst rowItemOffsetMapping = new FixedSizeItemOffsetMapping(30);\nconst columnItemOffsetMapping = new FixedSizeItemOffsetMapping(100);\n\nfunction asContent(snapshot: SimpleSnapshot) {\n return snapshot as unknown as SimpleSnapshotContent;\n}\n\nfunction asSnapshot(snapshot: SimpleSnapshotContent) {\n return snapshot as unknown as SimpleSnapshot;\n}\n\n/**\n * Reference implementation of {@link SpreadsheetData}\n * \n * Editable in-memory spreadsheet data container. Starts out empty. Use the API to fill\n * with data!\n * \n * Intended for use as a mock, to compare with an optimized implementation when testing and\n * for simple sample apps. Simplest possible implementation, no attempt at optimization.\n */\nexport class SimpleSpreadsheetData implements SpreadsheetData<SimpleSnapshot> {\n constructor () {\n this.#listeners = [];\n this.#content = {\n values: {},\n rowCount: 0,\n colCount: 0\n }\n }\n\n subscribe(onDataChange: () => void): () => void {\n this.#listeners = [...this.#listeners, onDataChange];\n return () => {\n this.#listeners = this.#listeners.filter(l => l !== onDataChange);\n }\n }\n\n getSnapshot(): SimpleSnapshot {\n return asSnapshot(this.#content);\n }\n\n getRowCount(snapshot: SimpleSnapshot): number {\n return asContent(snapshot).rowCount;\n }\n\n getRowItemOffsetMapping(_snapshot: SimpleSnapshot): ItemOffsetMapping {\n return rowItemOffsetMapping;\n }\n\n getColumnCount(snapshot: SimpleSnapshot): number {\n return asContent(snapshot).colCount;\n }\n\n getColumnItemOffsetMapping(_snapshot: SimpleSnapshot): ItemOffsetMapping {\n return columnItemOffsetMapping\n }\n\n getCellValue(snapshot: SimpleSnapshot, row: number, column: number): CellValue {\n const ref = rowColCoordsToRef(row, column);\n return asContent(snapshot).values[ref]?.value;\n }\n\n getCellFormat(snapshot: SimpleSnapshot, row: number, column: number): string | undefined {\n const ref = rowColCoordsToRef(row, column);\n return asContent(snapshot).values[ref]?.format;\n }\n\n setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): boolean {\n const curr = this.#content;\n const ref = rowColCoordsToRef(row, column);\n\n // Snapshot semantics preserved by treating SimpleSnapshot as an immutable data structure which is \n // replaced with a modified copy on every update. Yes, this is horribly inefficient. \n // For simplicity, setting a value to undefined stores it explicitly rather than removing it. Functional\n // behavior is the same.\n this.#content = {\n values: { ...curr.values, [ref]: { value, format }},\n rowCount: Math.max(curr.rowCount, row+1),\n colCount: Math.max(curr.colCount, column+1)\n }\n this.#notifyListeners();\n\n return true;\n }\n\n #notifyListeners() {\n for (const listener of this.#listeners)\n listener();\n }\n\n #listeners: (() => void)[];\n #content: SimpleSnapshotContent;\n}\n","import type { CellValue, SpreadsheetData, ItemOffsetMapping } from \"@candidstartup/infinisheet-types\";\n\ninterface LayeredSnapshotContent<BaseSnapshot, EditSnapshot> {\n base: BaseSnapshot,\n edit: EditSnapshot\n}\n\n/** \n * Branding Enum. Used by {@link LayeredSnapshot} to ensure that\n * you'll get a type error if you pass some random object where a `LayeredSnapshot`\n * is expected.\n * @internal\n */\nexport enum _LayeredSnapshotBrand { _DO_NOT_USE=\"\" };\n\n/**\n * Opaque type representing a {@link LayeredSpreadsheetData} snapshot. All the\n * internal implementation details are hidden from the exported API.\n */\nexport interface LayeredSnapshot<BaseSnapshot,EditSnapshot> {\n /** @internal */\n _brand: [ _LayeredSnapshotBrand, BaseSnapshot, EditSnapshot ]\n}\n\nfunction asContent<Base,Edit>(snapshot: LayeredSnapshot<Base,Edit>) {\n return snapshot as unknown as LayeredSnapshotContent<Base,Edit>;\n}\n\nfunction asSnapshot<Base,Edit>(snapshot: LayeredSnapshotContent<Base,Edit>) {\n return snapshot as unknown as LayeredSnapshot<Base,Edit>;\n}\n\n/**\n * Extracts the snapshot type from a {@link SpreadsheetData} instance\n */\nexport type SnapshotType<T> = T extends SpreadsheetData<infer TResult> ? TResult : never;\n\n/**\n * Implementation of {@link SpreadsheetData} that layers two other `SpreadsheetData` instances on top of each other.\n * \n * There's an \"edit\" layer on top where any changes are stored, with a \"base\" layer underneath. If a value is `undefined` in the edit layer, \n * the corresponding value is returned from the base layer instead.\n * \n * Common use case is a read only reference data source as the base layer with an initially empty edit layer that accepts changes.\n * \n * @typeParam BaseData - Type of base layer `SpreadsheetData` instance\n * @typeParam EditData - Type of edit layer `SpreadsheetData` instance\n * @typeParam BaseSnapshot - Type of snapshot used by `BaseData`. By default, inferred from `BaseData`.\n * @typeParam EditSnapshot - Type of snapshot used by `EditData`. By default, inferred from `EditData`.\n */\nexport class LayeredSpreadsheetData<BaseData extends SpreadsheetData<BaseSnapshot>, \n EditData extends SpreadsheetData<EditSnapshot>, BaseSnapshot = SnapshotType<BaseData>, EditSnapshot = SnapshotType<EditData>>\n implements SpreadsheetData<LayeredSnapshot<BaseSnapshot, EditSnapshot>> {\n\n /**\n * Creates a `LayeredSpreadsheetData` instance from two existing `SpreadsheetData` instances.\n * \n * All type parameters can be inferred from the constructor arguments.\n * \n * @param base - `SpreadsheetData` instance to use for the base layer\n * @param edit - `SpreadsheetData` instance to use for the edit layer\n */\n constructor(base: BaseData, edit: EditData) {\n this.#base = base;\n this.#edit = edit;\n }\n\n subscribe(onDataChange: () => void): () => void {\n const unsubscribeBase = this.#base.subscribe(onDataChange);\n const unsubscribeEdit = this.#edit.subscribe(onDataChange);\n return () => {\n unsubscribeBase();\n unsubscribeEdit();\n }\n }\n\n getSnapshot(): LayeredSnapshot<BaseSnapshot, EditSnapshot> {\n const baseSnapshot = this.#base.getSnapshot();\n const editSnapshot = this.#edit.getSnapshot();\n\n if (!this.#content || this.#content.base != baseSnapshot || this.#content.edit != editSnapshot) {\n this.#content = { base: baseSnapshot, edit: editSnapshot } ;\n }\n\n return asSnapshot(this.#content);\n }\n\n getRowCount(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): number {\n const content = asContent(snapshot);\n return Math.max(this.#base.getRowCount(content.base), this.#edit.getRowCount(content.edit));\n }\n\n getRowItemOffsetMapping(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): ItemOffsetMapping {\n return this.#base.getRowItemOffsetMapping(asContent(snapshot).base);\n }\n\n getColumnCount(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): number {\n const content = asContent(snapshot);\n return Math.max(this.#base.getColumnCount(content.base), this.#edit.getColumnCount(content.edit));\n }\n\n getColumnItemOffsetMapping(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): ItemOffsetMapping {\n return this.#base.getColumnItemOffsetMapping(asContent(snapshot).base);\n }\n\n getCellValue(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>, row: number, column: number): CellValue {\n const content = asContent(snapshot);\n const editValue = this.#edit.getCellValue(content.edit, row, column);\n if (editValue !== undefined)\n return editValue;\n\n return this.#base.getCellValue(content.base, row, column);\n }\n\n getCellFormat(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>, row: number, column: number): string | undefined {\n const content = asContent(snapshot);\n const editValue = this.#edit.getCellValue(content.edit, row, column);\n return (editValue === undefined) ? this.#base.getCellFormat(content.base, row, column) : this.#edit.getCellFormat(content.edit, row, column);\n }\n\n setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): boolean {\n return this.#edit.setCellValueAndFormat(row, column, value, format);\n }\n\n #base: BaseData;\n #edit: EditData;\n #content: LayeredSnapshotContent<BaseSnapshot, EditSnapshot> | undefined;\n}\n"],"names":["asContent","asSnapshot"],"mappings":";;AAcA;;;;;AAKG;IACS;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAAG,IAAA,oBAAA,CAAA,aAAA,CAAA,GAAA,EAAc;AAAC,CAAC,EAAvC,oBAAoB,KAApB,oBAAoB,GAAmB,EAAA,CAAA,CAAA;AAWnD,MAAM,oBAAoB,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC;AAC/D,MAAM,uBAAuB,GAAG,IAAI,0BAA0B,CAAC,GAAG,CAAC;AAEnE,SAASA,WAAS,CAAC,QAAwB,EAAA;AACzC,IAAA,OAAO,QAA4C;AACrD;AAEA,SAASC,YAAU,CAAC,QAA+B,EAAA;AACjD,IAAA,OAAO,QAAqC;AAC9C;AAEA;;;;;;;;AAQG;MACU,qBAAqB,CAAA;AAChC,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;QACpB,IAAI,CAAC,QAAQ,GAAG;AACd,YAAA,MAAM,EAAE,EAA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E,MAAM,CAAC;;AAGrE,IAAA,KAAK;AACL,IAAA,KAAK;AACL,IAAA,QAAQ;AACT;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/SimpleSpreadsheetData.ts","../src/LayeredSpreadsheetData.ts"],"sourcesContent":["import type { CellValue, SpreadsheetData, RowColRef, ItemOffsetMapping, Result, \n SpreadsheetDataError, ValidationError } from \"@candidstartup/infinisheet-types\";\nimport { FixedSizeItemOffsetMapping, rowColCoordsToRef, ok } from \"@candidstartup/infinisheet-types\";\n\ninterface CellContent {\n value: CellValue;\n format: string|undefined;\n}\n\ninterface SimpleSnapshotContent {\n values: Record<RowColRef,CellContent>;\n rowCount: number;\n colCount: number;\n}\n\n/** \n * Branding Enum. Used by {@link SimpleSnapshot} to ensure that\n * you'll get a type error if you pass some random object where a `SimpleSnapshot`\n * is expected.\n * @internal\n */\nexport enum _SimpleSnapshotBrand { _DO_NOT_USE=\"\" };\n\n/**\n * Opaque type representing a {@link SimpleSpreadsheetData} snapshot. All the\n * internal implementation details are hidden from the exported API.\n */\nexport interface SimpleSnapshot {\n /** @internal */\n _brand: _SimpleSnapshotBrand;\n}\n\nconst rowItemOffsetMapping = new FixedSizeItemOffsetMapping(30);\nconst columnItemOffsetMapping = new FixedSizeItemOffsetMapping(100);\n\nfunction asContent(snapshot: SimpleSnapshot) {\n return snapshot as unknown as SimpleSnapshotContent;\n}\n\nfunction asSnapshot(snapshot: SimpleSnapshotContent) {\n return snapshot as unknown as SimpleSnapshot;\n}\n\n/**\n * Reference implementation of {@link SpreadsheetData}\n * \n * Editable in-memory spreadsheet data container. Starts out empty. Use the API to fill\n * with data!\n * \n * Intended for use as a mock, to compare with an optimized implementation when testing and\n * for simple sample apps. Simplest possible implementation, no attempt at optimization.\n */\nexport class SimpleSpreadsheetData implements SpreadsheetData<SimpleSnapshot> {\n constructor () {\n this.#listeners = [];\n this.#content = {\n values: {},\n rowCount: 0,\n colCount: 0\n }\n }\n\n subscribe(onDataChange: () => void): () => void {\n this.#listeners = [...this.#listeners, onDataChange];\n return () => {\n this.#listeners = this.#listeners.filter(l => l !== onDataChange);\n }\n }\n\n getSnapshot(): SimpleSnapshot {\n return asSnapshot(this.#content);\n }\n\n getRowCount(snapshot: SimpleSnapshot): number {\n return asContent(snapshot).rowCount;\n }\n\n getRowItemOffsetMapping(_snapshot: SimpleSnapshot): ItemOffsetMapping {\n return rowItemOffsetMapping;\n }\n\n getColumnCount(snapshot: SimpleSnapshot): number {\n return asContent(snapshot).colCount;\n }\n\n getColumnItemOffsetMapping(_snapshot: SimpleSnapshot): ItemOffsetMapping {\n return columnItemOffsetMapping\n }\n\n getCellValue(snapshot: SimpleSnapshot, row: number, column: number): CellValue {\n const ref = rowColCoordsToRef(row, column);\n return asContent(snapshot).values[ref]?.value;\n }\n\n getCellFormat(snapshot: SimpleSnapshot, row: number, column: number): string | undefined {\n const ref = rowColCoordsToRef(row, column);\n return asContent(snapshot).values[ref]?.format;\n }\n\n setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): Result<void,SpreadsheetDataError> {\n const curr = this.#content;\n const ref = rowColCoordsToRef(row, column);\n\n // Snapshot semantics preserved by treating SimpleSnapshot as an immutable data structure which is \n // replaced with a modified copy on every update. Yes, this is horribly inefficient. \n // For simplicity, setting a value to undefined stores it explicitly rather than removing it. Functional\n // behavior is the same.\n this.#content = {\n values: { ...curr.values, [ref]: { value, format }},\n rowCount: Math.max(curr.rowCount, row+1),\n colCount: Math.max(curr.colCount, column+1)\n }\n this.#notifyListeners();\n\n return ok();\n }\n\n isValidCellValueAndFormat(_row: number, _column: number, _value: CellValue, _format: string | undefined): Result<void,ValidationError> {\n return ok(); \n }\n\n #notifyListeners() {\n for (const listener of this.#listeners)\n listener();\n }\n\n #listeners: (() => void)[];\n #content: SimpleSnapshotContent;\n}\n","import type { CellValue, SpreadsheetData, ItemOffsetMapping, Result, \n SpreadsheetDataError, ValidationError } from \"@candidstartup/infinisheet-types\";\n\ninterface LayeredSnapshotContent<BaseSnapshot, EditSnapshot> {\n base: BaseSnapshot,\n edit: EditSnapshot\n}\n\n/** \n * Branding Enum. Used by {@link LayeredSnapshot} to ensure that\n * you'll get a type error if you pass some random object where a `LayeredSnapshot`\n * is expected.\n * @internal\n */\nexport enum _LayeredSnapshotBrand { _DO_NOT_USE=\"\" };\n\n/**\n * Opaque type representing a {@link LayeredSpreadsheetData} snapshot. All the\n * internal implementation details are hidden from the exported API.\n */\nexport interface LayeredSnapshot<BaseSnapshot,EditSnapshot> {\n /** @internal */\n _brand: [ _LayeredSnapshotBrand, BaseSnapshot, EditSnapshot ]\n}\n\nfunction asContent<Base,Edit>(snapshot: LayeredSnapshot<Base,Edit>) {\n return snapshot as unknown as LayeredSnapshotContent<Base,Edit>;\n}\n\nfunction asSnapshot<Base,Edit>(snapshot: LayeredSnapshotContent<Base,Edit>) {\n return snapshot as unknown as LayeredSnapshot<Base,Edit>;\n}\n\n/**\n * Extracts the snapshot type from a {@link SpreadsheetData} instance\n */\nexport type SnapshotType<T> = T extends SpreadsheetData<infer TResult> ? TResult : never;\n\n/**\n * Implementation of {@link SpreadsheetData} that layers two other `SpreadsheetData` instances on top of each other.\n * \n * There's an \"edit\" layer on top where any changes are stored, with a \"base\" layer underneath. If a value is `undefined` in the edit layer, \n * the corresponding value is returned from the base layer instead.\n * \n * Common use case is a read only reference data source as the base layer with an initially empty edit layer that accepts changes.\n * \n * @typeParam BaseData - Type of base layer `SpreadsheetData` instance\n * @typeParam EditData - Type of edit layer `SpreadsheetData` instance\n * @typeParam BaseSnapshot - Type of snapshot used by `BaseData`. By default, inferred from `BaseData`.\n * @typeParam EditSnapshot - Type of snapshot used by `EditData`. By default, inferred from `EditData`.\n */\nexport class LayeredSpreadsheetData<BaseData extends SpreadsheetData<BaseSnapshot>, \n EditData extends SpreadsheetData<EditSnapshot>, BaseSnapshot = SnapshotType<BaseData>, EditSnapshot = SnapshotType<EditData>>\n implements SpreadsheetData<LayeredSnapshot<BaseSnapshot, EditSnapshot>> {\n\n /**\n * Creates a `LayeredSpreadsheetData` instance from two existing `SpreadsheetData` instances.\n * \n * All type parameters can be inferred from the constructor arguments.\n * \n * @param base - `SpreadsheetData` instance to use for the base layer\n * @param edit - `SpreadsheetData` instance to use for the edit layer\n */\n constructor(base: BaseData, edit: EditData) {\n this.#base = base;\n this.#edit = edit;\n }\n\n subscribe(onDataChange: () => void): () => void {\n const unsubscribeBase = this.#base.subscribe(onDataChange);\n const unsubscribeEdit = this.#edit.subscribe(onDataChange);\n return () => {\n unsubscribeBase();\n unsubscribeEdit();\n }\n }\n\n getSnapshot(): LayeredSnapshot<BaseSnapshot, EditSnapshot> {\n const baseSnapshot = this.#base.getSnapshot();\n const editSnapshot = this.#edit.getSnapshot();\n\n if (!this.#content || this.#content.base != baseSnapshot || this.#content.edit != editSnapshot) {\n this.#content = { base: baseSnapshot, edit: editSnapshot } ;\n }\n\n return asSnapshot(this.#content);\n }\n\n getRowCount(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): number {\n const content = asContent(snapshot);\n return Math.max(this.#base.getRowCount(content.base), this.#edit.getRowCount(content.edit));\n }\n\n getRowItemOffsetMapping(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): ItemOffsetMapping {\n return this.#base.getRowItemOffsetMapping(asContent(snapshot).base);\n }\n\n getColumnCount(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): number {\n const content = asContent(snapshot);\n return Math.max(this.#base.getColumnCount(content.base), this.#edit.getColumnCount(content.edit));\n }\n\n getColumnItemOffsetMapping(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>): ItemOffsetMapping {\n return this.#base.getColumnItemOffsetMapping(asContent(snapshot).base);\n }\n\n getCellValue(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>, row: number, column: number): CellValue {\n const content = asContent(snapshot);\n const editValue = this.#edit.getCellValue(content.edit, row, column);\n if (editValue !== undefined)\n return editValue;\n\n return this.#base.getCellValue(content.base, row, column);\n }\n\n getCellFormat(snapshot: LayeredSnapshot<BaseSnapshot, EditSnapshot>, row: number, column: number): string | undefined {\n const content = asContent(snapshot);\n const editValue = this.#edit.getCellValue(content.edit, row, column);\n return (editValue === undefined) ? this.#base.getCellFormat(content.base, row, column) : this.#edit.getCellFormat(content.edit, row, column);\n }\n\n setCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): Result<void,SpreadsheetDataError> {\n const result = this.#base.isValidCellValueAndFormat(row, column, value, format);\n return result.andThen(() => this.#edit.setCellValueAndFormat(row, column, value, format));\n }\n\n // Must be valid for both layers\n isValidCellValueAndFormat(row: number, column: number, value: CellValue, format: string | undefined): Result<void,ValidationError> {\n const result = this.#base.isValidCellValueAndFormat(row, column, value, format);\n return result.andThen(() => this.#edit.isValidCellValueAndFormat(row,column,value,format));\n }\n\n #base: BaseData;\n #edit: EditData;\n #content: LayeredSnapshotContent<BaseSnapshot, EditSnapshot> | undefined;\n}\n"],"names":["asContent","asSnapshot"],"mappings":";;AAeA;;;;;AAKG;IACS;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAAG,IAAA,oBAAA,CAAA,aAAA,CAAA,GAAA,EAAc;AAAC,CAAC,EAAvC,oBAAoB,KAApB,oBAAoB,GAAmB,EAAA,CAAA,CAAA;AAWnD,MAAM,oBAAoB,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC;AAC/D,MAAM,uBAAuB,GAAG,IAAI,0BAA0B,CAAC,GAAG,CAAC;AAEnE,SAASA,WAAS,CAAC,QAAwB,EAAA;AACzC,IAAA,OAAO,QAA4C;AACrD;AAEA,SAASC,YAAU,CAAC,QAA+B,EAAA;AACjD,IAAA,OAAO,QAAqC;AAC9C;AAEA;;;;;;;;AAQG;MACU,qBAAqB,CAAA;AAChC,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;QACpB,IAAI,CAAC,QAAQ,GAAG;AACd,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,QAAQ,EAAE,CA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,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;QAC/E,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;;;AAI3F,IAAA,yBAAyB,CAAC,GAAW,EAAE,MAAc,EAAE,KAAgB,EAAE,MAA0B,EAAA;AACjG,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;QAC/E,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,GAAG,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,CAAC,CAAC;;AAG5F,IAAA,KAAK;AACL,IAAA,KAAK;AACL,IAAA,QAAQ;AACT;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@candidstartup/simple-spreadsheet-data",
3
3
  "private": false,
4
- "version": "0.9.0",
4
+ "version": "0.10.0",
5
5
  "description": "Reference implementations of SpreadsheetData",
6
6
  "author": "Tim Wiegand <tim.wiegand@thecandidstartup.org>",
7
7
  "license": "BSD-3-Clause",
@@ -49,7 +49,7 @@
49
49
  "test": "vitest"
50
50
  },
51
51
  "dependencies": {
52
- "@candidstartup/infinisheet-types": "^0.9.0"
52
+ "@candidstartup/infinisheet-types": "^0.10.0"
53
53
  },
54
- "gitHead": "8035218a392af0bc15c99ff272536ba8ef841c49"
54
+ "gitHead": "948f593793c217bd5b49aea712d3d700702ca120"
55
55
  }