@truecalc/workbook 8.0.0 → 8.1.1
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
|
@@ -33,6 +33,13 @@ export class JsWorkbook {
|
|
|
33
33
|
* Defines a workbook-scoped named range.
|
|
34
34
|
*/
|
|
35
35
|
defineName(name: string, ref_str: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Defines a workbook-scoped table (issue #868): `ref_str`'s first row
|
|
38
|
+
* becomes the table's header row, so formulas can use `Table[Column]`
|
|
39
|
+
* (whole-column) and `Table[@Column]` / unqualified `[@Column]`
|
|
40
|
+
* (current-row) structured references against it.
|
|
41
|
+
*/
|
|
42
|
+
defineTable(name: string, ref_str: string): void;
|
|
36
43
|
/**
|
|
37
44
|
* Deserializes a workbook from its canonical JSON string.
|
|
38
45
|
*/
|
|
@@ -58,6 +65,10 @@ export class JsWorkbook {
|
|
|
58
65
|
* Redefines (renames target of) a workbook-scoped named range.
|
|
59
66
|
*/
|
|
60
67
|
redefineName(name: string, ref_str: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Redefines (retargets) a workbook-scoped table.
|
|
70
|
+
*/
|
|
71
|
+
redefineTable(name: string, ref_str: string): void;
|
|
61
72
|
/**
|
|
62
73
|
* Returns the resolved value at `a1` on `sheet` as a JS value.
|
|
63
74
|
*
|
|
@@ -122,10 +133,12 @@ export interface InitOutput {
|
|
|
122
133
|
readonly jsworkbook_addSheet: (a: number, b: number, c: number, d: number) => void;
|
|
123
134
|
readonly jsworkbook_clear: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
124
135
|
readonly jsworkbook_defineName: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
136
|
+
readonly jsworkbook_defineTable: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
125
137
|
readonly jsworkbook_fromJSON: (a: number, b: number, c: number) => void;
|
|
126
138
|
readonly jsworkbook_new: (a: number, b: number) => number;
|
|
127
139
|
readonly jsworkbook_recalc: (a: number, b: number, c: number, d: number) => void;
|
|
128
140
|
readonly jsworkbook_redefineName: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
141
|
+
readonly jsworkbook_redefineTable: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
129
142
|
readonly jsworkbook_resolved: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
130
143
|
readonly jsworkbook_set: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
131
144
|
readonly jsworkbook_setDate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -77,6 +77,31 @@ export class JsWorkbook {
|
|
|
77
77
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Defines a workbook-scoped table (issue #868): `ref_str`'s first row
|
|
82
|
+
* becomes the table's header row, so formulas can use `Table[Column]`
|
|
83
|
+
* (whole-column) and `Table[@Column]` / unqualified `[@Column]`
|
|
84
|
+
* (current-row) structured references against it.
|
|
85
|
+
* @param {string} name
|
|
86
|
+
* @param {string} ref_str
|
|
87
|
+
*/
|
|
88
|
+
defineTable(name, ref_str) {
|
|
89
|
+
try {
|
|
90
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
91
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
92
|
+
const len0 = WASM_VECTOR_LEN;
|
|
93
|
+
const ptr1 = passStringToWasm0(ref_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
94
|
+
const len1 = WASM_VECTOR_LEN;
|
|
95
|
+
wasm.jsworkbook_defineTable(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
96
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
97
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
98
|
+
if (r1) {
|
|
99
|
+
throw takeObject(r0);
|
|
100
|
+
}
|
|
101
|
+
} finally {
|
|
102
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
80
105
|
/**
|
|
81
106
|
* Deserializes a workbook from its canonical JSON string.
|
|
82
107
|
* @param {string} s
|
|
@@ -173,6 +198,28 @@ export class JsWorkbook {
|
|
|
173
198
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
174
199
|
}
|
|
175
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Redefines (retargets) a workbook-scoped table.
|
|
203
|
+
* @param {string} name
|
|
204
|
+
* @param {string} ref_str
|
|
205
|
+
*/
|
|
206
|
+
redefineTable(name, ref_str) {
|
|
207
|
+
try {
|
|
208
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
209
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
210
|
+
const len0 = WASM_VECTOR_LEN;
|
|
211
|
+
const ptr1 = passStringToWasm0(ref_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
212
|
+
const len1 = WASM_VECTOR_LEN;
|
|
213
|
+
wasm.jsworkbook_redefineTable(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
214
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
215
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
216
|
+
if (r1) {
|
|
217
|
+
throw takeObject(r0);
|
|
218
|
+
}
|
|
219
|
+
} finally {
|
|
220
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
176
223
|
/**
|
|
177
224
|
* Returns the resolved value at `a1` on `sheet` as a JS value.
|
|
178
225
|
*
|
|
Binary file
|