@casoon/opengrid 0.16.0 → 0.18.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 +171 -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 +48 -0
- package/engine/opengrid_wasm.d.ts +77 -1
- package/engine/opengrid_wasm.js +187 -0
- package/engine/opengrid_wasm_bg.wasm +0 -0
- package/engine/opengrid_wasm_bg.wasm.d.ts +14 -1
- package/loader.d.ts +45 -0
- package/loader.js +452 -8
- 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 +84 -1
- package/xlsx/opengrid_xlsx_bg.wasm +0 -0
- /package/pkg/snippets/{opengrid-web-components-35ed06b453a9b215 → opengrid-web-components-bcd23b5e2228bf0e}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-components-35ed06b453a9b215 → opengrid-web-components-bcd23b5e2228bf0e}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-b41714d4e7311909 → opengrid-web-core-5e04e9ab83050ad3}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-b41714d4e7311909 → opengrid-web-core-5e04e9ab83050ad3}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-b41714d4e7311909 → opengrid-web-core-5e04e9ab83050ad3}/inline2.js +0 -0
|
@@ -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-bcd23b5e2228bf0e/inline0.js';
|
|
3
|
+
import { __opengrid_intl_formatter, __opengrid_page_lang } from './snippets/opengrid-web-components-bcd23b5e2228bf0e/inline1.js';
|
|
4
|
+
import { __opengrid_define_element } from './snippets/opengrid-web-core-5e04e9ab83050ad3/inline1.js';
|
|
5
|
+
import { __opengrid_apply_frame, __opengrid_remove_attribute, __opengrid_set_attribute, __opengrid_set_text } from './snippets/opengrid-web-core-5e04e9ab83050ad3/inline2.js';
|
|
6
|
+
import * as import1 from "./snippets/opengrid-web-components-bcd23b5e2228bf0e/inline1.js"
|
|
7
|
+
import * as import2 from "./snippets/opengrid-web-core-5e04e9ab83050ad3/inline0.js"
|
|
8
|
+
import * as import3 from "./snippets/opengrid-web-core-5e04e9ab83050ad3/inline0.js"
|
|
9
|
+
import * as import4 from "./snippets/opengrid-web-core-5e04e9ab83050ad3/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_ec91c68745951285: 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_0cb52057021f1aec: 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_5115e97830f7fab4: 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_a5a7771079cd1a36: function(arg0, arg1) {
|
|
468
468
|
const ret = __opengrid_numbers(getArrayF64FromWasm0(arg0, arg1));
|
|
469
469
|
return ret;
|
|
470
470
|
},
|
|
471
|
-
|
|
471
|
+
__wbg___opengrid_page_lang_e550702af0290596: 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_a01f20ed6fbe01d0: function(arg0, arg1, arg2) {
|
|
479
479
|
__opengrid_remove_attribute(arg0, getStringFromWasm0(arg1, arg2));
|
|
480
480
|
},
|
|
481
|
-
|
|
481
|
+
__wbg___opengrid_set_attribute_926fafbf2e4f60fb: 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_23bcfda2d5dc8f86: 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-bcd23b5e2228bf0e/inline1.js": import1,
|
|
1512
|
+
"./snippets/opengrid-web-core-5e04e9ab83050ad3/inline0.js": import2,
|
|
1513
|
+
"./snippets/opengrid-web-core-5e04e9ab83050ad3/inline0.js": import3,
|
|
1514
|
+
"./snippets/opengrid-web-core-5e04e9ab83050ad3/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
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
* load { type:"load", id, name, bytes, schema }
|
|
13
13
|
* -> { type:"loaded", id }
|
|
14
14
|
* rows { type:"rows", id, name, rows, schema } -> { type:"loaded", id } (issue #182)
|
|
15
|
+
* columns { type:"columns", id, name, schema, rows, pack } -> { type:"loaded", id } (issue #445)
|
|
16
|
+
* columns_begin / columns_chunk / columns_end / columns_abort: the same rows in packs, as
|
|
17
|
+
* load_begin / load_chunk / load_end / load_abort are for CSV
|
|
15
18
|
* query { type:"query", id, query } -> { id, result }
|
|
16
19
|
* stats { type:"stats", id } -> { id, result } (issue #70)
|
|
20
|
+
* unload { type:"unload", id, name } -> { id, result } (issue #459): whether there was one
|
|
17
21
|
* pivot { type:"pivot", id, pivot } -> { id, result } (issue #28)
|
|
18
22
|
*
|
|
19
23
|
* Any request that throws answers `{ id, type:"error", message }`. The `bytes`
|
|
@@ -26,6 +30,30 @@
|
|
|
26
30
|
// the `.wasm` beside it; `init` names another one with `moduleUrl`.
|
|
27
31
|
import * as packaged from "./engine/opengrid_wasm.js";
|
|
28
32
|
|
|
33
|
+
// The collator, for a query that sorts by a locale (rule S4a): `collation.js` and the module
|
|
34
|
+
// behind it are fetched by the first such query, and never otherwise — so a page that serves
|
|
35
|
+
// the package's files itself and leaves them out loses locale sorts, not the worker. The same
|
|
36
|
+
// test is in `loader.js`; the two must agree.
|
|
37
|
+
const NAMES_A_LOCALE = /"collation"\s*:\s*"(?!binary")/;
|
|
38
|
+
let collatorGiven = false;
|
|
39
|
+
|
|
40
|
+
async function withCollator(engine, json, run) {
|
|
41
|
+
if (!collatorGiven && NAMES_A_LOCALE.test(json)) {
|
|
42
|
+
let collation;
|
|
43
|
+
try {
|
|
44
|
+
collation = await import("./collation.js");
|
|
45
|
+
} catch (error) {
|
|
46
|
+
throw Object.assign(
|
|
47
|
+
new Error(`a sort by a locale needs collation.js, and it did not load (${error?.message ?? error})`),
|
|
48
|
+
{ code: "module_not_loaded" },
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
await collation.giveCollator(engine);
|
|
52
|
+
collatorGiven = true;
|
|
53
|
+
}
|
|
54
|
+
return run();
|
|
55
|
+
}
|
|
56
|
+
|
|
29
57
|
/** The single engine instance, created on `init` and reused for every query. */
|
|
30
58
|
let engine;
|
|
31
59
|
|
|
@@ -46,18 +74,73 @@ self.onmessage = async ({ data }) => {
|
|
|
46
74
|
self.postMessage({ type: "loaded", id: data.id });
|
|
47
75
|
break;
|
|
48
76
|
}
|
|
77
|
+
case "load_begin": {
|
|
78
|
+
engine.begin_csv(data.name, data.schema, data.size);
|
|
79
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
case "load_chunk": {
|
|
83
|
+
engine.push_csv(new Uint8Array(data.bytes));
|
|
84
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case "load_end": {
|
|
88
|
+
engine.end_csv();
|
|
89
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case "load_abort": {
|
|
93
|
+
engine.abort_csv();
|
|
94
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case "columns": {
|
|
98
|
+
// The rows of a page as one pack of columns (issue #445); a pack that does not hold, or an
|
|
99
|
+
// engine module without the calls, answers with an error, and the page takes the JSON route.
|
|
100
|
+
engine.begin_columns(data.name, data.schema, data.rows);
|
|
101
|
+
engine.push_columns(new Uint8Array(data.pack));
|
|
102
|
+
engine.end_columns();
|
|
103
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case "columns_begin": {
|
|
107
|
+
engine.begin_columns(data.name, data.schema, data.rows);
|
|
108
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case "columns_chunk": {
|
|
112
|
+
engine.push_columns(new Uint8Array(data.pack));
|
|
113
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case "columns_end": {
|
|
117
|
+
engine.end_columns();
|
|
118
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case "columns_abort": {
|
|
122
|
+
engine.abort_columns();
|
|
123
|
+
self.postMessage({ type: "loaded", id: data.id });
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
49
126
|
case "rows": {
|
|
50
127
|
engine.load_rows(data.name, data.rows, data.schema);
|
|
51
128
|
self.postMessage({ type: "loaded", id: data.id });
|
|
52
129
|
break;
|
|
53
130
|
}
|
|
131
|
+
case "unload": {
|
|
132
|
+
self.postMessage({ id: data.id, result: engine.unload(data.name) });
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
54
135
|
case "stats": {
|
|
55
136
|
// What the engine holds: its memory and each source's size, as JSON.
|
|
56
137
|
self.postMessage({ id: data.id, result: engine.stats() });
|
|
57
138
|
break;
|
|
58
139
|
}
|
|
59
140
|
case "query": {
|
|
60
|
-
const result = engine
|
|
141
|
+
const result = await withCollator(engine, data.query, () =>
|
|
142
|
+
engine.execute_columns(data.query),
|
|
143
|
+
);
|
|
61
144
|
self.postMessage({ id: data.id, result }, [result.buffer]);
|
|
62
145
|
break;
|
|
63
146
|
}
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|