@guiexpert/solid-table 1.1.97 → 1.1.99
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/GuiexpertTableProps.d.ts +7 -1
- package/README.md +19 -0
- package/index.cjs +1 -1
- package/index.js +53 -51
- package/package.json +2 -2
package/GuiexpertTableProps.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusModelIf, GeBatchEditEvent, GeDetailEvent, GeModelChangeEvent, GeMouseEvent, GeRowDragEvent, GeScrollEvent, GeStateChangeEvent, SelectionModelIf, TableApi, TableModelIf, TableOptions } from '@guiexpert/table';
|
|
1
|
+
import { FocusModelIf, GeBatchEditEvent, GeDetailEvent, GeEditEvent, GeUndoEvent, GeModelChangeEvent, GeMouseEvent, GeRowDragEvent, GeScrollEvent, GeStateChangeEvent, SelectionModelIf, TableApi, TableModelIf, TableOptions } from '@guiexpert/table';
|
|
2
2
|
|
|
3
3
|
export type GeMouseEventFn = (evt: GeMouseEvent) => void;
|
|
4
4
|
export type GeCheckboxEventFn = (evt: any[]) => void;
|
|
@@ -11,6 +11,8 @@ export type GeStateChangeEventFn = (evt: GeStateChangeEvent) => void;
|
|
|
11
11
|
export type GeRowDragEventFn = (evt: GeRowDragEvent) => void;
|
|
12
12
|
export type GeBatchEditEventFn = (evt: GeBatchEditEvent) => void;
|
|
13
13
|
export type GeDetailEventFn = (evt: GeDetailEvent) => void;
|
|
14
|
+
export type GeEditEventFn = (evt: GeEditEvent) => void;
|
|
15
|
+
export type GeUndoEventFn = (evt: GeUndoEvent) => void;
|
|
14
16
|
export interface GuiexpertTableProps {
|
|
15
17
|
tableModel: TableModelIf;
|
|
16
18
|
tableOptions?: TableOptions;
|
|
@@ -38,6 +40,10 @@ export interface GuiexpertTableProps {
|
|
|
38
40
|
batchEditChanged?: GeBatchEditEventFn;
|
|
39
41
|
/** Master/detail: a detail row was expanded or collapsed (since 1.1.97). */
|
|
40
42
|
detailExpandedChanged?: GeDetailEventFn;
|
|
43
|
+
/** The cell editor opened, its text changed, it committed or it was cancelled (since 1.1.99). */
|
|
44
|
+
editingChanged?: GeEditEventFn;
|
|
45
|
+
/** The undo history changed (since 1.1.99). */
|
|
46
|
+
undoStackChanged?: GeUndoEventFn;
|
|
41
47
|
tableReady?: GeTableReadyEventFn;
|
|
42
48
|
licenseKey?: string;
|
|
43
49
|
/**
|
package/README.md
CHANGED
|
@@ -37,6 +37,25 @@ This is the UI-agnostic table component for your next web app. 😊
|
|
|
37
37
|
- Full control over the HTML structure and style
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
### New in October 2026 (1.1.91 – 1.1.99) – all MIT-licensed
|
|
41
|
+
|
|
42
|
+
- Screen readers and keyboard: WAI-ARIA grid, announcements, full keyboard navigation (1.1.91)
|
|
43
|
+
- “Loading…” and “No rows” overlays with a CSS spinner, `loading` prop (1.1.92)
|
|
44
|
+
- Save and restore the state: column layout, sorting, scroll position, selection – localStorage or your server (1.1.92)
|
|
45
|
+
- Row numbers like in a spreadsheet: `rowNumbersVisible: true` (1.1.93)
|
|
46
|
+
- Total rows that follow the filter, sums of the selection: `footerAggregates` (1.1.94)
|
|
47
|
+
- Row grouping with subtotals: `RowGroupFactory` (1.1.94)
|
|
48
|
+
- Pivot tables: `PivotFactory` (1.1.94)
|
|
49
|
+
- Calculated columns, “Show values as” and formulas without `eval`: `valueGetter`, `showValuesAs`, `formula` (1.1.95)
|
|
50
|
+
- Drag rows into order – mouse, touch, keyboard: `rowDrag: true` (1.1.95)
|
|
51
|
+
- Fill handle and batch edit: `fillHandle`, `batchEdit` (1.1.96)
|
|
52
|
+
- Master/detail with nested tables or components: `masterDetail` (1.1.97)
|
|
53
|
+
- Right-to-left for Arabic, Hebrew, Persian: `direction: "rtl"` (1.1.98)
|
|
54
|
+
- A spreadsheet: A1 cell formulas, copy & paste with Excel, undo/redo, formula bar – `SpreadsheetFactory`, or `spreadsheet: true` for your table (1.1.99)
|
|
55
|
+
|
|
56
|
+
All thirteen with code and live demos: [gui.expert/whats-new](https://gui.expert/whats-new/) ·
|
|
57
|
+
training: [gui.expert/training](https://gui.expert/training/)
|
|
58
|
+
|
|
40
59
|
## Links
|
|
41
60
|
|
|
42
61
|
- [Demos](https://gui.expert/demos)
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("solid-js/web"),d=require("solid-js"),l=require("@guiexpert/table");class b{constructor(t){this.code=t}render(t,n,o,i,a,s,h){const e=c.mergeProps({rowIndex:n,columnIndex:o,areaIdent:i,areaModel:a,cellValue:s});return c.render(()=>this.code(e),t)}}class m{constructor(t){this.code=t}render(t,n,o){const i={row:n,rowIndex:o.rowIndex,tableApi:o.tableApi,context:o};return c.render(()=>this.code(i),t)}}var f=c.template("<div>");const w=u=>{let t;const n=d.mergeProps({tableModel:null,tableOptions:new l.TableOptions},u),o=(e,r,g)=>{g&&g(r),t&&t.dispatchEvent(new CustomEvent(e,{detail:r,bubbles:e!=="scroll"}))},i={onSelectionChanged:e=>o("selectionChanged",e,n.selectionChanged),onFocusChanged:e=>o("focusChanged",e,n.focusChanged),onScroll:e=>o("scroll",e,n.scroll),onCheckboxChanged:e=>o("checkboxChanged",e,n.checkboxChanged),onContextmenu:e=>o("contextmenu",e,n.contextmenu),onModelChanged:e=>o("modelChanged",e,n.modelChanged),onMouseClicked:e=>o("mouseClicked",e,n.mouseClicked),onMouseDragging:e=>o("mouseDragging",e,n.mouseDragging),onMouseDraggingEnd:e=>o("mouseDraggingEnd",e,n.mouseDraggingEnd),onMouseMoved:e=>o("mouseMoved",e,n.mouseMoved),onStateChanged:e=>o("stateChanged",e,n.stateChanged),onRowDragStart:e=>o("rowDragStart",e,n.rowDragStart),onRowDragMove:e=>o("rowDragMove",e,n.rowDragMove),onRowDragEnd:e=>o("rowDragEnd",e,n.rowDragEnd),onBatchEditChanged:e=>o("batchEditChanged",e,n.batchEditChanged),onDetailExpandedChanged:e=>o("detailExpandedChanged",e,n.detailExpandedChanged),onEditingChanged:e=>o("editingChanged",e,n.editingChanged),onUndoStackChanged:e=>o("undoStackChanged",e,n.undoStackChanged)};let a,s=!1;const h=e=>{e?(a==null||a.showLoadingOverlay(),s=!0):s&&(a==null||a.hideOverlay(),s=!1)};return d.createEffect(()=>{const e=n.tableModel,r=n.tableOptions,g=t;if(!g||!e)return;const C=d.untrack(()=>{const p=new l.TableScope(g,e,new l.SimpleDomService,r??new l.TableOptions,i);return p.firstInit(),a=p,s=!1,h(!!n.loading),o("tableReady",p.getApi(),n.tableReady),p});d.onCleanup(()=>{a===C&&(a=void 0),C.destroy()})}),d.createEffect(()=>{const e=!!n.loading;d.untrack(()=>h(e))}),d.createEffect(()=>{const e=n.licenseKey;e&&l.LicenseManager.getInstance().setLicenseKey(e)}),(()=>{var e=f(),r=t;return typeof r=="function"?c.use(r,e):t=e,e})()};exports.ComponentRendererWrapper=b;exports.DetailComponentRendererWrapper=m;exports.GuiexpertTable=w;
|
package/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { mergeProps as f, render as
|
|
2
|
-
import { mergeProps as D, createEffect as
|
|
3
|
-
import { TableOptions as
|
|
1
|
+
import { mergeProps as f, render as m, use as b, template as w } from "solid-js/web";
|
|
2
|
+
import { mergeProps as D, createEffect as h, untrack as C, onCleanup as v } from "solid-js";
|
|
3
|
+
import { TableOptions as u, LicenseManager as E, TableScope as M, SimpleDomService as x } from "@guiexpert/table";
|
|
4
4
|
class O {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
this.code = t;
|
|
7
7
|
}
|
|
8
|
-
render(t,
|
|
8
|
+
render(t, n, o, s, a, r, c) {
|
|
9
9
|
const e = f({
|
|
10
|
-
rowIndex:
|
|
11
|
-
columnIndex:
|
|
12
|
-
areaIdent:
|
|
10
|
+
rowIndex: n,
|
|
11
|
+
columnIndex: o,
|
|
12
|
+
areaIdent: s,
|
|
13
13
|
areaModel: a,
|
|
14
|
-
cellValue:
|
|
14
|
+
cellValue: r
|
|
15
15
|
});
|
|
16
|
-
return
|
|
16
|
+
return m(
|
|
17
17
|
() => this.code(e),
|
|
18
18
|
t
|
|
19
19
|
);
|
|
@@ -23,64 +23,66 @@ class I {
|
|
|
23
23
|
constructor(t) {
|
|
24
24
|
this.code = t;
|
|
25
25
|
}
|
|
26
|
-
render(t,
|
|
27
|
-
const
|
|
28
|
-
return
|
|
26
|
+
render(t, n, o) {
|
|
27
|
+
const s = { row: n, rowIndex: o.rowIndex, tableApi: o.tableApi, context: o };
|
|
28
|
+
return m(() => this.code(s), t);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
var y = /* @__PURE__ */ w("<div>");
|
|
32
|
-
const L = (
|
|
32
|
+
const L = (l) => {
|
|
33
33
|
let t;
|
|
34
|
-
const
|
|
34
|
+
const n = D({
|
|
35
35
|
tableModel: null,
|
|
36
|
-
tableOptions: new
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
detail:
|
|
36
|
+
tableOptions: new u()
|
|
37
|
+
}, l), o = (e, d, g) => {
|
|
38
|
+
g && g(d), t && t.dispatchEvent(new CustomEvent(e, {
|
|
39
|
+
detail: d,
|
|
40
40
|
bubbles: e !== "scroll"
|
|
41
41
|
}));
|
|
42
|
-
},
|
|
43
|
-
onSelectionChanged: (e) =>
|
|
44
|
-
onFocusChanged: (e) =>
|
|
45
|
-
onScroll: (e) =>
|
|
46
|
-
onCheckboxChanged: (e) =>
|
|
47
|
-
onContextmenu: (e) =>
|
|
48
|
-
onModelChanged: (e) =>
|
|
49
|
-
onMouseClicked: (e) =>
|
|
50
|
-
onMouseDragging: (e) =>
|
|
51
|
-
onMouseDraggingEnd: (e) =>
|
|
52
|
-
onMouseMoved: (e) =>
|
|
53
|
-
onStateChanged: (e) =>
|
|
54
|
-
onRowDragStart: (e) =>
|
|
55
|
-
onRowDragMove: (e) =>
|
|
56
|
-
onRowDragEnd: (e) =>
|
|
57
|
-
onBatchEditChanged: (e) =>
|
|
58
|
-
onDetailExpandedChanged: (e) =>
|
|
42
|
+
}, s = {
|
|
43
|
+
onSelectionChanged: (e) => o("selectionChanged", e, n.selectionChanged),
|
|
44
|
+
onFocusChanged: (e) => o("focusChanged", e, n.focusChanged),
|
|
45
|
+
onScroll: (e) => o("scroll", e, n.scroll),
|
|
46
|
+
onCheckboxChanged: (e) => o("checkboxChanged", e, n.checkboxChanged),
|
|
47
|
+
onContextmenu: (e) => o("contextmenu", e, n.contextmenu),
|
|
48
|
+
onModelChanged: (e) => o("modelChanged", e, n.modelChanged),
|
|
49
|
+
onMouseClicked: (e) => o("mouseClicked", e, n.mouseClicked),
|
|
50
|
+
onMouseDragging: (e) => o("mouseDragging", e, n.mouseDragging),
|
|
51
|
+
onMouseDraggingEnd: (e) => o("mouseDraggingEnd", e, n.mouseDraggingEnd),
|
|
52
|
+
onMouseMoved: (e) => o("mouseMoved", e, n.mouseMoved),
|
|
53
|
+
onStateChanged: (e) => o("stateChanged", e, n.stateChanged),
|
|
54
|
+
onRowDragStart: (e) => o("rowDragStart", e, n.rowDragStart),
|
|
55
|
+
onRowDragMove: (e) => o("rowDragMove", e, n.rowDragMove),
|
|
56
|
+
onRowDragEnd: (e) => o("rowDragEnd", e, n.rowDragEnd),
|
|
57
|
+
onBatchEditChanged: (e) => o("batchEditChanged", e, n.batchEditChanged),
|
|
58
|
+
onDetailExpandedChanged: (e) => o("detailExpandedChanged", e, n.detailExpandedChanged),
|
|
59
|
+
onEditingChanged: (e) => o("editingChanged", e, n.editingChanged),
|
|
60
|
+
onUndoStackChanged: (e) => o("undoStackChanged", e, n.undoStackChanged)
|
|
59
61
|
};
|
|
60
|
-
let a,
|
|
62
|
+
let a, r = !1;
|
|
61
63
|
const c = (e) => {
|
|
62
|
-
e ? (a == null || a.showLoadingOverlay(),
|
|
64
|
+
e ? (a == null || a.showLoadingOverlay(), r = !0) : r && (a == null || a.hideOverlay(), r = !1);
|
|
63
65
|
};
|
|
64
|
-
return
|
|
65
|
-
const e =
|
|
66
|
-
if (!
|
|
66
|
+
return h(() => {
|
|
67
|
+
const e = n.tableModel, d = n.tableOptions, g = t;
|
|
68
|
+
if (!g || !e)
|
|
67
69
|
return;
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
return
|
|
70
|
+
const p = C(() => {
|
|
71
|
+
const i = new M(g, e, new x(), d ?? new u(), s);
|
|
72
|
+
return i.firstInit(), a = i, r = !1, c(!!n.loading), o("tableReady", i.getApi(), n.tableReady), i;
|
|
71
73
|
});
|
|
72
74
|
v(() => {
|
|
73
|
-
a ===
|
|
75
|
+
a === p && (a = void 0), p.destroy();
|
|
74
76
|
});
|
|
75
|
-
}),
|
|
76
|
-
const e = !!
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
const e =
|
|
77
|
+
}), h(() => {
|
|
78
|
+
const e = !!n.loading;
|
|
79
|
+
C(() => c(e));
|
|
80
|
+
}), h(() => {
|
|
81
|
+
const e = n.licenseKey;
|
|
80
82
|
e && E.getInstance().setLicenseKey(e);
|
|
81
83
|
}), (() => {
|
|
82
|
-
var e = y(),
|
|
83
|
-
return typeof
|
|
84
|
+
var e = y(), d = t;
|
|
85
|
+
return typeof d == "function" ? b(d, e) : t = e, e;
|
|
84
86
|
})();
|
|
85
87
|
};
|
|
86
88
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiexpert/solid-table",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.99",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dr. Marc Kronberg <info@gui.expert> (https://gui.expert)",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"tslib": "^2.3.0",
|
|
34
|
-
"@guiexpert/table": "^1.1.
|
|
34
|
+
"@guiexpert/table": "^1.1.99"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"solid-js": "^1.0.0"
|