@casoon/opengrid 0.15.0 → 0.16.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/CHANGELOG.md +247 -1
- package/README.md +6 -4
- package/engine/opengrid_wasm_bg.wasm +0 -0
- package/loader.d.ts +390 -18
- package/loader.js +473 -90
- package/package.json +8 -1
- package/pkg/opengrid_web_components.d.ts +73 -7
- package/pkg/opengrid_web_components.js +339 -53
- package/pkg/opengrid_web_components_bg.wasm +0 -0
- package/pkg/opengrid_web_components_bg.wasm.d.ts +15 -6
- package/react/index.d.ts +8 -2
- package/react/index.js +9 -3
- package/svelte/Opengrid.svelte +7 -1
- package/svelte/OpengridGrid.svelte +5 -1
- package/svelte/OpengridPivot.svelte +3 -3
- package/svelte/OpengridTable.svelte +1 -1
- package/svelte/index.d.ts +12 -2
- package/svelte/index.js +1 -1
- package/texts/de.d.ts +5 -0
- package/texts/de.js +245 -0
- package/vue/index.d.ts +12 -2
- package/vue/index.js +10 -6
- package/worker.js +1 -2
- package/xlsx/opengrid_xlsx.d.ts +69 -0
- package/xlsx/opengrid_xlsx.js +375 -0
- package/xlsx/opengrid_xlsx_bg.wasm +0 -0
- package/xlsx/opengrid_xlsx_bg.wasm.d.ts +16 -0
- /package/pkg/snippets/{opengrid-web-components-ef3def04de0cb619 → opengrid-web-components-35ed06b453a9b215}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-components-ef3def04de0cb619 → opengrid-web-components-35ed06b453a9b215}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-78fdded9b8a374ed → opengrid-web-core-b41714d4e7311909}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-78fdded9b8a374ed → opengrid-web-core-b41714d4e7311909}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-78fdded9b8a374ed → opengrid-web-core-b41714d4e7311909}/inline2.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casoon/opengrid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Accessible data grid, table and pivot as web components, driven by a portable Rust/WASM query engine — with React, Vue and Svelte components.",
|
|
6
6
|
"keywords": [
|
|
@@ -44,9 +44,14 @@
|
|
|
44
44
|
"svelte": "./svelte/index.js",
|
|
45
45
|
"default": "./svelte/index.js"
|
|
46
46
|
},
|
|
47
|
+
"./texts/de": {
|
|
48
|
+
"types": "./texts/de.d.ts",
|
|
49
|
+
"default": "./texts/de.js"
|
|
50
|
+
},
|
|
47
51
|
"./worker.js": "./worker.js",
|
|
48
52
|
"./pkg/*": "./pkg/*",
|
|
49
53
|
"./engine/*": "./engine/*",
|
|
54
|
+
"./xlsx/*": "./xlsx/*",
|
|
50
55
|
"./package.json": "./package.json"
|
|
51
56
|
},
|
|
52
57
|
"main": "./loader.js",
|
|
@@ -61,8 +66,10 @@
|
|
|
61
66
|
"react/",
|
|
62
67
|
"vue/",
|
|
63
68
|
"svelte/",
|
|
69
|
+
"texts/",
|
|
64
70
|
"pkg/",
|
|
65
71
|
"engine/",
|
|
72
|
+
"xlsx/",
|
|
66
73
|
"LICENSE-MIT",
|
|
67
74
|
"LICENSE-APACHE",
|
|
68
75
|
"README.md",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* mark) first. `options`: `{ delimiter, bom, protectFormulas, null }`, each
|
|
7
7
|
* optional (docs/guides/export.md, point 87).
|
|
8
8
|
*/
|
|
9
|
-
export function export_csv(answer: any, options: any, header: boolean): string;
|
|
9
|
+
export function export_csv(answer: any, options: any, header: boolean, headers: any): string;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* One piece of a JSON array: the rows as objects, joined by commas. `first`:
|
|
@@ -15,6 +15,14 @@ export function export_csv(answer: any, options: any, header: boolean): string;
|
|
|
15
15
|
*/
|
|
16
16
|
export function export_json(answer: any, first: boolean): string;
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* The header texts of the banded columns shown, `{ column: "Band · Title" }`
|
|
20
|
+
* (issue #353): pass it to `exportRows` as `headers` and a file names the band
|
|
21
|
+
* of a banded column. Columns without a band are not in it and keep their
|
|
22
|
+
* field name.
|
|
23
|
+
*/
|
|
24
|
+
export function get_export_headers(host: HTMLElement): any;
|
|
25
|
+
|
|
18
26
|
/**
|
|
19
27
|
* The pivot as it is shown, as CSV (issue #3).
|
|
20
28
|
*
|
|
@@ -71,6 +79,42 @@ export function get_query(host: HTMLElement): any;
|
|
|
71
79
|
*/
|
|
72
80
|
export function get_view(host: HTMLElement): any;
|
|
73
81
|
|
|
82
|
+
/**
|
|
83
|
+
* The words a pivot's export has no data for, as `host` has them now: the
|
|
84
|
+
* texts for a NULL and for an empty dimension value, for the grand total and
|
|
85
|
+
* for a subtotal (with its `{value}`), then what a calculated measure is
|
|
86
|
+
* shown as — a share of the row, the column, the total, a running total
|
|
87
|
+
* (issue #329) — in that order.
|
|
88
|
+
*
|
|
89
|
+
* For `exportPivot` in `loader.js` (issue #331), which hands them to the
|
|
90
|
+
* server that writes the workbook; in the order of `PIVOT_TEXTS` there. Like
|
|
91
|
+
* [`export_csv`], exported for the loader and not part of the documented API.
|
|
92
|
+
*/
|
|
93
|
+
export function pivot_words(host: HTMLElement): string[];
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Every match of the grid's view as a plain table for paper (issue #334).
|
|
97
|
+
*
|
|
98
|
+
* A virtualized grid holds a window of rows, so a stylesheet alone cannot
|
|
99
|
+
* print it, and `beforeprint` cannot wait for a query. The page calls this,
|
|
100
|
+
* awaits it and then prints: the grid asks for every match of its view — the
|
|
101
|
+
* query of `get_query` — and builds a native table that only `@media print`
|
|
102
|
+
* shows, in place of the grid. `afterprint` removes it.
|
|
103
|
+
*
|
|
104
|
+
* Resolves with the number of rows in the table; with `null` where
|
|
105
|
+
* `get_query` answers `null`, and for the table and the pivot, which print
|
|
106
|
+
* whole as they are. Rejects with the provider's error, and with the code
|
|
107
|
+
* `too_many_rows` for more than 10 000 matches.
|
|
108
|
+
*/
|
|
109
|
+
export function prepare_print(host: HTMLElement): Promise<any>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Runs the grid's query again over a source that changed (issue #328), keeping
|
|
113
|
+
* the view, the focus by record, the selection by key and the history. What the
|
|
114
|
+
* "Refresh" button does; a page that took `opengrid-source-changed` over calls it.
|
|
115
|
+
*/
|
|
116
|
+
export function refresh(host: HTMLElement): void;
|
|
117
|
+
|
|
74
118
|
/**
|
|
75
119
|
* Registers `<opengrid-table>` and `<opengrid-grid>`; safe to call more than
|
|
76
120
|
* once.
|
|
@@ -101,6 +145,13 @@ export function set_actions(host: HTMLElement, actions: any): void;
|
|
|
101
145
|
*/
|
|
102
146
|
export function set_cell_state(host: HTMLElement, key: any, column: string, state: string, message?: string | null): void;
|
|
103
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Gives columns a template (issue #317): `{ column: ({ value, text, row, key }) => Node }`,
|
|
150
|
+
* the DOM node a cell shows instead of its text. Never an HTML string; the
|
|
151
|
+
* source's value stays what search, export and the events read.
|
|
152
|
+
*/
|
|
153
|
+
export function set_cell_templates(host: HTMLElement, templates: any): void;
|
|
154
|
+
|
|
104
155
|
/**
|
|
105
156
|
* Sets the choices a column's editor offers (plan point 37).
|
|
106
157
|
*
|
|
@@ -134,6 +185,12 @@ export function set_choices(host: HTMLElement, choices: any): void;
|
|
|
134
185
|
*/
|
|
135
186
|
export function set_columns(host: HTMLElement, columns: any): void;
|
|
136
187
|
|
|
188
|
+
/**
|
|
189
|
+
* The function that builds the panel under an open row (issue #318): `(record,
|
|
190
|
+
* key) => Node`. The grid only.
|
|
191
|
+
*/
|
|
192
|
+
export function set_detail_renderer(host: HTMLElement, renderer: any): void;
|
|
193
|
+
|
|
137
194
|
/**
|
|
138
195
|
* Sets the per-column display formats (plan point 42).
|
|
139
196
|
*
|
|
@@ -233,16 +290,22 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
233
290
|
|
|
234
291
|
export interface InitOutput {
|
|
235
292
|
readonly memory: WebAssembly.Memory;
|
|
236
|
-
readonly export_csv: (a: any, b: any, c: number) => [number, number, number, number];
|
|
293
|
+
readonly export_csv: (a: any, b: any, c: number, d: any) => [number, number, number, number];
|
|
237
294
|
readonly export_json: (a: any, b: number) => [number, number, number, number];
|
|
295
|
+
readonly get_export_headers: (a: any) => any;
|
|
238
296
|
readonly get_pivot: (a: any, b: any) => [number, number, number];
|
|
239
297
|
readonly get_query: (a: any) => any;
|
|
240
298
|
readonly get_view: (a: any) => any;
|
|
299
|
+
readonly pivot_words: (a: any) => [number, number];
|
|
300
|
+
readonly prepare_print: (a: any) => any;
|
|
301
|
+
readonly refresh: (a: any) => void;
|
|
241
302
|
readonly register: () => [number, number];
|
|
242
303
|
readonly set_actions: (a: any, b: any) => void;
|
|
243
304
|
readonly set_cell_state: (a: any, b: any, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
305
|
+
readonly set_cell_templates: (a: any, b: any) => void;
|
|
244
306
|
readonly set_choices: (a: any, b: any) => void;
|
|
245
307
|
readonly set_columns: (a: any, b: any) => void;
|
|
308
|
+
readonly set_detail_renderer: (a: any, b: any) => void;
|
|
246
309
|
readonly set_formats: (a: any, b: any) => void;
|
|
247
310
|
readonly set_provider: (a: any, b: any) => void;
|
|
248
311
|
readonly set_row_state: (a: any, b: number, c: number, d: number, e: number, f: any) => void;
|
|
@@ -250,12 +313,14 @@ export interface InitOutput {
|
|
|
250
313
|
readonly set_validators: (a: any, b: any) => void;
|
|
251
314
|
readonly set_values: (a: any, b: any) => void;
|
|
252
315
|
readonly set_view: (a: any, b: any, c: any) => void;
|
|
253
|
-
readonly
|
|
316
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___web_sys_a82a67fb9e0c1518___features__gen_HtmlElement__HtmlElement__alloc_42d2b33bd937efdb___string__String__core_37ee0ce0c4cd57d5___option__Option_alloc_42d2b33bd937efdb___string__String___core_37ee0ce0c4cd57d5___option__Option_alloc_42d2b33bd937efdb___string__String_______true_: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
254
317
|
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___wasm_bindgen_4cfd459b66780f67___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_4cfd459b66780f67___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
255
|
-
readonly
|
|
256
|
-
readonly
|
|
257
|
-
readonly
|
|
258
|
-
readonly
|
|
318
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___js_sys_167d7a02263935a1___Function_fn_wasm_bindgen_4cfd459b66780f67___JsValue_____wasm_bindgen_4cfd459b66780f67___sys__Undefined___js_sys_167d7a02263935a1___Function_fn_wasm_bindgen_4cfd459b66780f67___JsValue_____wasm_bindgen_4cfd459b66780f67___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
319
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___wasm_bindgen_4cfd459b66780f67___JsValue______true_: (a: number, b: number, c: any) => void;
|
|
320
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___wasm_bindgen_4cfd459b66780f67___JsValue______true__2: (a: number, b: number, c: any) => void;
|
|
321
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___wasm_bindgen_4cfd459b66780f67___JsValue______true__3: (a: number, b: number, c: any) => void;
|
|
322
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___wasm_bindgen_4cfd459b66780f67___JsValue______true__5: (a: number, b: number, c: any) => void;
|
|
323
|
+
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___wasm_bindgen_4cfd459b66780f67___JsValue______true__6: (a: number, b: number, c: any) => void;
|
|
259
324
|
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke___u32______true_: (a: number, b: number, c: number) => void;
|
|
260
325
|
readonly wasm_bindgen_4cfd459b66780f67___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
261
326
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -266,6 +331,7 @@ export interface InitOutput {
|
|
|
266
331
|
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
267
332
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
268
333
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
334
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
269
335
|
readonly __wbindgen_start: () => void;
|
|
270
336
|
}
|
|
271
337
|
|