@guiexpert/solid-table 1.1.114 → 1.1.116
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 +4 -1
- package/index.cjs +1 -1
- package/index.js +20 -19
- package/package.json +2 -2
package/GuiexpertTableProps.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusModelIf, GeBatchEditEvent, GeDetailEvent, GeEditEvent, GeUndoEvent, GeColumnResizeEvent, GeColumnMoveEvent, GeFilterEvent, GeModelChangeEvent, GeMouseEvent, GeRowDragEvent, GeScrollEvent, GeStateChangeEvent, SelectionModelIf, TableApi, TableModelIf, TableOptions } from '@guiexpert/table';
|
|
1
|
+
import { FocusModelIf, GeBatchEditEvent, GeDetailEvent, GeEditEvent, GeUndoEvent, GeColumnResizeEvent, GeColumnMoveEvent, GeFilterEvent, GeCellActivateEvent, 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;
|
|
@@ -16,6 +16,7 @@ export type GeUndoEventFn = (evt: GeUndoEvent) => void;
|
|
|
16
16
|
export type GeColumnResizeEventFn = (evt: GeColumnResizeEvent) => void;
|
|
17
17
|
export type GeColumnMoveEventFn = (evt: GeColumnMoveEvent) => void;
|
|
18
18
|
export type GeFilterEventFn = (evt: GeFilterEvent) => void;
|
|
19
|
+
export type GeCellActivateEventFn = (evt: GeCellActivateEvent) => void;
|
|
19
20
|
export interface GuiexpertTableProps {
|
|
20
21
|
tableModel: TableModelIf;
|
|
21
22
|
tableOptions?: TableOptions;
|
|
@@ -57,6 +58,8 @@ export interface GuiexpertTableProps {
|
|
|
57
58
|
columnMoveEnd?: GeColumnMoveEventFn;
|
|
58
59
|
/** Column filters changed (since 1.1.114). */
|
|
59
60
|
filterChanged?: GeFilterEventFn;
|
|
61
|
+
/** Enter or a double click "opens" a body cell – `evt.value`, `evt.row`, `evt.source` (since 1.1.115). */
|
|
62
|
+
cellActivated?: GeCellActivateEventFn;
|
|
60
63
|
tableReady?: GeTableReadyEventFn;
|
|
61
64
|
licenseKey?: string;
|
|
62
65
|
/**
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("solid-js/web"),d=require("solid-js"),c=require("@guiexpert/table");class m{constructor(t){this.code=t}render(t,n,o,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("solid-js/web"),d=require("solid-js"),c=require("@guiexpert/table");class m{constructor(t){this.code=t}render(t,n,o,l,a,s,h){const e=g.mergeProps({rowIndex:n,columnIndex:o,areaIdent:l,areaModel:a,cellValue:s});return g.render(()=>this.code(e),t)}}class b{constructor(t){this.code=t}render(t,n,o){const l={row:n,rowIndex:o.rowIndex,tableApi:o.tableApi,context:o};return g.render(()=>this.code(l),t)}}var v=g.template("<div>");const f=C=>{let t;const n=d.mergeProps({tableModel:null,tableOptions:new c.TableOptions},C),o=(e,r,i)=>{i&&i(r),t&&t.dispatchEvent(new CustomEvent(e,{detail:r,bubbles:e!=="scroll"}))},l={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),onColumnResizeStart:e=>o("columnResizeStart",e,n.columnResizeStart),onColumnResizeEnd:e=>o("columnResizeEnd",e,n.columnResizeEnd),onColumnMoveStart:e=>o("columnMoveStart",e,n.columnMoveStart),onColumnMoveEnd:e=>o("columnMoveEnd",e,n.columnMoveEnd),onFilterChanged:e=>o("filterChanged",e,n.filterChanged),onCellActivated:e=>o("cellActivated",e,n.cellActivated)};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,i=t;if(!i||!e)return;const p=d.untrack(()=>{const u=new c.TableScope(i,e,new c.SimpleDomService,r??new c.TableOptions,l);return u.firstInit(),a=u,s=!1,h(!!n.loading),o("tableReady",u.getApi(),n.tableReady),u});d.onCleanup(()=>{a===p&&(a=void 0),p.destroy()})}),d.createEffect(()=>{const e=!!n.loading;d.untrack(()=>h(e))}),d.createEffect(()=>{const e=n.licenseKey;e&&c.LicenseManager.getInstance().setLicenseKey(e)}),(()=>{var e=v(),r=t;return typeof r=="function"?g.use(r,e):t=e,e})()};exports.ComponentRendererWrapper=m;exports.DetailComponentRendererWrapper=b;exports.GuiexpertTable=f;
|
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { mergeProps as
|
|
2
|
-
import { mergeProps as b, createEffect as u, untrack as
|
|
3
|
-
import { TableOptions as
|
|
1
|
+
import { mergeProps as v, render as p, use as f, template as E } from "solid-js/web";
|
|
2
|
+
import { mergeProps as b, createEffect as u, untrack as C, onCleanup as M } from "solid-js";
|
|
3
|
+
import { TableOptions as m, LicenseManager as w, TableScope as D, SimpleDomService as S } from "@guiexpert/table";
|
|
4
4
|
class z {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
this.code = t;
|
|
7
7
|
}
|
|
8
8
|
render(t, n, o, s, a, r, c) {
|
|
9
|
-
const e =
|
|
9
|
+
const e = v({
|
|
10
10
|
rowIndex: n,
|
|
11
11
|
columnIndex: o,
|
|
12
12
|
areaIdent: s,
|
|
@@ -19,7 +19,7 @@ class z {
|
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
class
|
|
22
|
+
class A {
|
|
23
23
|
constructor(t) {
|
|
24
24
|
this.code = t;
|
|
25
25
|
}
|
|
@@ -29,13 +29,13 @@ class O {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
var R = /* @__PURE__ */ E("<div>");
|
|
32
|
-
const
|
|
32
|
+
const O = (g) => {
|
|
33
33
|
let t;
|
|
34
34
|
const n = b({
|
|
35
35
|
tableModel: null,
|
|
36
|
-
tableOptions: new
|
|
37
|
-
}, g), o = (e, d,
|
|
38
|
-
|
|
36
|
+
tableOptions: new m()
|
|
37
|
+
}, g), o = (e, d, l) => {
|
|
38
|
+
l && l(d), t && t.dispatchEvent(new CustomEvent(e, {
|
|
39
39
|
detail: d,
|
|
40
40
|
bubbles: e !== "scroll"
|
|
41
41
|
}));
|
|
@@ -62,36 +62,37 @@ const I = (g) => {
|
|
|
62
62
|
onColumnResizeEnd: (e) => o("columnResizeEnd", e, n.columnResizeEnd),
|
|
63
63
|
onColumnMoveStart: (e) => o("columnMoveStart", e, n.columnMoveStart),
|
|
64
64
|
onColumnMoveEnd: (e) => o("columnMoveEnd", e, n.columnMoveEnd),
|
|
65
|
-
onFilterChanged: (e) => o("filterChanged", e, n.filterChanged)
|
|
65
|
+
onFilterChanged: (e) => o("filterChanged", e, n.filterChanged),
|
|
66
|
+
onCellActivated: (e) => o("cellActivated", e, n.cellActivated)
|
|
66
67
|
};
|
|
67
68
|
let a, r = !1;
|
|
68
69
|
const c = (e) => {
|
|
69
70
|
e ? (a == null || a.showLoadingOverlay(), r = !0) : r && (a == null || a.hideOverlay(), r = !1);
|
|
70
71
|
};
|
|
71
72
|
return u(() => {
|
|
72
|
-
const e = n.tableModel, d = n.tableOptions,
|
|
73
|
-
if (!
|
|
73
|
+
const e = n.tableModel, d = n.tableOptions, l = t;
|
|
74
|
+
if (!l || !e)
|
|
74
75
|
return;
|
|
75
|
-
const h =
|
|
76
|
-
const
|
|
77
|
-
return
|
|
76
|
+
const h = C(() => {
|
|
77
|
+
const i = new D(l, e, new S(), d ?? new m(), s);
|
|
78
|
+
return i.firstInit(), a = i, r = !1, c(!!n.loading), o("tableReady", i.getApi(), n.tableReady), i;
|
|
78
79
|
});
|
|
79
80
|
M(() => {
|
|
80
81
|
a === h && (a = void 0), h.destroy();
|
|
81
82
|
});
|
|
82
83
|
}), u(() => {
|
|
83
84
|
const e = !!n.loading;
|
|
84
|
-
|
|
85
|
+
C(() => c(e));
|
|
85
86
|
}), u(() => {
|
|
86
87
|
const e = n.licenseKey;
|
|
87
88
|
e && w.getInstance().setLicenseKey(e);
|
|
88
89
|
}), (() => {
|
|
89
90
|
var e = R(), d = t;
|
|
90
|
-
return typeof d == "function" ?
|
|
91
|
+
return typeof d == "function" ? f(d, e) : t = e, e;
|
|
91
92
|
})();
|
|
92
93
|
};
|
|
93
94
|
export {
|
|
94
95
|
z as ComponentRendererWrapper,
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
A as DetailComponentRendererWrapper,
|
|
97
|
+
O as GuiexpertTable
|
|
97
98
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiexpert/solid-table",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.116",
|
|
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.116"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"solid-js": "^1.0.0"
|