logisheets 1.14.0 → 1.15.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.
Files changed (69) hide show
  1. package/dist/src/api/workbook.d.ts +112 -1
  2. package/dist/src/api/workbook.js +126 -0
  3. package/dist/src/bindings/bind_form_schema.d.ts +13 -19
  4. package/dist/src/bindings/bind_form_schema.js +7 -25
  5. package/dist/src/bindings/block_field_type.d.ts +7 -0
  6. package/dist/src/bindings/block_field_type.js +2 -0
  7. package/dist/src/bindings/block_info.d.ts +4 -0
  8. package/dist/src/bindings/block_op.d.ts +1 -1
  9. package/dist/src/bindings/block_op_for_payload.d.ts +5 -0
  10. package/dist/src/bindings/block_op_for_payload.js +2 -0
  11. package/dist/src/bindings/block_op_policy.d.ts +6 -0
  12. package/dist/src/bindings/block_op_policy.js +2 -0
  13. package/dist/src/bindings/block_permissions.d.ts +4 -0
  14. package/dist/src/bindings/block_permissions.js +6 -1
  15. package/dist/src/bindings/block_schema.d.ts +3 -0
  16. package/dist/src/bindings/block_schema_field_entry.d.ts +12 -0
  17. package/dist/src/bindings/check_field_validation_params.d.ts +6 -0
  18. package/dist/src/bindings/check_field_validation_params.js +2 -0
  19. package/dist/src/bindings/create_block.d.ts +9 -0
  20. package/dist/src/bindings/create_block.js +11 -1
  21. package/dist/src/bindings/duplicate_block_key.d.ts +7 -0
  22. package/dist/src/bindings/duplicate_block_key.js +2 -0
  23. package/dist/src/bindings/edit_payload.d.ts +12 -0
  24. package/dist/src/bindings/enum_set_info.d.ts +6 -0
  25. package/dist/src/bindings/enum_set_info.js +2 -0
  26. package/dist/src/bindings/enum_variant_info.d.ts +4 -0
  27. package/dist/src/bindings/enum_variant_info.js +2 -0
  28. package/dist/src/bindings/enum_variant_spec.d.ts +14 -0
  29. package/dist/src/bindings/enum_variant_spec.js +21 -0
  30. package/dist/src/bindings/field_validation_verdict.d.ts +5 -0
  31. package/dist/src/bindings/field_validation_verdict.js +2 -0
  32. package/dist/src/bindings/get_block_op_policies_params.d.ts +4 -0
  33. package/dist/src/bindings/get_block_op_policies_params.js +2 -0
  34. package/dist/src/bindings/index.d.ts +21 -0
  35. package/dist/src/bindings/index.js +21 -0
  36. package/dist/src/bindings/pivot_excel_note.d.ts +4 -0
  37. package/dist/src/bindings/pivot_excel_note.js +2 -0
  38. package/dist/src/bindings/pivot_filter.d.ts +4 -0
  39. package/dist/src/bindings/pivot_filter.js +2 -0
  40. package/dist/src/bindings/pivot_plan.d.ts +12 -0
  41. package/dist/src/bindings/pivot_plan.js +2 -0
  42. package/dist/src/bindings/pivot_spec.d.ts +10 -0
  43. package/dist/src/bindings/pivot_spec.js +2 -0
  44. package/dist/src/bindings/remove_enum_set.d.ts +10 -0
  45. package/dist/src/bindings/remove_enum_set.js +16 -0
  46. package/dist/src/bindings/rpc_pivot_plan_for_params.d.ts +6 -0
  47. package/dist/src/bindings/rpc_pivot_plan_for_params.js +2 -0
  48. package/dist/src/bindings/rpc_pivot_plan_params.d.ts +4 -0
  49. package/dist/src/bindings/rpc_pivot_plan_params.js +2 -0
  50. package/dist/src/bindings/rpc_workbook_methods.d.ts +20 -0
  51. package/dist/src/bindings/schema_field_spec.d.ts +71 -0
  52. package/dist/src/bindings/schema_field_spec.js +93 -0
  53. package/dist/src/bindings/set_block_analyzes.d.ts +23 -0
  54. package/dist/src/bindings/set_block_analyzes.js +33 -0
  55. package/dist/src/bindings/unique_together_group.d.ts +3 -0
  56. package/dist/src/bindings/unique_together_group.js +2 -0
  57. package/dist/src/bindings/upsert_enum_set.d.ts +19 -0
  58. package/dist/src/bindings/upsert_enum_set.js +28 -0
  59. package/dist/wasm/logisheets_wasm_server.d.ts +8 -8
  60. package/dist/wasm/logisheets_wasm_server.js +34 -34
  61. package/dist/wasm/logisheets_wasm_server_bg.wasm +0 -0
  62. package/dist/wasm/logisheets_wasm_server_bg.wasm.d.ts +1 -1
  63. package/dist/wasm/package.json +1 -1
  64. package/package.json +1 -1
  65. package/wasm/logisheets_wasm_server.d.ts +8 -8
  66. package/wasm/logisheets_wasm_server.js +34 -34
  67. package/wasm/logisheets_wasm_server_bg.wasm +0 -0
  68. package/wasm/logisheets_wasm_server_bg.wasm.d.ts +1 -1
  69. package/wasm/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ import { PivotSpecParts } from './pivot_spec';
