@guiexpert/solid-table 1.1.89 → 1.1.91
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/GuiexpertTable.d.ts +4 -1
- package/index.cjs +1 -1
- package/index.d.ts +4 -4
- package/index.js +48 -43
- package/package.json +13 -5
package/GuiexpertTable.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { GuiexpertTableProps } from './GuiexpertTableProps';
|
|
1
|
+
import { GuiexpertTableProps } from './GuiexpertTableProps.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Render a table component with specified properties
|
|
5
5
|
*
|
|
6
|
+
* A new `tableModel` or `tableOptions` object (e.g. from a signal) re-creates the table; the previous table is
|
|
7
|
+
* released with `TableScope.destroy()`, as when the component is disposed. Callback props may change freely.
|
|
8
|
+
*
|
|
6
9
|
* @param {GuiexpertTableProps} props - The properties of the table component
|
|
7
10
|
* @returns {JSX.Element} - The rendered table component
|
|
8
11
|
*/
|
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 i=require("solid-js/web"),c=require("solid-js"),l=require("@guiexpert/table");class p{constructor(t){this.code=t}render(t,n,o,d,e,s,r){const u=i.mergeProps({rowIndex:n,columnIndex:o,areaIdent:d,areaModel:e,cellValue:s});return i.render(()=>this.code(u),t)}}var m=i.template("<div>");const b=g=>{let t;const n=c.mergeProps({tableModel:null,tableOptions:new l.TableOptions},g),o=(e,s,r)=>{r&&r(s),t&&t.dispatchEvent(new CustomEvent(e,{detail:s,bubbles:e!=="scroll"}))},d={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)};return c.createEffect(()=>{const e=n.tableModel,s=n.tableOptions,r=t;if(!r||!e)return;const u=c.untrack(()=>{const a=new l.TableScope(r,e,new l.SimpleDomService,s??new l.TableOptions,d);return a.firstInit(),o("tableReady",a.getApi(),n.tableReady),a});c.onCleanup(()=>u.destroy())}),c.createEffect(()=>{const e=n.licenseKey;e&&l.LicenseManager.getInstance().setLicenseKey(e)}),(()=>{var e=m(),s=t;return typeof s=="function"?i.use(s,e):t=e,e})()};exports.ComponentRendererWrapper=p;exports.GuiexpertTable=b;
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentRendererWrapper } from './ComponentRendererWrapper';
|
|
2
|
-
import { default as GuiexpertTable } from './GuiexpertTable';
|
|
1
|
+
import { ComponentRendererWrapper } from './ComponentRendererWrapper.js';
|
|
2
|
+
import { default as GuiexpertTable } from './GuiexpertTable.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
export { GuiexpertTable,
|
|
4
|
+
export * from './GuiexpertTableProps.js';
|
|
5
|
+
export { GuiexpertTable, ComponentRendererWrapper };
|
package/index.js
CHANGED
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import { mergeProps as
|
|
2
|
-
import { mergeProps as
|
|
3
|
-
import { TableOptions as
|
|
4
|
-
class
|
|
1
|
+
import { mergeProps as u, render as m, use as p, template as C } from "solid-js/web";
|
|
2
|
+
import { mergeProps as h, createEffect as d, untrack as b, onCleanup as f } from "solid-js";
|
|
3
|
+
import { TableOptions as g, LicenseManager as M, TableScope as v, SimpleDomService as x } from "@guiexpert/table";
|
|
4
|
+
class E {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
this.code = t;
|
|
7
7
|
}
|
|
8
|
-
render(t, o, n,
|
|
9
|
-
const
|
|
8
|
+
render(t, o, n, l, e, s, r) {
|
|
9
|
+
const a = u({
|
|
10
10
|
rowIndex: o,
|
|
11
11
|
columnIndex: n,
|
|
12
|
-
areaIdent:
|
|
13
|
-
areaModel:
|
|
14
|
-
cellValue:
|
|
12
|
+
areaIdent: l,
|
|
13
|
+
areaModel: e,
|
|
14
|
+
cellValue: s
|
|
15
15
|
});
|
|
16
|
-
return
|
|
17
|
-
() => this.code(
|
|
16
|
+
return m(
|
|
17
|
+
() => this.code(a),
|
|
18
18
|
t
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
25
|
-
var M = /* @__PURE__ */ u("<div>");
|
|
26
|
-
const k = (l) => {
|
|
22
|
+
var y = /* @__PURE__ */ C("<div>");
|
|
23
|
+
const w = (i) => {
|
|
27
24
|
let t;
|
|
28
|
-
const o =
|
|
25
|
+
const o = h({
|
|
29
26
|
tableModel: null,
|
|
30
|
-
tableOptions: new
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
27
|
+
tableOptions: new g()
|
|
28
|
+
}, i), n = (e, s, r) => {
|
|
29
|
+
r && r(s), t && t.dispatchEvent(new CustomEvent(e, {
|
|
30
|
+
detail: s,
|
|
31
|
+
bubbles: e !== "scroll"
|
|
32
|
+
}));
|
|
33
|
+
}, l = {
|
|
34
|
+
onSelectionChanged: (e) => n("selectionChanged", e, o.selectionChanged),
|
|
35
|
+
onFocusChanged: (e) => n("focusChanged", e, o.focusChanged),
|
|
36
|
+
onScroll: (e) => n("scroll", e, o.scroll),
|
|
37
|
+
onCheckboxChanged: (e) => n("checkboxChanged", e, o.checkboxChanged),
|
|
38
|
+
onContextmenu: (e) => n("contextmenu", e, o.contextmenu),
|
|
39
|
+
onModelChanged: (e) => n("modelChanged", e, o.modelChanged),
|
|
40
|
+
onMouseClicked: (e) => n("mouseClicked", e, o.mouseClicked),
|
|
41
|
+
onMouseDragging: (e) => n("mouseDragging", e, o.mouseDragging),
|
|
42
|
+
onMouseDraggingEnd: (e) => n("mouseDraggingEnd", e, o.mouseDraggingEnd),
|
|
43
|
+
onMouseMoved: (e) => n("mouseMoved", e, o.mouseMoved)
|
|
44
|
+
};
|
|
45
|
+
return d(() => {
|
|
46
|
+
const e = o.tableModel, s = o.tableOptions, r = t;
|
|
47
|
+
if (!r || !e)
|
|
48
|
+
return;
|
|
49
|
+
const a = b(() => {
|
|
50
|
+
const c = new v(r, e, new x(), s ?? new g(), l);
|
|
51
|
+
return c.firstInit(), n("tableReady", c.getApi(), o.tableReady), c;
|
|
52
|
+
});
|
|
53
|
+
f(() => a.destroy());
|
|
54
|
+
}), d(() => {
|
|
55
|
+
const e = o.licenseKey;
|
|
56
|
+
e && M.getInstance().setLicenseKey(e);
|
|
51
57
|
}), (() => {
|
|
52
|
-
var
|
|
53
|
-
return typeof
|
|
58
|
+
var e = y(), s = t;
|
|
59
|
+
return typeof s == "function" ? p(s, e) : t = e, e;
|
|
54
60
|
})();
|
|
55
61
|
};
|
|
56
62
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
D as GuiexpertTableProps
|
|
63
|
+
E as ComponentRendererWrapper,
|
|
64
|
+
w as GuiexpertTable
|
|
60
65
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiexpert/solid-table",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.91",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dr. Marc Kronberg <info@gui.expert> (https://gui.expert)",
|
|
6
6
|
"repository": {
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"import":
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"default": "./index.js"
|
|
28
|
+
},
|
|
26
29
|
"require": "./index.cjs"
|
|
27
30
|
}
|
|
28
31
|
},
|
|
29
32
|
"dependencies": {
|
|
30
33
|
"tslib": "^2.3.0",
|
|
31
|
-
"@guiexpert/table": "^1.1.
|
|
34
|
+
"@guiexpert/table": "^1.1.91"
|
|
32
35
|
},
|
|
33
36
|
"peerDependencies": {
|
|
34
37
|
"solid-js": "^1.0.0"
|
|
@@ -39,7 +42,7 @@
|
|
|
39
42
|
"@types/react": "^18.2.37 || ^19.0.0",
|
|
40
43
|
"@types/react-dom": "^18.2.15 || ^19.0.0",
|
|
41
44
|
"@types/node": "^20.11.17",
|
|
42
|
-
"vite": "6.
|
|
45
|
+
"vite": "6.4.4",
|
|
43
46
|
"vite-plugin-dts": "^3.7.2",
|
|
44
47
|
"vite-plugin-eslint": "^1.8.1",
|
|
45
48
|
"vite-plugin-static-copy": "^0.17.0",
|
|
@@ -50,12 +53,17 @@
|
|
|
50
53
|
"ts-node": "10.9.1",
|
|
51
54
|
"tsconfig": "^7.0.0",
|
|
52
55
|
"typescript": "5.2.2",
|
|
53
|
-
"@babel/core": "~7.28.6"
|
|
56
|
+
"@babel/core": "~7.28.6",
|
|
57
|
+
"vitest": "5.0.4",
|
|
58
|
+
"@vitest/browser-playwright": "5.0.4",
|
|
59
|
+
"playwright": "1.64.0"
|
|
54
60
|
},
|
|
55
61
|
"scripts": {
|
|
56
62
|
"i": "pnpm i",
|
|
57
63
|
"patch-version": "node patch.js",
|
|
58
64
|
"build": "vite build",
|
|
65
|
+
"test": "vitest run",
|
|
66
|
+
"test:watch": "vitest",
|
|
59
67
|
"npm-pub": "pnpm publish --no-git-checks --access public"
|
|
60
68
|
}
|
|
61
69
|
}
|