@casoon/opengrid 0.20.2 → 0.21.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 +154 -0
- package/README.md +10 -6
- package/collation/opengrid_collation_bg.wasm +0 -0
- package/engine/opengrid_wasm.d.ts +7 -0
- package/engine/opengrid_wasm.js +29 -2
- package/engine/opengrid_wasm_bg.wasm +0 -0
- package/engine/opengrid_wasm_bg.wasm.d.ts +1 -0
- package/loader.d.ts +228 -4
- package/loader.js +105 -2
- package/package.json +19 -3
- package/pkg/opengrid_web_components.d.ts +47 -10
- package/pkg/opengrid_web_components.js +185 -59
- package/pkg/opengrid_web_components_bg.wasm +0 -0
- package/pkg/opengrid_web_components_bg.wasm.d.ts +13 -10
- package/react/index.d.ts +6 -0
- package/react/index.js +10 -1
- package/solid/index.d.ts +149 -0
- package/solid/index.js +252 -0
- package/svelte/Opengrid.svelte +12 -0
- package/svelte/OpengridGrid.svelte +6 -0
- package/svelte/index.d.ts +13 -1
- package/texts/de.js +29 -0
- package/vue/index.d.ts +13 -1
- package/vue/index.js +20 -2
- package/worker.js +5 -0
- package/xlsx/opengrid_xlsx_bg.wasm +0 -0
- /package/pkg/snippets/{opengrid-web-components-33f835da37ee30df → opengrid-web-components-7b74e96872f41f92}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-components-33f835da37ee30df → opengrid-web-components-7b74e96872f41f92}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-6c69c2a1f831ba74 → opengrid-web-core-2138c846fafc77c3}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-6c69c2a1f831ba74 → opengrid-web-core-2138c846fafc77c3}/inline1.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-6c69c2a1f831ba74 → opengrid-web-core-2138c846fafc77c3}/inline2.js +0 -0
package/vue/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The props are the element's attributes in camelCase plus the options of
|
|
5
5
|
* `connect` from `@casoon/opengrid`; the callbacks are Vue events instead:
|
|
6
6
|
* `update:view` (so `v-model:view` works), `selectionChange`, `cellChange`,
|
|
7
|
-
* `paste`, `bulkChange`, `rowAction` and `sourceReplaced` — `@selection-change`
|
|
7
|
+
* `paste`, `bulkChange`, `rowAction`, `cellAction`, `toolbarAction` and `sourceReplaced` — `@selection-change`
|
|
8
8
|
* and so on in a template. `onRowAdd` stays a prop, because its answer is the
|
|
9
9
|
* new row's state; a template writes it as `@row-add` all the same.
|
|
10
10
|
*/
|
|
@@ -24,6 +24,8 @@ import type {
|
|
|
24
24
|
PivotView,
|
|
25
25
|
DrillDownDetail,
|
|
26
26
|
RowActionDetail,
|
|
27
|
+
CellActionDetail,
|
|
28
|
+
ToolbarActionDetail,
|
|
27
29
|
SelectionChangeDetail,
|
|
28
30
|
SourceReplacedDetail,
|
|
29
31
|
View,
|
|
@@ -37,6 +39,8 @@ type Callbacks =
|
|
|
37
39
|
| "onPaste"
|
|
38
40
|
| "onBulkChange"
|
|
39
41
|
| "onRowAction"
|
|
42
|
+
| "onCellAction"
|
|
43
|
+
| "onToolbarAction"
|
|
40
44
|
| "onDrillDown"
|
|
41
45
|
| "onSourceReplaced";
|
|
42
46
|
|
|
@@ -52,6 +56,8 @@ export type OpengridEmits = {
|
|
|
52
56
|
paste: (detail: PasteDetail) => void;
|
|
53
57
|
bulkChange: (detail: BulkChangeDetail) => void;
|
|
54
58
|
rowAction: (detail: RowActionDetail) => void;
|
|
59
|
+
cellAction: (detail: CellActionDetail) => void;
|
|
60
|
+
toolbarAction: (detail: ToolbarActionDetail) => void;
|
|
55
61
|
/** The pivot only: a value was pressed, with `drill-down`. */
|
|
56
62
|
drillDown: (detail: DrillDownDetail) => void;
|
|
57
63
|
sourceReplaced: (detail: SourceReplacedDetail) => void;
|
|
@@ -83,6 +89,8 @@ export interface OpengridGridProps extends Options {
|
|
|
83
89
|
treeKey?: string;
|
|
84
90
|
/** The field that names a record: `key` in the editing events. */
|
|
85
91
|
rowKey?: string;
|
|
92
|
+
/** The boolean field that mutes a row: drawn in the muted ink, described with the text `rowMuted`. */
|
|
93
|
+
rowMuted?: string;
|
|
86
94
|
/** The page's filter, as the wire's JSON; and-ed onto every query, not in the view. */
|
|
87
95
|
filter?: string;
|
|
88
96
|
/** The locale text columns sort by (`de`, `sr-Latn`); by code point without it. */
|
|
@@ -91,6 +99,10 @@ export interface OpengridGridProps extends Options {
|
|
|
91
99
|
addRow?: boolean;
|
|
92
100
|
/** Locks editing for the whole grid; the page unlocks it at run time. */
|
|
93
101
|
editLocked?: boolean;
|
|
102
|
+
/** An *Edit* switch in the toolbar that locks and unlocks editing (needs `toolbar`). */
|
|
103
|
+
editToggle?: boolean;
|
|
104
|
+
/** `"down"`: `Enter` that commits an editor moves the focus to the next data row (`Shift`+`Enter`: the previous one). */
|
|
105
|
+
enterMoves?: "down";
|
|
94
106
|
search?: boolean;
|
|
95
107
|
facets?: boolean;
|
|
96
108
|
toolbar?: boolean;
|
package/vue/index.js
CHANGED
|
@@ -42,7 +42,20 @@ import { connect } from "../loader.js";
|
|
|
42
42
|
|
|
43
43
|
/** The options of `connect` that are props; deep ones compare by value. */
|
|
44
44
|
const SHALLOW = ["provider", "detailRenderer"];
|
|
45
|
-
const DEEP = [
|
|
45
|
+
const DEEP = [
|
|
46
|
+
"texts",
|
|
47
|
+
"formats",
|
|
48
|
+
"presentation",
|
|
49
|
+
"choices",
|
|
50
|
+
"actions",
|
|
51
|
+
"cellActions",
|
|
52
|
+
"toolbarItems",
|
|
53
|
+
"presets",
|
|
54
|
+
"presetOptions",
|
|
55
|
+
"validators",
|
|
56
|
+
"cellTemplates",
|
|
57
|
+
"view",
|
|
58
|
+
];
|
|
46
59
|
|
|
47
60
|
/** The events, by `connect`'s callback. */
|
|
48
61
|
const EVENTS = {
|
|
@@ -51,6 +64,8 @@ const EVENTS = {
|
|
|
51
64
|
onPaste: "paste",
|
|
52
65
|
onBulkChange: "bulkChange",
|
|
53
66
|
onRowAction: "rowAction",
|
|
67
|
+
onCellAction: "cellAction",
|
|
68
|
+
onToolbarAction: "toolbarAction",
|
|
54
69
|
onDrillDown: "drillDown",
|
|
55
70
|
onSourceReplaced: "sourceReplaced",
|
|
56
71
|
};
|
|
@@ -163,10 +178,13 @@ export const OpengridGrid = component(
|
|
|
163
178
|
tree: "tree",
|
|
164
179
|
treeKey: "tree-key",
|
|
165
180
|
rowKey: "row-key",
|
|
181
|
+
rowMuted: "row-muted",
|
|
166
182
|
filter: "filter",
|
|
167
183
|
collation: "collation",
|
|
168
184
|
addRow: "add-row",
|
|
169
185
|
editLocked: "edit-locked",
|
|
186
|
+
editToggle: "edit-toggle",
|
|
187
|
+
enterMoves: "enter-moves",
|
|
170
188
|
search: "search",
|
|
171
189
|
facets: "facets",
|
|
172
190
|
toolbar: "toolbar",
|
|
@@ -176,7 +194,7 @@ export const OpengridGrid = component(
|
|
|
176
194
|
density: "density",
|
|
177
195
|
theme: "theme",
|
|
178
196
|
},
|
|
179
|
-
["search", "facets", "toolbar", "columnMenu", "filterBuilder", "selection", "addRow", "editLocked"],
|
|
197
|
+
["search", "facets", "toolbar", "columnMenu", "filterBuilder", "selection", "addRow", "editLocked", "editToggle"],
|
|
180
198
|
);
|
|
181
199
|
|
|
182
200
|
export const OpengridTable = component(
|
package/worker.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* load_begin / load_chunk / load_end / load_abort are for CSV
|
|
18
18
|
* query { type:"query", id, query } -> { id, result }
|
|
19
19
|
* stats { type:"stats", id } -> { id, result } (issue #70)
|
|
20
|
+
* describe { type:"describe", id, name } -> { id, result } (issue #528): the source's schema as JSON
|
|
20
21
|
* unload { type:"unload", id, name } -> { id, result } (issue #459): whether there was one
|
|
21
22
|
* pivot { type:"pivot", id, pivot } -> { id, result } (issue #28)
|
|
22
23
|
*
|
|
@@ -132,6 +133,10 @@ self.onmessage = async ({ data }) => {
|
|
|
132
133
|
self.postMessage({ id: data.id, result: engine.unload(data.name) });
|
|
133
134
|
break;
|
|
134
135
|
}
|
|
136
|
+
case "describe": {
|
|
137
|
+
self.postMessage({ id: data.id, result: engine.describe(data.name) });
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
135
140
|
case "stats": {
|
|
136
141
|
// What the engine holds: its memory and each source's size, as JSON.
|
|
137
142
|
self.postMessage({ id: data.id, result: engine.stats() });
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|