@casoon/opengrid 0.16.0 → 0.17.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 +36 -1
- package/README.md +3 -3
- package/collation/opengrid_collation.d.ts +47 -0
- package/collation/opengrid_collation.js +256 -0
- package/collation/opengrid_collation_bg.wasm +0 -0
- package/collation/opengrid_collation_bg.wasm.d.ts +10 -0
- package/collation.js +78 -0
- package/engine/opengrid_wasm.d.ts +18 -1
- package/engine/opengrid_wasm.js +76 -0
- package/engine/opengrid_wasm_bg.wasm +0 -0
- package/engine/opengrid_wasm_bg.wasm.d.ts +5 -1
- package/loader.d.ts +15 -0
- package/loader.js +12 -5
- package/package.json +4 -1
- package/pkg/opengrid_web_components.d.ts +10 -10
- package/pkg/opengrid_web_components.js +50 -50
- package/pkg/opengrid_web_components_bg.wasm +0 -0
- package/pkg/opengrid_web_components_bg.wasm.d.ts +10 -10
- package/react/index.d.ts +2 -0
- package/react/index.js +1 -0
- package/svelte/OpengridGrid.svelte +2 -0
- package/svelte/index.d.ts +2 -0
- package/vue/index.d.ts +2 -0
- package/vue/index.js +1 -0
- package/worker.js +6 -1
- package/xlsx/opengrid_xlsx_bg.wasm +0 -0
- /package/pkg/snippets/{opengrid-web-components-35ed06b453a9b215 → opengrid-web-components-ae047af7b34e4f04}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-components-35ed06b453a9b215 → opengrid-web-components-ae047af7b34e4f04}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-b41714d4e7311909 → opengrid-web-core-b158b7dd980e3998}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-b41714d4e7311909 → opengrid-web-core-b158b7dd980e3998}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-b41714d4e7311909 → opengrid-web-core-b158b7dd980e3998}/inline2.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,40 @@ Two things belong in every release entry and are easy to leave out:
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.17.0] - 2026-11-13
|
|
23
|
+
|
|
24
|
+
Not yet verified by a screen reader: no pass with assistive technology has been recorded for this
|
|
25
|
+
release ([#5](https://github.com/casoon/opengrid/issues/5)). The keyboard and `axe-core` checks run on
|
|
26
|
+
every change.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **Query:** a sort key may order text by a locale: `"collation": "de"` (rule S4a). The engine,
|
|
31
|
+
SQLite and PostgreSQL give the same order for Latin, Greek and Cyrillic text. See
|
|
32
|
+
[Query semantics](docs/guides/query-semantics.mdx)
|
|
33
|
+
([#391](https://github.com/casoon/opengrid/issues/391)).
|
|
34
|
+
- **Query:** the capability `collation`; the planner leaves a sort by a locale to the client where
|
|
35
|
+
a source does not declare it.
|
|
36
|
+
- **Grid:** `collation="de"` sorts the grid's text columns by a locale (`collation` in the
|
|
37
|
+
framework components). See [Sorting text by a locale](docs/api.md#sorting-text-by-a-locale).
|
|
38
|
+
- **Package:** the collation module, `collation/`, about 330 KiB brotli. The providers load it
|
|
39
|
+
when a query first sorts by a locale in the browser, and not otherwise; `Engine.set_collator`
|
|
40
|
+
and `Planner.set_collator` take it.
|
|
41
|
+
- **Crates:** `opengrid-engine` has the feature `icu` (ICU4X's collator, `collation::Icu`);
|
|
42
|
+
`opengrid-connector` and `opengrid-connector-sqlite` turn it on.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- **Crates:** `opengrid_query::Collation` has the variant `Locale` and is no longer `Copy`.
|
|
47
|
+
**What breaks:** a copied collation is cloned now and a `match` on it needs the new arm;
|
|
48
|
+
`QueryError::CollationNotText`, `ExecuteError::Collation`, `DataSourceCapabilities::collation`
|
|
49
|
+
and `SortKey::collated` are new and matter to code that writes these types out in full.
|
|
50
|
+
- **Build:** the engine module is 4.2 KiB larger and the element module 1.4 KiB; their budgets
|
|
51
|
+
are raised to match.
|
|
52
|
+
- **Pages:** the live demo's first grid sets its header, filter row and facets apart from the
|
|
53
|
+
page behind it, its checkboxes and fields have a darker outline and follow the site's dark
|
|
54
|
+
theme; the card under the hero on the start page has space above it.
|
|
55
|
+
|
|
22
56
|
## [0.16.0] - 2026-11-12
|
|
23
57
|
|
|
24
58
|
Not yet verified by a screen reader: no pass with assistive technology has been recorded for this
|
|
@@ -1630,7 +1664,8 @@ tested.
|
|
|
1630
1664
|
tested: React 18 rendering on the server, SvelteKit, Nuxt, Next.js and Astro
|
|
1631
1665
|
as real applications. A Vite production build needs `loadOpengrid({ moduleUrl })`.
|
|
1632
1666
|
|
|
1633
|
-
[Unreleased]: https://github.com/casoon/opengrid/compare/v0.
|
|
1667
|
+
[Unreleased]: https://github.com/casoon/opengrid/compare/v0.17.0...HEAD
|
|
1668
|
+
[0.17.0]: https://github.com/casoon/opengrid/compare/v0.16.0...v0.17.0
|
|
1634
1669
|
[0.16.0]: https://github.com/casoon/opengrid/compare/v0.15.0...v0.16.0
|
|
1635
1670
|
[0.15.0]: https://github.com/casoon/opengrid/compare/v0.14.0...v0.15.0
|
|
1636
1671
|
[0.14.0]: https://github.com/casoon/opengrid/compare/v0.13.0...v0.14.0
|
package/README.md
CHANGED
|
@@ -57,9 +57,9 @@ as the npm package, so give every `opengrid-*` crate the same one:
|
|
|
57
57
|
|
|
58
58
|
```toml
|
|
59
59
|
[dependencies]
|
|
60
|
-
opengrid-server = "0.
|
|
61
|
-
opengrid-connector-sqlite = "0.
|
|
62
|
-
opengrid-engine = "0.
|
|
60
|
+
opengrid-server = "0.17" # the gateway, as a library
|
|
61
|
+
opengrid-connector-sqlite = "0.17" # or opengrid-datasource-postgres
|
|
62
|
+
opengrid-engine = "0.17" # the engine alone, native
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
While the version is 0.x, a minor bump may break the Rust API
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The sort keys of `locale` for a batch of strings.
|
|
6
|
+
*
|
|
7
|
+
* `texts` is every string's UTF-8 one after the other and `ends` where each
|
|
8
|
+
* one ends in it. The answer is packed the same way round: the end of every
|
|
9
|
+
* key as a little-endian `u32`, then the keys' bytes — one buffer, since a
|
|
10
|
+
* call across two modules copies each argument once.
|
|
11
|
+
*/
|
|
12
|
+
export function sort_keys(locale: string, texts: Uint8Array, ends: Uint32Array): Uint8Array;
|
|
13
|
+
|
|
14
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
15
|
+
|
|
16
|
+
export interface InitOutput {
|
|
17
|
+
readonly memory: WebAssembly.Memory;
|
|
18
|
+
readonly sort_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
19
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
20
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
21
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
22
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
23
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
24
|
+
readonly __wbindgen_start: () => void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
31
|
+
* a precompiled `WebAssembly.Module`.
|
|
32
|
+
*
|
|
33
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
34
|
+
*
|
|
35
|
+
* @returns {InitOutput}
|
|
36
|
+
*/
|
|
37
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
41
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
42
|
+
*
|
|
43
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
44
|
+
*
|
|
45
|
+
* @returns {Promise<InitOutput>}
|
|
46
|
+
*/
|
|
47
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/* @ts-self-types="./opengrid_collation.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The sort keys of `locale` for a batch of strings.
|
|
5
|
+
*
|
|
6
|
+
* `texts` is every string's UTF-8 one after the other and `ends` where each
|
|
7
|
+
* one ends in it. The answer is packed the same way round: the end of every
|
|
8
|
+
* key as a little-endian `u32`, then the keys' bytes — one buffer, since a
|
|
9
|
+
* call across two modules copies each argument once.
|
|
10
|
+
* @param {string} locale
|
|
11
|
+
* @param {Uint8Array} texts
|
|
12
|
+
* @param {Uint32Array} ends
|
|
13
|
+
* @returns {Uint8Array}
|
|
14
|
+
*/
|
|
15
|
+
export function sort_keys(locale, texts, ends) {
|
|
16
|
+
const ptr0 = passStringToWasm0(locale, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
17
|
+
const len0 = WASM_VECTOR_LEN;
|
|
18
|
+
const ptr1 = passArray8ToWasm0(texts, wasm.__wbindgen_malloc);
|
|
19
|
+
const len1 = WASM_VECTOR_LEN;
|
|
20
|
+
const ptr2 = passArray32ToWasm0(ends, wasm.__wbindgen_malloc);
|
|
21
|
+
const len2 = WASM_VECTOR_LEN;
|
|
22
|
+
const ret = wasm.sort_keys(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
23
|
+
if (ret[3]) {
|
|
24
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
25
|
+
}
|
|
26
|
+
var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
27
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
28
|
+
return v4;
|
|
29
|
+
}
|
|
30
|
+
function __wbg_get_imports() {
|
|
31
|
+
const import0 = {
|
|
32
|
+
__proto__: null,
|
|
33
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
34
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
35
|
+
return ret;
|
|
36
|
+
},
|
|
37
|
+
__wbindgen_init_externref_table: function() {
|
|
38
|
+
const table = wasm.__wbindgen_externrefs;
|
|
39
|
+
const offset = table.grow(4);
|
|
40
|
+
table.set(0, undefined);
|
|
41
|
+
table.set(offset + 0, undefined);
|
|
42
|
+
table.set(offset + 1, null);
|
|
43
|
+
table.set(offset + 2, true);
|
|
44
|
+
table.set(offset + 3, false);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
__proto__: null,
|
|
49
|
+
"./opengrid_collation_bg.js": import0,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
54
|
+
ptr = ptr >>> 0;
|
|
55
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getStringFromWasm0(ptr, len) {
|
|
59
|
+
return decodeText(ptr >>> 0, len);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let cachedUint32ArrayMemory0 = null;
|
|
63
|
+
function getUint32ArrayMemory0() {
|
|
64
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
65
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
66
|
+
}
|
|
67
|
+
return cachedUint32ArrayMemory0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let cachedUint8ArrayMemory0 = null;
|
|
71
|
+
function getUint8ArrayMemory0() {
|
|
72
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
73
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
74
|
+
}
|
|
75
|
+
return cachedUint8ArrayMemory0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
79
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
80
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
81
|
+
WASM_VECTOR_LEN = arg.length;
|
|
82
|
+
return ptr;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
86
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
87
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
88
|
+
WASM_VECTOR_LEN = arg.length;
|
|
89
|
+
return ptr;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
93
|
+
if (realloc === undefined) {
|
|
94
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
95
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
96
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
97
|
+
WASM_VECTOR_LEN = buf.length;
|
|
98
|
+
return ptr;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let len = arg.length;
|
|
102
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
103
|
+
|
|
104
|
+
const mem = getUint8ArrayMemory0();
|
|
105
|
+
|
|
106
|
+
let offset = 0;
|
|
107
|
+
|
|
108
|
+
for (; offset < len; offset++) {
|
|
109
|
+
const code = arg.charCodeAt(offset);
|
|
110
|
+
if (code > 0x7F) break;
|
|
111
|
+
mem[ptr + offset] = code;
|
|
112
|
+
}
|
|
113
|
+
if (offset !== len) {
|
|
114
|
+
if (offset !== 0) {
|
|
115
|
+
arg = arg.slice(offset);
|
|
116
|
+
}
|
|
117
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
118
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
119
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
120
|
+
|
|
121
|
+
offset += ret.written;
|
|
122
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
WASM_VECTOR_LEN = offset;
|
|
126
|
+
return ptr;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function takeFromExternrefTable0(idx) {
|
|
130
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
131
|
+
wasm.__externref_table_dealloc(idx);
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
136
|
+
cachedTextDecoder.decode();
|
|
137
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
138
|
+
let numBytesDecoded = 0;
|
|
139
|
+
function decodeText(ptr, len) {
|
|
140
|
+
numBytesDecoded += len;
|
|
141
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
142
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
143
|
+
cachedTextDecoder.decode();
|
|
144
|
+
numBytesDecoded = len;
|
|
145
|
+
}
|
|
146
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const cachedTextEncoder = new TextEncoder();
|
|
150
|
+
|
|
151
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
152
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
153
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
154
|
+
view.set(buf);
|
|
155
|
+
return {
|
|
156
|
+
read: arg.length,
|
|
157
|
+
written: buf.length
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
let WASM_VECTOR_LEN = 0;
|
|
163
|
+
|
|
164
|
+
let wasmModule, wasmInstance, wasm;
|
|
165
|
+
function __wbg_finalize_init(instance, module) {
|
|
166
|
+
wasmInstance = instance;
|
|
167
|
+
wasm = instance.exports;
|
|
168
|
+
wasmModule = module;
|
|
169
|
+
cachedUint32ArrayMemory0 = null;
|
|
170
|
+
cachedUint8ArrayMemory0 = null;
|
|
171
|
+
wasm.__wbindgen_start();
|
|
172
|
+
return wasm;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
async function __wbg_load(module, imports) {
|
|
176
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
177
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
178
|
+
try {
|
|
179
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
182
|
+
|
|
183
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
184
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
185
|
+
|
|
186
|
+
} else { throw e; }
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const bytes = await module.arrayBuffer();
|
|
191
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
192
|
+
} else {
|
|
193
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
194
|
+
|
|
195
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
196
|
+
return { instance, module };
|
|
197
|
+
} else {
|
|
198
|
+
return instance;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function expectedResponseType(type) {
|
|
203
|
+
switch (type) {
|
|
204
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
205
|
+
}
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function initSync(module) {
|
|
211
|
+
if (wasm !== undefined) return wasm;
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
if (module !== undefined) {
|
|
215
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
216
|
+
({module} = module)
|
|
217
|
+
} else {
|
|
218
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const imports = __wbg_get_imports();
|
|
223
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
224
|
+
module = new WebAssembly.Module(module);
|
|
225
|
+
}
|
|
226
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
227
|
+
return __wbg_finalize_init(instance, module);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
async function __wbg_init(module_or_path) {
|
|
231
|
+
if (wasm !== undefined) return wasm;
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
if (module_or_path !== undefined) {
|
|
235
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
236
|
+
({module_or_path} = module_or_path)
|
|
237
|
+
} else {
|
|
238
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (module_or_path === undefined) {
|
|
243
|
+
module_or_path = new URL('opengrid_collation_bg.wasm', import.meta.url);
|
|
244
|
+
}
|
|
245
|
+
const imports = __wbg_get_imports();
|
|
246
|
+
|
|
247
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
248
|
+
module_or_path = fetch(module_or_path);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
252
|
+
|
|
253
|
+
return __wbg_finalize_init(instance, module);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const sort_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
5
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
6
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
7
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
8
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
9
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
10
|
+
export const __wbindgen_start: () => void;
|
package/collation.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The collator of the engine (rule S4a): loaded when a query first sorts by a
|
|
3
|
+
* locale.
|
|
4
|
+
*
|
|
5
|
+
* A sort key may name a locale — `{ "field": "name", "collation": "de" }` — and
|
|
6
|
+
* the engine then needs the collation's tables, some hundred kilobytes it does
|
|
7
|
+
* not carry. They are a module of their own (`collation/`, built by
|
|
8
|
+
* `just wasm-build-collation`); a page that never sorts by a locale does not
|
|
9
|
+
* fetch it. The providers of the package call `withCollator` before the engine
|
|
10
|
+
* runs a query.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** A sort key's collation that is not `binary`, in a query or a plan as JSON. */
|
|
14
|
+
const NAMES_A_LOCALE = /"collation"\s*:\s*"(?!binary")/;
|
|
15
|
+
|
|
16
|
+
/** The engines and planners that have their collator. */
|
|
17
|
+
const given = new WeakSet();
|
|
18
|
+
|
|
19
|
+
/** The collation module, loaded once; a failed load is not kept. */
|
|
20
|
+
let module;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Whether `json` — a query, or the client half of a plan — sorts by a locale.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} json
|
|
26
|
+
* @returns {boolean}
|
|
27
|
+
*/
|
|
28
|
+
export function sortsByLocale(json) {
|
|
29
|
+
return NAMES_A_LOCALE.test(json);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Loads the collation module and gives `engine` its collator. Once per engine;
|
|
34
|
+
* later calls answer at once.
|
|
35
|
+
*
|
|
36
|
+
* @param {{set_collator: Function}} engine an `Engine` or a `Planner`.
|
|
37
|
+
* @returns {Promise<void>}
|
|
38
|
+
*/
|
|
39
|
+
export async function giveCollator(engine) {
|
|
40
|
+
if (given.has(engine)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
module ??= import("./collation/opengrid_collation.js").then(async (glue) => {
|
|
44
|
+
await glue.default();
|
|
45
|
+
return glue;
|
|
46
|
+
});
|
|
47
|
+
let glue;
|
|
48
|
+
try {
|
|
49
|
+
glue = await module;
|
|
50
|
+
} catch (error) {
|
|
51
|
+
module = undefined;
|
|
52
|
+
const failed = new Error(
|
|
53
|
+
`the collation module did not load (${error?.message ?? error})`,
|
|
54
|
+
);
|
|
55
|
+
failed.code = "module_not_loaded";
|
|
56
|
+
throw failed;
|
|
57
|
+
}
|
|
58
|
+
engine.set_collator(glue.sort_keys);
|
|
59
|
+
given.add(engine);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Runs `run` once `engine` can answer `json`: at once when the query sorts by
|
|
64
|
+
* no locale or the engine has its collator — the answer is then `run`'s own,
|
|
65
|
+
* not a promise — and after the module has loaded otherwise.
|
|
66
|
+
*
|
|
67
|
+
* @template T
|
|
68
|
+
* @param {{set_collator: Function}} engine an `Engine` or a `Planner`.
|
|
69
|
+
* @param {string} json the query, or the client half of a plan.
|
|
70
|
+
* @param {() => T} run
|
|
71
|
+
* @returns {T | Promise<T>}
|
|
72
|
+
*/
|
|
73
|
+
export function withCollator(engine, json, run) {
|
|
74
|
+
if (given.has(engine) || !sortsByLocale(json)) {
|
|
75
|
+
return run();
|
|
76
|
+
}
|
|
77
|
+
return giveCollator(engine).then(run);
|
|
78
|
+
}
|
|
@@ -56,6 +56,14 @@ export class Engine {
|
|
|
56
56
|
* hand the element.
|
|
57
57
|
*/
|
|
58
58
|
pivot_columns(pivot_json: string): Uint8Array;
|
|
59
|
+
/**
|
|
60
|
+
* Gives the engine its collator (rule S4a, issue #391): `sort_keys` of
|
|
61
|
+
* the collation module, which a page loads when a query first sorts by a
|
|
62
|
+
* locale — the providers of the package do. Until then such a sort is
|
|
63
|
+
* refused; a sort without a locale never needs it. It holds for every
|
|
64
|
+
* engine and planner of this module.
|
|
65
|
+
*/
|
|
66
|
+
set_collator(sort_keys: any): void;
|
|
59
67
|
/**
|
|
60
68
|
* The names of the registered sources, in unspecified order.
|
|
61
69
|
*/
|
|
@@ -133,6 +141,11 @@ export class Planner {
|
|
|
133
141
|
* [`finish`](Planner::finish), or `null` when the source answers it all.
|
|
134
142
|
*/
|
|
135
143
|
plan(query_json: string, mode: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* The collator for the half of a query the planner finishes here, as
|
|
146
|
+
* [`Engine::set_collator`].
|
|
147
|
+
*/
|
|
148
|
+
set_collator(sort_keys: any): void;
|
|
136
149
|
}
|
|
137
150
|
|
|
138
151
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -148,6 +161,7 @@ export interface InitOutput {
|
|
|
148
161
|
readonly engine_new: () => number;
|
|
149
162
|
readonly engine_pivot: (a: number, b: number, c: number) => [number, number, number, number];
|
|
150
163
|
readonly engine_pivot_columns: (a: number, b: number, c: number) => [number, number, number, number];
|
|
164
|
+
readonly engine_set_collator: (a: number, b: any) => void;
|
|
151
165
|
readonly engine_source_names: (a: number) => [number, number];
|
|
152
166
|
readonly engine_stats: (a: number) => [number, number];
|
|
153
167
|
readonly engine_view_query: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
@@ -155,9 +169,12 @@ export interface InitOutput {
|
|
|
155
169
|
readonly planner_finish_columns: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
156
170
|
readonly planner_new: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
157
171
|
readonly planner_plan: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
158
|
-
readonly
|
|
172
|
+
readonly planner_set_collator: (a: number, b: any) => void;
|
|
159
173
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
160
174
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
175
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
176
|
+
readonly __externref_table_alloc: () => number;
|
|
177
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
161
178
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
162
179
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
163
180
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
package/engine/opengrid_wasm.js
CHANGED
|
@@ -162,6 +162,17 @@ export class Engine {
|
|
|
162
162
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
163
163
|
return v2;
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Gives the engine its collator (rule S4a, issue #391): `sort_keys` of
|
|
167
|
+
* the collation module, which a page loads when a query first sorts by a
|
|
168
|
+
* locale — the providers of the package do. Until then such a sort is
|
|
169
|
+
* refused; a sort without a locale never needs it. It holds for every
|
|
170
|
+
* engine and planner of this module.
|
|
171
|
+
* @param {any} sort_keys
|
|
172
|
+
*/
|
|
173
|
+
set_collator(sort_keys) {
|
|
174
|
+
wasm.engine_set_collator(this.__wbg_ptr, sort_keys);
|
|
175
|
+
}
|
|
165
176
|
/**
|
|
166
177
|
* The names of the registered sources, in unspecified order.
|
|
167
178
|
* @returns {string[]}
|
|
@@ -373,6 +384,14 @@ export class Planner {
|
|
|
373
384
|
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
374
385
|
}
|
|
375
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* The collator for the half of a query the planner finishes here, as
|
|
389
|
+
* [`Engine::set_collator`].
|
|
390
|
+
* @param {any} sort_keys
|
|
391
|
+
*/
|
|
392
|
+
set_collator(sort_keys) {
|
|
393
|
+
wasm.planner_set_collator(this.__wbg_ptr, sort_keys);
|
|
394
|
+
}
|
|
376
395
|
}
|
|
377
396
|
if (Symbol.dispose) Planner.prototype[Symbol.dispose] = Planner.prototype.free;
|
|
378
397
|
function __wbg_get_imports() {
|
|
@@ -382,9 +401,33 @@ function __wbg_get_imports() {
|
|
|
382
401
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
383
402
|
return ret;
|
|
384
403
|
},
|
|
404
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
405
|
+
const val = arg0;
|
|
406
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
407
|
+
return ret;
|
|
408
|
+
},
|
|
409
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
410
|
+
const obj = arg1;
|
|
411
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
412
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
+
var len1 = WASM_VECTOR_LEN;
|
|
414
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
415
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
416
|
+
},
|
|
385
417
|
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
386
418
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
387
419
|
},
|
|
420
|
+
__wbg_call_aa4db02d48413721: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
421
|
+
const ret = arg1.call(arg2, getStringFromWasm0(arg3, arg4), getArrayU8FromWasm0(arg5, arg6), getArrayU32FromWasm0(arg7, arg8));
|
|
422
|
+
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
423
|
+
const len1 = WASM_VECTOR_LEN;
|
|
424
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
425
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
426
|
+
}, arguments); },
|
|
427
|
+
__wbg_message_5539b0c90e0851ee: function(arg0) {
|
|
428
|
+
const ret = arg0.message;
|
|
429
|
+
return ret;
|
|
430
|
+
},
|
|
388
431
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
389
432
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
390
433
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -413,6 +456,12 @@ const PlannerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
413
456
|
? { register: () => {}, unregister: () => {} }
|
|
414
457
|
: new FinalizationRegistry(ptr => wasm.__wbg_planner_free(ptr, 1));
|
|
415
458
|
|
|
459
|
+
function addToExternrefTable0(obj) {
|
|
460
|
+
const idx = wasm.__externref_table_alloc();
|
|
461
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
462
|
+
return idx;
|
|
463
|
+
}
|
|
464
|
+
|
|
416
465
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
417
466
|
ptr = ptr >>> 0;
|
|
418
467
|
const mem = getDataViewMemory0();
|
|
@@ -424,6 +473,11 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
424
473
|
return result;
|
|
425
474
|
}
|
|
426
475
|
|
|
476
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
477
|
+
ptr = ptr >>> 0;
|
|
478
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
479
|
+
}
|
|
480
|
+
|
|
427
481
|
function getArrayU8FromWasm0(ptr, len) {
|
|
428
482
|
ptr = ptr >>> 0;
|
|
429
483
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -441,6 +495,14 @@ function getStringFromWasm0(ptr, len) {
|
|
|
441
495
|
return decodeText(ptr >>> 0, len);
|
|
442
496
|
}
|
|
443
497
|
|
|
498
|
+
let cachedUint32ArrayMemory0 = null;
|
|
499
|
+
function getUint32ArrayMemory0() {
|
|
500
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
501
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
502
|
+
}
|
|
503
|
+
return cachedUint32ArrayMemory0;
|
|
504
|
+
}
|
|
505
|
+
|
|
444
506
|
let cachedUint8ArrayMemory0 = null;
|
|
445
507
|
function getUint8ArrayMemory0() {
|
|
446
508
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -449,6 +511,19 @@ function getUint8ArrayMemory0() {
|
|
|
449
511
|
return cachedUint8ArrayMemory0;
|
|
450
512
|
}
|
|
451
513
|
|
|
514
|
+
function handleError(f, args) {
|
|
515
|
+
try {
|
|
516
|
+
return f.apply(this, args);
|
|
517
|
+
} catch (e) {
|
|
518
|
+
const idx = addToExternrefTable0(e);
|
|
519
|
+
wasm.__wbindgen_exn_store(idx);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
function isLikeNone(x) {
|
|
524
|
+
return x === undefined || x === null;
|
|
525
|
+
}
|
|
526
|
+
|
|
452
527
|
function passArray8ToWasm0(arg, malloc) {
|
|
453
528
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
454
529
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -534,6 +609,7 @@ function __wbg_finalize_init(instance, module) {
|
|
|
534
609
|
wasm = instance.exports;
|
|
535
610
|
wasmModule = module;
|
|
536
611
|
cachedDataViewMemory0 = null;
|
|
612
|
+
cachedUint32ArrayMemory0 = null;
|
|
537
613
|
cachedUint8ArrayMemory0 = null;
|
|
538
614
|
wasm.__wbindgen_start();
|
|
539
615
|
return wasm;
|
|
Binary file
|
|
@@ -10,6 +10,7 @@ export const engine_load_rows: (a: number, b: number, c: number, d: number, e: n
|
|
|
10
10
|
export const engine_new: () => number;
|
|
11
11
|
export const engine_pivot: (a: number, b: number, c: number) => [number, number, number, number];
|
|
12
12
|
export const engine_pivot_columns: (a: number, b: number, c: number) => [number, number, number, number];
|
|
13
|
+
export const engine_set_collator: (a: number, b: any) => void;
|
|
13
14
|
export const engine_source_names: (a: number) => [number, number];
|
|
14
15
|
export const engine_stats: (a: number) => [number, number];
|
|
15
16
|
export const engine_view_query: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
@@ -17,9 +18,12 @@ export const planner_finish: (a: number, b: number, c: number, d: number, e: num
|
|
|
17
18
|
export const planner_finish_columns: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
18
19
|
export const planner_new: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
19
20
|
export const planner_plan: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
20
|
-
export const
|
|
21
|
+
export const planner_set_collator: (a: number, b: any) => void;
|
|
21
22
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
22
23
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
24
|
+
export const __wbindgen_exn_store: (a: number) => void;
|
|
25
|
+
export const __externref_table_alloc: () => number;
|
|
26
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
23
27
|
export const __externref_table_dealloc: (a: number) => void;
|
|
24
28
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
25
29
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
package/loader.d.ts
CHANGED
|
@@ -346,6 +346,13 @@ export interface Engine {
|
|
|
346
346
|
execute(queryJson: string): string;
|
|
347
347
|
/** The result in the binary form — what the tab and worker providers answer. */
|
|
348
348
|
execute_columns(queryJson: string): Uint8Array;
|
|
349
|
+
/**
|
|
350
|
+
* Gives the engine its collator: `sort_keys` of the collation module
|
|
351
|
+
* (`collation/opengrid_collation.js`). A sort key that names a locale needs
|
|
352
|
+
* it; the providers of the package load the module and call this when a
|
|
353
|
+
* query first sorts by one.
|
|
354
|
+
*/
|
|
355
|
+
set_collator(sortKeys: (locale: string, texts: Uint8Array, ends: Uint32Array) => Uint8Array): void;
|
|
349
356
|
/** What it holds, as JSON (see `EngineStats`). */
|
|
350
357
|
stats(): string;
|
|
351
358
|
/** A pivot over the engine's sources, as JSON (issue #28). */
|
|
@@ -400,6 +407,8 @@ export interface PlannerLike {
|
|
|
400
407
|
plan(queryJson: string, mode: string): string;
|
|
401
408
|
/** Finishes the client half over the source's answer; the result as JSON. */
|
|
402
409
|
finish(clientQueryJson: string, resultJson: string): string;
|
|
410
|
+
/** The collator for the client half, as `Engine.set_collator`. */
|
|
411
|
+
set_collator(sortKeys: (locale: string, texts: Uint8Array, ends: Uint32Array) => Uint8Array): void;
|
|
403
412
|
/** The same over an answer in the binary form; the result as bytes. */
|
|
404
413
|
finish_columns(clientQueryJson: string, result: Uint8Array): Uint8Array;
|
|
405
414
|
}
|
|
@@ -1447,6 +1456,12 @@ export interface OpengridGridAttributes {
|
|
|
1447
1456
|
* and-ed onto every query the grid sends. Not the reader's and not in the view.
|
|
1448
1457
|
*/
|
|
1449
1458
|
filter?: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* The locale text columns sort by — `de`, `sv`, `sr-Latn`, `und` for the root
|
|
1461
|
+
* collation. Every sort key of the grid on a text column carries it; without
|
|
1462
|
+
* it text sorts by code point. Not in the view.
|
|
1463
|
+
*/
|
|
1464
|
+
collation?: string;
|
|
1450
1465
|
"group-by"?: string;
|
|
1451
1466
|
/** The field holding a row's parent key: the rows show as a tree. */
|
|
1452
1467
|
tree?: string;
|
package/loader.js
CHANGED
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
// follows the import, and the `new URL("…_bg.wasm", import.meta.url)` inside the
|
|
41
41
|
// glue, so the `.wasm` ends up in its output. `moduleUrl` replaces it.
|
|
42
42
|
import * as packaged from "./pkg/opengrid_web_components.js";
|
|
43
|
+
// The engine's collator, for a query that sorts by a locale (rule S4a).
|
|
44
|
+
import { withCollator } from "./collation.js";
|
|
43
45
|
|
|
44
46
|
/** Set once the first `loadOpengrid` call has run. */
|
|
45
47
|
let loading;
|
|
@@ -452,8 +454,9 @@ export function createLocalProvider(engine) {
|
|
|
452
454
|
watch(host) {
|
|
453
455
|
watchers.watch(host);
|
|
454
456
|
},
|
|
457
|
+
/** The answer itself, or a promise of it while the collator loads (S4a). */
|
|
455
458
|
execute(queryJson) {
|
|
456
|
-
return engine.execute_columns(queryJson);
|
|
459
|
+
return withCollator(engine, queryJson, () => engine.execute_columns(queryJson));
|
|
457
460
|
},
|
|
458
461
|
/** What the engine holds (issue #70), as the worker provider says it. */
|
|
459
462
|
async stats() {
|
|
@@ -863,10 +866,14 @@ export function createHybridProvider({ remote, planner, mode = "auto", onPlan }
|
|
|
863
866
|
if (!plan.client) {
|
|
864
867
|
return partial;
|
|
865
868
|
}
|
|
866
|
-
// The engine finishes in the form the source answered in
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
869
|
+
// The engine finishes in the form the source answered in — with its
|
|
870
|
+
// collator, when the client's half sorts by a locale (S4a).
|
|
871
|
+
const client = JSON.stringify(plan.client);
|
|
872
|
+
return withCollator(planner, client, () =>
|
|
873
|
+
typeof partial === "string"
|
|
874
|
+
? planner.finish(client, partial)
|
|
875
|
+
: planner.finish_columns(client, partial),
|
|
876
|
+
);
|
|
870
877
|
},
|
|
871
878
|
};
|
|
872
879
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casoon/opengrid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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": [
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"./pkg/*": "./pkg/*",
|
|
53
53
|
"./engine/*": "./engine/*",
|
|
54
54
|
"./xlsx/*": "./xlsx/*",
|
|
55
|
+
"./collation/*": "./collation/*",
|
|
55
56
|
"./package.json": "./package.json"
|
|
56
57
|
},
|
|
57
58
|
"main": "./loader.js",
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
"loader.js",
|
|
64
65
|
"loader.d.ts",
|
|
65
66
|
"worker.js",
|
|
67
|
+
"collation.js",
|
|
66
68
|
"react/",
|
|
67
69
|
"vue/",
|
|
68
70
|
"svelte/",
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
"pkg/",
|
|
71
73
|
"engine/",
|
|
72
74
|
"xlsx/",
|
|
75
|
+
"collation/",
|
|
73
76
|
"LICENSE-MIT",
|
|
74
77
|
"LICENSE-APACHE",
|
|
75
78
|
"README.md",
|
|
@@ -313,16 +313,16 @@ export interface InitOutput {
|
|
|
313
313
|
readonly set_validators: (a: any, b: any) => void;
|
|
314
314
|
readonly set_values: (a: any, b: any) => void;
|
|
315
315
|
readonly set_view: (a: any, b: any, c: any) => void;
|
|
316
|
-
readonly
|
|
317
|
-
readonly
|
|
318
|
-
readonly
|
|
319
|
-
readonly
|
|
320
|
-
readonly
|
|
321
|
-
readonly
|
|
322
|
-
readonly
|
|
323
|
-
readonly
|
|
324
|
-
readonly
|
|
325
|
-
readonly
|
|
316
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___web_sys_d90b8ce3fc65d21___features__gen_HtmlElement__HtmlElement__alloc_98d089680bbbc9df___string__String__core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String___core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String_______true_: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
317
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_f2793286032f204f___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
318
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
319
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true_: (a: number, b: number, c: any) => void;
|
|
320
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__2: (a: number, b: number, c: any) => void;
|
|
321
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__3: (a: number, b: number, c: any) => void;
|
|
322
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__5: (a: number, b: number, c: any) => void;
|
|
323
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__6: (a: number, b: number, c: any) => void;
|
|
324
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke___u32______true_: (a: number, b: number, c: number) => void;
|
|
325
|
+
readonly wasm_bindgen_f2793286032f204f___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
326
326
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
327
327
|
readonly __externref_table_alloc: () => number;
|
|
328
328
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* @ts-self-types="./opengrid_web_components.d.ts" */
|
|
2
|
-
import { __opengrid_numbers } from './snippets/opengrid-web-components-
|
|
3
|
-
import { __opengrid_intl_formatter, __opengrid_page_lang } from './snippets/opengrid-web-components-
|
|
4
|
-
import { __opengrid_define_element } from './snippets/opengrid-web-core-
|
|
5
|
-
import { __opengrid_apply_frame, __opengrid_remove_attribute, __opengrid_set_attribute, __opengrid_set_text } from './snippets/opengrid-web-core-
|
|
6
|
-
import * as import1 from "./snippets/opengrid-web-components-
|
|
7
|
-
import * as import2 from "./snippets/opengrid-web-core-
|
|
8
|
-
import * as import3 from "./snippets/opengrid-web-core-
|
|
9
|
-
import * as import4 from "./snippets/opengrid-web-core-
|
|
2
|
+
import { __opengrid_numbers } from './snippets/opengrid-web-components-ae047af7b34e4f04/inline0.js';
|
|
3
|
+
import { __opengrid_intl_formatter, __opengrid_page_lang } from './snippets/opengrid-web-components-ae047af7b34e4f04/inline1.js';
|
|
4
|
+
import { __opengrid_define_element } from './snippets/opengrid-web-core-b158b7dd980e3998/inline1.js';
|
|
5
|
+
import { __opengrid_apply_frame, __opengrid_remove_attribute, __opengrid_set_attribute, __opengrid_set_text } from './snippets/opengrid-web-core-b158b7dd980e3998/inline2.js';
|
|
6
|
+
import * as import1 from "./snippets/opengrid-web-components-ae047af7b34e4f04/inline1.js"
|
|
7
|
+
import * as import2 from "./snippets/opengrid-web-core-b158b7dd980e3998/inline0.js"
|
|
8
|
+
import * as import3 from "./snippets/opengrid-web-core-b158b7dd980e3998/inline0.js"
|
|
9
|
+
import * as import4 from "./snippets/opengrid-web-core-b158b7dd980e3998/inline0.js"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -454,34 +454,34 @@ function __wbg_get_imports() {
|
|
|
454
454
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
455
455
|
return ret;
|
|
456
456
|
},
|
|
457
|
-
|
|
457
|
+
__wbg___opengrid_apply_frame_d29f0faa02b21c54: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
458
458
|
__opengrid_apply_frame(arg0, arg1, getArrayU32FromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
|
|
459
459
|
},
|
|
460
|
-
|
|
460
|
+
__wbg___opengrid_define_element_e2f5e6af2c89bb08: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
461
461
|
__opengrid_define_element(getStringFromWasm0(arg0, arg1), arg2, arg3, arg4, arg5);
|
|
462
462
|
},
|
|
463
|
-
|
|
463
|
+
__wbg___opengrid_intl_formatter_0fcf0cbef860d75a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
464
464
|
const ret = __opengrid_intl_formatter(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4);
|
|
465
465
|
return ret;
|
|
466
466
|
}, arguments); },
|
|
467
|
-
|
|
467
|
+
__wbg___opengrid_numbers_c1ec0026a630b13a: function(arg0, arg1) {
|
|
468
468
|
const ret = __opengrid_numbers(getArrayF64FromWasm0(arg0, arg1));
|
|
469
469
|
return ret;
|
|
470
470
|
},
|
|
471
|
-
|
|
471
|
+
__wbg___opengrid_page_lang_447464cff74da710: function(arg0, arg1) {
|
|
472
472
|
const ret = __opengrid_page_lang(arg1);
|
|
473
473
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
474
474
|
const len1 = WASM_VECTOR_LEN;
|
|
475
475
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
476
476
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
477
477
|
},
|
|
478
|
-
|
|
478
|
+
__wbg___opengrid_remove_attribute_dc5663ae33dab39e: function(arg0, arg1, arg2) {
|
|
479
479
|
__opengrid_remove_attribute(arg0, getStringFromWasm0(arg1, arg2));
|
|
480
480
|
},
|
|
481
|
-
|
|
481
|
+
__wbg___opengrid_set_attribute_8ae482e70d39630b: function(arg0, arg1, arg2, arg3, arg4) {
|
|
482
482
|
__opengrid_set_attribute(arg0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
483
483
|
},
|
|
484
|
-
|
|
484
|
+
__wbg___opengrid_set_text_40dda64a15f431aa: function(arg0, arg1, arg2) {
|
|
485
485
|
__opengrid_set_text(arg0, getStringFromWasm0(arg1, arg2));
|
|
486
486
|
},
|
|
487
487
|
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
@@ -1069,7 +1069,7 @@ function __wbg_get_imports() {
|
|
|
1069
1069
|
const a = state0.a;
|
|
1070
1070
|
state0.a = 0;
|
|
1071
1071
|
try {
|
|
1072
|
-
return
|
|
1072
|
+
return wasm_bindgen_f2793286032f204f___convert__closures_____invoke___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1073
1073
|
} finally {
|
|
1074
1074
|
state0.a = a;
|
|
1075
1075
|
}
|
|
@@ -1442,47 +1442,47 @@ function __wbg_get_imports() {
|
|
|
1442
1442
|
},
|
|
1443
1443
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1444
1444
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1445
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1445
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true_);
|
|
1446
1446
|
return ret;
|
|
1447
1447
|
},
|
|
1448
1448
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1449
1449
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 278, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1450
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1450
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_f2793286032f204f___JsError___true_);
|
|
1451
1451
|
return ret;
|
|
1452
1452
|
},
|
|
1453
1453
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1454
1454
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1455
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1455
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__2);
|
|
1456
1456
|
return ret;
|
|
1457
1457
|
},
|
|
1458
1458
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1459
1459
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1460
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1460
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__3);
|
|
1461
1461
|
return ret;
|
|
1462
1462
|
},
|
|
1463
1463
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1464
1464
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("HTMLElement"), String, Option(String), Option(String)], shim_idx: 19, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1465
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1465
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___web_sys_d90b8ce3fc65d21___features__gen_HtmlElement__HtmlElement__alloc_98d089680bbbc9df___string__String__core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String___core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String_______true_);
|
|
1466
1466
|
return ret;
|
|
1467
1467
|
},
|
|
1468
1468
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1469
1469
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("HTMLElement")], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1470
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1470
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__5);
|
|
1471
1471
|
return ret;
|
|
1472
1472
|
},
|
|
1473
1473
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1474
1474
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1475
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1475
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__6);
|
|
1476
1476
|
return ret;
|
|
1477
1477
|
},
|
|
1478
1478
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
1479
1479
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 264, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1480
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1480
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke___u32______true_);
|
|
1481
1481
|
return ret;
|
|
1482
1482
|
},
|
|
1483
1483
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
1484
1484
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 17, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1485
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1485
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f2793286032f204f___convert__closures_____invoke_______true_);
|
|
1486
1486
|
return ret;
|
|
1487
1487
|
},
|
|
1488
1488
|
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
@@ -1508,60 +1508,60 @@ function __wbg_get_imports() {
|
|
|
1508
1508
|
return {
|
|
1509
1509
|
__proto__: null,
|
|
1510
1510
|
"./opengrid_web_components_bg.js": import0,
|
|
1511
|
-
"./snippets/opengrid-web-components-
|
|
1512
|
-
"./snippets/opengrid-web-core-
|
|
1513
|
-
"./snippets/opengrid-web-core-
|
|
1514
|
-
"./snippets/opengrid-web-core-
|
|
1511
|
+
"./snippets/opengrid-web-components-ae047af7b34e4f04/inline1.js": import1,
|
|
1512
|
+
"./snippets/opengrid-web-core-b158b7dd980e3998/inline0.js": import2,
|
|
1513
|
+
"./snippets/opengrid-web-core-b158b7dd980e3998/inline0.js": import3,
|
|
1514
|
+
"./snippets/opengrid-web-core-b158b7dd980e3998/inline0.js": import4,
|
|
1515
1515
|
};
|
|
1516
1516
|
}
|
|
1517
1517
|
|
|
1518
|
-
function
|
|
1519
|
-
wasm.
|
|
1518
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1519
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1520
1520
|
}
|
|
1521
1521
|
|
|
1522
|
-
function
|
|
1523
|
-
wasm.
|
|
1522
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true_(arg0, arg1, arg2) {
|
|
1523
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true_(arg0, arg1, arg2);
|
|
1524
1524
|
}
|
|
1525
1525
|
|
|
1526
|
-
function
|
|
1527
|
-
wasm.
|
|
1526
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__2(arg0, arg1, arg2) {
|
|
1527
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__2(arg0, arg1, arg2);
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
|
-
function
|
|
1531
|
-
wasm.
|
|
1530
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__3(arg0, arg1, arg2) {
|
|
1531
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__3(arg0, arg1, arg2);
|
|
1532
1532
|
}
|
|
1533
1533
|
|
|
1534
|
-
function
|
|
1535
|
-
wasm.
|
|
1534
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__5(arg0, arg1, arg2) {
|
|
1535
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__5(arg0, arg1, arg2);
|
|
1536
1536
|
}
|
|
1537
1537
|
|
|
1538
|
-
function
|
|
1539
|
-
wasm.
|
|
1538
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__6(arg0, arg1, arg2) {
|
|
1539
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__6(arg0, arg1, arg2);
|
|
1540
1540
|
}
|
|
1541
1541
|
|
|
1542
|
-
function
|
|
1543
|
-
const ret = wasm.
|
|
1542
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_f2793286032f204f___JsError___true_(arg0, arg1, arg2) {
|
|
1543
|
+
const ret = wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_f2793286032f204f___JsError___true_(arg0, arg1, arg2);
|
|
1544
1544
|
if (ret[1]) {
|
|
1545
1545
|
throw takeFromExternrefTable0(ret[0]);
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
1548
|
|
|
1549
|
-
function
|
|
1550
|
-
wasm.
|
|
1549
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
1550
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1551
1551
|
}
|
|
1552
1552
|
|
|
1553
|
-
function
|
|
1553
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___web_sys_d90b8ce3fc65d21___features__gen_HtmlElement__HtmlElement__alloc_98d089680bbbc9df___string__String__core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String___core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String_______true_(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1554
1554
|
const ptr0 = passStringToWasm0(arg3, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1555
1555
|
const len0 = WASM_VECTOR_LEN;
|
|
1556
1556
|
var ptr1 = isLikeNone(arg4) ? 0 : passStringToWasm0(arg4, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1557
1557
|
var len1 = WASM_VECTOR_LEN;
|
|
1558
1558
|
var ptr2 = isLikeNone(arg5) ? 0 : passStringToWasm0(arg5, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1559
1559
|
var len2 = WASM_VECTOR_LEN;
|
|
1560
|
-
wasm.
|
|
1560
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___web_sys_d90b8ce3fc65d21___features__gen_HtmlElement__HtmlElement__alloc_98d089680bbbc9df___string__String__core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String___core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String_______true_(arg0, arg1, arg2, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1561
1561
|
}
|
|
1562
1562
|
|
|
1563
|
-
function
|
|
1564
|
-
wasm.
|
|
1563
|
+
function wasm_bindgen_f2793286032f204f___convert__closures_____invoke___u32______true_(arg0, arg1, arg2) {
|
|
1564
|
+
wasm.wasm_bindgen_f2793286032f204f___convert__closures_____invoke___u32______true_(arg0, arg1, arg2);
|
|
1565
1565
|
}
|
|
1566
1566
|
|
|
1567
1567
|
|
|
Binary file
|
|
@@ -24,16 +24,16 @@ export const set_texts: (a: any, b: any) => void;
|
|
|
24
24
|
export const set_validators: (a: any, b: any) => void;
|
|
25
25
|
export const set_values: (a: any, b: any) => void;
|
|
26
26
|
export const set_view: (a: any, b: any, c: any) => void;
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
27
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___web_sys_d90b8ce3fc65d21___features__gen_HtmlElement__HtmlElement__alloc_98d089680bbbc9df___string__String__core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String___core_d941ad8722425d2e___option__Option_alloc_98d089680bbbc9df___string__String_______true_: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
28
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_f2793286032f204f___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
29
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined___js_sys_3247ddf4d7647dab___Function_fn_wasm_bindgen_f2793286032f204f___JsValue_____wasm_bindgen_f2793286032f204f___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
30
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true_: (a: number, b: number, c: any) => void;
|
|
31
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__2: (a: number, b: number, c: any) => void;
|
|
32
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__3: (a: number, b: number, c: any) => void;
|
|
33
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__5: (a: number, b: number, c: any) => void;
|
|
34
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___wasm_bindgen_f2793286032f204f___JsValue______true__6: (a: number, b: number, c: any) => void;
|
|
35
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke___u32______true_: (a: number, b: number, c: number) => void;
|
|
36
|
+
export const wasm_bindgen_f2793286032f204f___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
37
37
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
38
38
|
export const __externref_table_alloc: () => number;
|
|
39
39
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
package/react/index.d.ts
CHANGED
|
@@ -59,6 +59,8 @@ export interface OpengridGridProps extends ConnectOptions, ElementProps {
|
|
|
59
59
|
rowKey?: string;
|
|
60
60
|
/** The page's filter, as the wire's JSON; and-ed onto every query, not in the view. */
|
|
61
61
|
filter?: string;
|
|
62
|
+
/** The locale text columns sort by (`de`, `sr-Latn`); by code point without it. */
|
|
63
|
+
collation?: string;
|
|
62
64
|
/** An empty row after the last one to type a new record into (`onRowAdd`). */
|
|
63
65
|
addRow?: boolean;
|
|
64
66
|
search?: boolean;
|
package/react/index.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
treeKey,
|
|
15
15
|
rowKey,
|
|
16
16
|
filter,
|
|
17
|
+
collation,
|
|
17
18
|
addRow = false,
|
|
18
19
|
search = false,
|
|
19
20
|
facets = false,
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"tree-key": treeKey,
|
|
59
60
|
"row-key": rowKey,
|
|
60
61
|
filter,
|
|
62
|
+
collation,
|
|
61
63
|
"add-row": flag(addRow),
|
|
62
64
|
search: flag(search),
|
|
63
65
|
facets: flag(facets),
|
package/svelte/index.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export interface OpengridGridProps extends Options, ElementProps {
|
|
|
95
95
|
rowKey?: string;
|
|
96
96
|
/** The page's filter, as the wire's JSON; and-ed onto every query, not in the view. */
|
|
97
97
|
filter?: string;
|
|
98
|
+
/** The locale text columns sort by (`de`, `sr-Latn`); by code point without it. */
|
|
99
|
+
collation?: string;
|
|
98
100
|
/** An empty row after the last one to type a new record into (`onrowadd`). */
|
|
99
101
|
addRow?: boolean;
|
|
100
102
|
search?: boolean;
|
package/vue/index.d.ts
CHANGED
|
@@ -85,6 +85,8 @@ export interface OpengridGridProps extends Options {
|
|
|
85
85
|
rowKey?: string;
|
|
86
86
|
/** The page's filter, as the wire's JSON; and-ed onto every query, not in the view. */
|
|
87
87
|
filter?: string;
|
|
88
|
+
/** The locale text columns sort by (`de`, `sr-Latn`); by code point without it. */
|
|
89
|
+
collation?: string;
|
|
88
90
|
/** An empty row after the last one to type a new record into (`@row-add`). */
|
|
89
91
|
addRow?: boolean;
|
|
90
92
|
search?: boolean;
|
package/vue/index.js
CHANGED
package/worker.js
CHANGED
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
// The packaged engine glue, imported statically so that a bundler follows it and
|
|
26
26
|
// the `.wasm` beside it; `init` names another one with `moduleUrl`.
|
|
27
27
|
import * as packaged from "./engine/opengrid_wasm.js";
|
|
28
|
+
// The collator, for a query that sorts by a locale (rule S4a): a module of its
|
|
29
|
+
// own, fetched by the first such query.
|
|
30
|
+
import { withCollator } from "./collation.js";
|
|
28
31
|
|
|
29
32
|
/** The single engine instance, created on `init` and reused for every query. */
|
|
30
33
|
let engine;
|
|
@@ -57,7 +60,9 @@ self.onmessage = async ({ data }) => {
|
|
|
57
60
|
break;
|
|
58
61
|
}
|
|
59
62
|
case "query": {
|
|
60
|
-
const result = engine
|
|
63
|
+
const result = await withCollator(engine, data.query, () =>
|
|
64
|
+
engine.execute_columns(data.query),
|
|
65
|
+
);
|
|
61
66
|
self.postMessage({ id: data.id, result }, [result.buffer]);
|
|
62
67
|
break;
|
|
63
68
|
}
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|