UPDATE: Dynamic arrays!

This commit is contained in:
Nicolás Hatcher
2025-03-23 01:51:17 +01:00
parent 81e96f1401
commit c78bdb32fd
26 changed files with 1172 additions and 123 deletions

View File

@@ -766,4 +766,18 @@ impl Model {
.get_first_non_empty_in_row_after_column(sheet, row, column)
.map_err(to_js_error)
}
#[wasm_bindgen(js_name = "getCellArrayStructure")]
pub fn get_cell_array_structure(
&self,
sheet: u32,
row: i32,
column: i32,
) -> Result<JsValue, JsError> {
let cell_structure = self
.model
.get_cell_array_structure(sheet, row, column)
.map_err(|e| to_js_error(e.to_string()))?;
serde_wasm_bindgen::to_value(&cell_structure).map_err(JsError::from)
}
}

View File

@@ -109,6 +109,11 @@ export interface MarkedToken {
end: number;
}
export type CellArrayStructure =
| "SingleCell"
| { DynamicChild: [number, number, number, number] }
| { DynamicMother: [number, number] };
export interface WorksheetProperties {
name: string;
color: string;
@@ -216,7 +221,7 @@ export interface SelectedView {
// };
// type ClipboardData = Record<string, Record <string, ClipboardCell>>;
type ClipboardData = Map<number, Map <number, ClipboardCell>>;
type ClipboardData = Map<number, Map<number, ClipboardCell>>;
export interface ClipboardCell {
text: string;
@@ -233,4 +238,4 @@ export interface DefinedName {
name: string;
scope?: number;
formula: string;
}
}