2
+ export interface SetBlockAnalyzes {
3
+ sheetIdx: number;
4
+ blockId: number;
5
+ analyzes?: number;
6
+ pivot?: PivotSpecParts;
7
+ }
8
+ export declare class SetBlockAnalyzesBuilder {
9
+ private _sheetIdx;
10
+ private _blockId;
11
+ private _analyzes?;
12
+ private _pivot?;
13
+ sheetIdx(value: number): this;
14
+ blockId(value: number): this;
15
+ analyzes(value: number): this;
16
+ pivot(value: PivotSpecParts): this;
17
+ build(): {
18
+ sheetIdx: number;
19
+ blockId: number;
20
+ analyzes: number | undefined;
21
+ pivot: PivotSpecParts | undefined;
22
+ };
23
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetBlockAnalyzesBuilder = void 0;
4
+ class SetBlockAnalyzesBuilder {
5
+ _sheetIdx;
6
+ _blockId;
7
+ _analyzes;
8
+ _pivot;
9
+ sheetIdx(value) {
10
+ this._sheetIdx = value;
11
+ return this;
12
+ }
13
+ blockId(value) {
14
+ this._blockId = value;
15
+ return this;
16
+ }
17
+ analyzes(value) {
18
+ this._analyzes = value;
19
+ return this;
20
+ }
21
+ pivot(value) {
22
+ this._pivot = value;
23
+ return this;
24
+ }
25
+ build() {
26
+ if (this._sheetIdx === undefined)
27
+ throw new Error('missing sheetIdx');
28
+ if (this._blockId === undefined)
29
+ throw new Error('missing blockId');
30
+ return { sheetIdx: this._sheetIdx, blockId: this._blockId, analyzes: this._analyzes, pivot: this._pivot };
31
+ }
32
+ }
33
+ exports.SetBlockAnalyzesBuilder = SetBlockAnalyzesBuilder;
@@ -0,0 +1,3 @@
1
+ export interface UniqueTogetherGroup {
2
+ fields: readonly string[];
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { EnumVariantSpec } from './enum_variant_spec';
2
+ export interface UpsertEnumSet {
3
+ id: string;
4
+ name?: string;
5
+ variants: readonly EnumVariantSpec[];
6
+ }
7
+ export declare class UpsertEnumSetBuilder {
8
+ private _id;
9
+ private _name?;
10
+ private _variants;
11
+ id(value: string): this;
12
+ name(value: string): this;
13
+ variants(value: readonly EnumVariantSpec[]): this;
14
+ build(): {
15
+ id: string;
16
+ name: string | undefined;
17
+ variants: readonly EnumVariantSpec[];
18
+ };
19
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpsertEnumSetBuilder = void 0;
4
+ class UpsertEnumSetBuilder {
5
+ _id;
6
+ _name;
7
+ _variants;
8
+ id(value) {
9
+ this._id = value;
10
+ return this;
11
+ }
12
+ name(value) {
13
+ this._name = value;
14
+ return this;
15
+ }
16
+ variants(value) {
17
+ this._variants = value;
18
+ return this;
19
+ }
20
+ build() {
21
+ if (this._id === undefined)
22
+ throw new Error('missing id');
23
+ if (this._variants === undefined)
24
+ throw new Error('missing variants');
25
+ return { id: this._id, name: this._name, variants: this._variants };
26
+ }
27
+ }
28
+ exports.UpsertEnumSetBuilder = UpsertEnumSetBuilder;
@@ -1,5 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function handle(msg: any, book_id?: number | null): any;
4
+ /**
5
+ * Render a number with an Excel number-format code, natively via `ssf-rs`
6
+ * (the Rust port of SheetJS `ssf`). Replaces the browser's old dependency on
7
+ * the `ssf` npm package. On an unsupported/invalid format it falls back to the
8
+ * JavaScript `String(value)` representation, matching the previous behavior.
9
+ */
10
+ export function format_number(fmt: string, value: number): string;
3
11
  /**
4
12
  * Render a text value with an Excel number-format code (for the `@` text
5
13
  * section). Falls back to the text itself on an unsupported format.
@@ -10,11 +18,3 @@ export function format_text(fmt: string, text: string): string;
10
18
  * Output: ActionAffect
11
19
  */
12
20
  export function input_async_result(id: number, result: any): any;
13
- /**
14
- * Render a number with an Excel number-format code, natively via `ssf-rs`
15
- * (the Rust port of SheetJS `ssf`). Replaces the browser's old dependency on
16
- * the `ssf` npm package. On an unsupported/invalid format it falls back to the
17
- * JavaScript `String(value)` representation, matching the previous behavior.
18
- */
19
- export function format_number(fmt: string, value: number): string;
20
- export function handle(msg: any, book_id?: number | null): any;
@@ -171,38 +171,12 @@ function debugString(val) {
171
171
  return className;
172
172
  }
173
173
  /**
174
- * Render a text value with an Excel number-format code (for the `@` text
175
- * section). Falls back to the text itself on an unsupported format.
176
- * @param {string} fmt
177
- * @param {string} text
178
- * @returns {string}
179
- */
180
- module.exports.format_text = function(fmt, text) {
181
- let deferred3_0;
182
- let deferred3_1;
183
- try {
184
- const ptr0 = passStringToWasm0(fmt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
185
- const len0 = WASM_VECTOR_LEN;
186
- const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
187
- const len1 = WASM_VECTOR_LEN;
188
- const ret = wasm.format_text(ptr0, len0, ptr1, len1);
189
- deferred3_0 = ret[0];
190
- deferred3_1 = ret[1];
191
- return getStringFromWasm0(ret[0], ret[1]);
192
- } finally {
193
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
194
- }
195
- };
196
-
197
- /**
198
- * Input: AsyncFuncResult
199
- * Output: ActionAffect
200
- * @param {number} id
201
- * @param {any} result
174
+ * @param {any} msg
175
+ * @param {number | null} [book_id]
202
176
  * @returns {any}
203
177
  */
204
- module.exports.input_async_result = function(id, result) {
205
- const ret = wasm.input_async_result(id, result);
178
+ module.exports.handle = function(msg, book_id) {
179
+ const ret = wasm.handle(msg, isLikeNone(book_id) ? 0x100000001 : (book_id) >>> 0);
206
180
  return ret;
207
181
  };
208
182
 
@@ -231,12 +205,38 @@ module.exports.format_number = function(fmt, value) {
231
205
  };
232
206
 
233
207
  /**
234
- * @param {any} msg
235
- * @param {number | null} [book_id]
208
+ * Render a text value with an Excel number-format code (for the `@` text
209
+ * section). Falls back to the text itself on an unsupported format.
210
+ * @param {string} fmt
211
+ * @param {string} text
212
+ * @returns {string}
213
+ */
214
+ module.exports.format_text = function(fmt, text) {
215
+ let deferred3_0;
216
+ let deferred3_1;
217
+ try {
218
+ const ptr0 = passStringToWasm0(fmt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
221
+ const len1 = WASM_VECTOR_LEN;
222
+ const ret = wasm.format_text(ptr0, len0, ptr1, len1);
223
+ deferred3_0 = ret[0];
224
+ deferred3_1 = ret[1];
225
+ return getStringFromWasm0(ret[0], ret[1]);
226
+ } finally {
227
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
228
+ }
229
+ };
230
+
231
+ /**
232
+ * Input: AsyncFuncResult
233
+ * Output: ActionAffect
234
+ * @param {number} id
235
+ * @param {any} result
236
236
  * @returns {any}
237
237
  */
238
- module.exports.handle = function(msg, book_id) {
239
- const ret = wasm.handle(msg, isLikeNone(book_id) ? 0x100000001 : (book_id) >>> 0);
238
+ module.exports.input_async_result = function(id, result) {
239
+ const ret = wasm.input_async_result(id, result);
240
240
  return ret;
241
241
  };
242
242
 
@@ -1,10 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const handle: (a: any, b: number) => any;
4
5
  export const format_number: (a: number, b: number, c: number) => [number, number];
5
6
  export const format_text: (a: number, b: number, c: number, d: number) => [number, number];
6
7
  export const input_async_result: (a: number, b: any) => any;
7
- export const handle: (a: any, b: number) => any;
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
10
  export const __wbindgen_exn_store: (a: number) => void;
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "JeremyHe <yiliang.he@qq.com>"
5
5
  ],
6
- "version": "1.14.0",
6
+ "version": "1.15.0",
7
7
  "files": [
8
8
  "logisheets_wasm_server_bg.wasm",
9
9
  "logisheets_wasm_server.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logisheets",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "Node.js bindings for LogiSheets — a Rust + WebAssembly spreadsheet engine that reads, edits, and writes real .xlsx (Excel) files (formulas, styles, and structure preserved) with no browser required.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,5 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function handle(msg: any, book_id?: number | null): any;
4
+ /**
5
+ * Render a number with an Excel number-format code, natively via `ssf-rs`
6
+ * (the Rust port of SheetJS `ssf`). Replaces the browser's old dependency on
7
+ * the `ssf` npm package. On an unsupported/invalid format it falls back to the
8
+ * JavaScript `String(value)` representation, matching the previous behavior.
9
+ */
10
+ export function format_number(fmt: string, value: number): string;
3
11
  /**
4
12
  * Render a text value with an Excel number-format code (for the `@` text
5
13
  * section). Falls back to the text itself on an unsupported format.
@@ -10,11 +18,3 @@ export function format_text(fmt: string, text: string): string;
10
18
  * Output: ActionAffect
11
19
  */
12
20
  export function input_async_result(id: number, result: any): any;
13
- /**
14
- * Render a number with an Excel number-format code, natively via `ssf-rs`
15
- * (the Rust port of SheetJS `ssf`). Replaces the browser's old dependency on
16
- * the `ssf` npm package. On an unsupported/invalid format it falls back to the
17
- * JavaScript `String(value)` representation, matching the previous behavior.
18
- */
19
- export function format_number(fmt: string, value: number): string;
20
- export function handle(msg: any, book_id?: number | null): any;
@@ -171,38 +171,12 @@ function debugString(val) {
171
171
  return className;
172
172
  }
173
173
  /**
174
- * Render a text value with an Excel number-format code (for the `@` text
175
- * section). Falls back to the text itself on an unsupported format.
176
- * @param {string} fmt
177
- * @param {string} text
178
- * @returns {string}
179
- */
180
- module.exports.format_text = function(fmt, text) {
181
- let deferred3_0;
182
- let deferred3_1;
183
- try {
184
- const ptr0 = passStringToWasm0(fmt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
185
- const len0 = WASM_VECTOR_LEN;
186
- const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
187
- const len1 = WASM_VECTOR_LEN;
188
- const ret = wasm.format_text(ptr0, len0, ptr1, len1);
189
- deferred3_0 = ret[0];
190
- deferred3_1 = ret[1];
191
- return getStringFromWasm0(ret[0], ret[1]);
192
- } finally {
193
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
194
- }
195
- };
196
-
197
- /**
198
- * Input: AsyncFuncResult
199
- * Output: ActionAffect
200
- * @param {number} id
201
- * @param {any} result
174
+ * @param {any} msg
175
+ * @param {number | null} [book_id]
202
176
  * @returns {any}
203
177
  */
204
- module.exports.input_async_result = function(id, result) {
205
- const ret = wasm.input_async_result(id, result);
178
+ module.exports.handle = function(msg, book_id) {
179
+ const ret = wasm.handle(msg, isLikeNone(book_id) ? 0x100000001 : (book_id) >>> 0);
206
180
  return ret;
207
181
  };
208
182
 
@@ -231,12 +205,38 @@ module.exports.format_number = function(fmt, value) {
231
205
  };
232
206
 
233
207
  /**
234
- * @param {any} msg
235
- * @param {number | null} [book_id]
208
+ * Render a text value with an Excel number-format code (for the `@` text
209
+ * section). Falls back to the text itself on an unsupported format.
210
+ * @param {string} fmt
211
+ * @param {string} text
212
+ * @returns {string}
213
+ */
214
+ module.exports.format_text = function(fmt, text) {
215
+ let deferred3_0;
216
+ let deferred3_1;
217
+ try {
218
+ const ptr0 = passStringToWasm0(fmt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
221
+ const len1 = WASM_VECTOR_LEN;
222
+ const ret = wasm.format_text(ptr0, len0, ptr1, len1);
223
+ deferred3_0 = ret[0];
224
+ deferred3_1 = ret[1];
225
+ return getStringFromWasm0(ret[0], ret[1]);
226
+ } finally {
227
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
228
+ }
229
+ };
230
+
231
+ /**
232
+ * Input: AsyncFuncResult
233
+ * Output: ActionAffect
234
+ * @param {number} id
235
+ * @param {any} result
236
236
  * @returns {any}
237
237
  */
238
- module.exports.handle = function(msg, book_id) {
239
- const ret = wasm.handle(msg, isLikeNone(book_id) ? 0x100000001 : (book_id) >>> 0);
238
+ module.exports.input_async_result = function(id, result) {
239
+ const ret = wasm.input_async_result(id, result);
240
240
  return ret;
241
241
  };
242
242
 
Binary file
@@ -1,10 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const handle: (a: any, b: number) => any;
4
5
  export const format_number: (a: number, b: number, c: number) => [number, number];
5
6
  export const format_text: (a: number, b: number, c: number, d: number) => [number, number];
6
7
  export const input_async_result: (a: number, b: any) => any;
7
- export const handle: (a: any, b: number) => any;
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
10
  export const __wbindgen_exn_store: (a: number) => void;
package/wasm/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "JeremyHe <yiliang.he@qq.com>"
5
5
  ],
6
- "version": "1.14.0",
6
+ "version": "1.15.0",
7
7
  "files": [
8
8
  "logisheets_wasm_server_bg.wasm",
9
9
  "logisheets_wasm_server.js",