@guiexpert/solid-table 1.0.18 → 1.0.20

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/package.json CHANGED
@@ -1,21 +1,24 @@
1
1
  {
2
2
  "name": "@guiexpert/solid-table",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "lib": {
8
8
  "entryFile": "src/index.ts"
9
9
  },
10
+ "publishConfig": {
11
+ "directory": "dist"
12
+ },
10
13
  "exports": {
11
14
  ".": {
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
15
+ "import": "./index.js",
16
+ "require": "./index.cjs"
14
17
  }
15
18
  },
16
19
  "dependencies": {
17
20
  "tslib": "^2.3.0",
18
- "@guiexpert/table": "^1.1.23"
21
+ "@guiexpert/table": "^1.1.25"
19
22
  },
20
23
  "devDependencies": {
21
24
  "solid-jest": "^0.2.0",
@@ -40,6 +43,6 @@
40
43
  "i": "pnpm i",
41
44
  "patch-version": "node patch.js",
42
45
  "build": "vite build",
43
- "npm-pub": "pnpm publish --access public"
46
+ "npm-pub": "pnpm publish --no-git-checks --access public"
44
47
  }
45
48
  }
package/.eslintrc.js DELETED
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- parser: "@typescript-eslint/parser",
3
- plugins: ["solid", "@typescript-eslint"],
4
- extends: ["../../.eslintrc.json"],
5
- ignorePatterns: ["!**/*"],
6
- overrides: [
7
- {
8
- files: ["*.ts", "*.js", "*.tsx"],
9
- parserOptions: {
10
- project: ["libs/solid-table/tsconfig.*?.json"]
11
- },
12
- rules: {}
13
- },
14
- {
15
- files: ["*.ts", "*.tsx"],
16
- rules: {}
17
- },
18
- {
19
- files: ["*.js", "*.jsx"],
20
- rules: {}
21
- }
22
- ],
23
- settings: {
24
- "solid/typescript": require("typescript")
25
- }
26
- };
package/dist/README.md DELETED
@@ -1,97 +0,0 @@
1
-
2
- # SolidTable (GuiExpert Table)
3
-
4
- This is the Solid component of the GuiExpert Table Project.
5
-
6
- ## Become a master at creating web applications with large tables
7
-
8
- This is the UI-agnostic table component for your next web app. 😊
9
-
10
- <img src="https://raw.githubusercontent.com/guiexperttable/ge-table/main/apps/table-website/src/assets/screens/heatmap.png" width="50%">
11
-
12
- ### Features
13
- - Handle large datasets easily
14
- - Excellent performance for large tables by vertical and horizontal virtual scrolling
15
- - Fully-featured (advanced sorting and filtering)
16
- - Highly customizable orderData grid
17
- - Outstanding performance
18
- - No third-party dependencies
19
- - UI-agnostic
20
- - Column Interactions (resize, reorder)
21
- - Sorting Rows
22
- - Row, Column, and Range Selection
23
- - Single and Multi Selection
24
- - UI-agnostic
25
- - Row and Column Spanning
26
- - Fixed Columns (Left and Right)
27
- - Tree table (Hierarchical View)
28
- - Accessibility support: Keyboard Shortcuts
29
- - Custom Filtering
30
- - In-place Cell Editing
31
- - Userdefined Key and Mouse Events
32
- - Customizable Look & Feel (via CSS variables)
33
- - Row sorting
34
- - Column Reordering (Drag and Drop)
35
- - State Persistence (Row Sorting, Column Order, Selection)
36
- - Customizable Cell Contents via Renderer for Header, Body and Footer
37
- - Full control over the HTML structure and style
38
-
39
-
40
- ## Links
41
-
42
- - [Demos](https://gui.expert/demos)
43
- - [Documentation](https://gui.expert/doc)
44
- - [API](https://gui.expert/api)
45
-
46
- ## Get Started
47
-
48
- Add the following two NPM packages to your existing react project (run this in your project root directory):
49
-
50
- ```
51
- npm install --save @guiexpert/table @guiexpert/solid-table
52
- ```
53
-
54
- Import the following classes in your component:
55
- ```
56
- import { GuiexpertTable } from "@guiexpert/solid-table";
57
- import {
58
- GeMouseEvent,
59
- TableApi
60
- TableFactory,
61
- TableModelIf,
62
- TableOptions,
63
- TableOptionsIf
64
- } from "@guiexpert/table";
65
- ```
66
-
67
-
68
- Add this code to the component:
69
-
70
- ```
71
- function App() {
72
- let ref: any;
73
-
74
- onMount(() => {
75
- ref.addEventListener("mouseClicked", (e: CustomEvent<GeMouseEvent>) => console.info(e));
76
- ref.addEventListener("mouseMoved", (e: CustomEvent<GeMouseEvent>) => document.title = e.detail.rowIndex + "/" + e.detail.columnIndex);
77
- ref.addEventListener("tableReady", handleTableReady);
78
- });
79
-
80
- return (
81
- <div ref={ref}>
82
- <GuiexpertTable
83
- tableModel={tableModel}
84
- tableOptions={tableOptions} />
85
- </div>
86
- );
87
- }
88
- function handleTableReady(api: any) {
89
- console.info("Table API:", api.detail);
90
- }
91
- ```
92
-
93
- There are numerous possibilities to create table models.
94
- Please refer to the [Documentation](https://gui.expert/doc) for further information or the [Demo](https://gui.expert/demos) section for examples.
95
-
96
-
97
-
package/dist/package.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "name": "@guiexpert/solid-table",
3
- "version": "1.0.18",
4
- "type": "module",
5
- "main": "./index.js",
6
- "types": "./index.d.ts",
7
- "lib": {
8
- "entryFile": "src/index.ts"
9
- },
10
- "scripts": {
11
- "i": "pnpm i",
12
- "patch-version": "node patch.js",
13
- "build": "vite build",
14
- "npm-pub": "pnpm publish --access public"
15
- },
16
- "exports": {
17
- ".": {
18
- "import": "./dist/index.js",
19
- "require": "./dist/index.cjs"
20
- }
21
- },
22
- "dependencies": {
23
- "tslib": "^2.3.0",
24
- "@guiexpert/table": "workspace:^"
25
- },
26
- "devDependencies": {
27
- "solid-jest": "^0.2.0",
28
- "solid-js": "^1.6.10",
29
- "solid-testing-library": "^0.5.1",
30
- "@types/react": "^18.2.37",
31
- "@types/react-dom": "^18.2.15",
32
- "@types/node": "^20.11.17",
33
- "vite": "^5.1.1",
34
- "vite-plugin-dts": "^3.7.2",
35
- "vite-plugin-eslint": "^1.8.1",
36
- "vite-plugin-static-copy": "^0.17.0",
37
- "vite-tsconfig-paths": "^4.2.1",
38
- "vite-plugin-babel": "^1.2.0",
39
- "vite-plugin-solid": "^2.7.2",
40
- "@vitejs/plugin-react": "^4.1.1",
41
- "ts-node": "10.9.1",
42
- "tsconfig": "^7.0.0",
43
- "typescript": "5.2.2"
44
- }
45
- }
package/jest.config.ts DELETED
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
- export default {
3
- displayName: "solid-table",
4
- preset: "../../jest.preset.js",
5
- transform: {
6
- "^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }]
7
- },
8
- moduleFileExtensions: ["ts", "js", "html"],
9
- coverageDirectory: "../../coverage/libs/solid-table"
10
- };
package/patch.js DELETED
@@ -1,16 +0,0 @@
1
- import fs from 'fs';
2
-
3
- const packageJsonPath = 'package.json';
4
-
5
- try {
6
- const pack = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
7
- const currentVersion = pack.version;
8
- const [major, minor, patch] = currentVersion.split('.').map(Number);
9
- const newPatchVersion = `${major}.${minor}.${patch + 1}`;
10
- pack.version = newPatchVersion;
11
- fs.writeFileSync(packageJsonPath, JSON.stringify(pack, null, 2));
12
- console.log(`${pack.name} -> version patched to ${newPatchVersion}.`);
13
-
14
- } catch (error) {
15
- console.error('Error:', error);
16
- }
@@ -1,37 +0,0 @@
1
- import { AreaIdent, AreaModelIf, CellRendererIf, DomServiceIf, RendererCleanupFnType } from "@guiexpert/table";
2
- import { JSX } from "solid-js/jsx-runtime";
3
- import { mergeProps, render } from "solid-js/web";
4
-
5
- export class ComponentRendererWrapper implements CellRendererIf {
6
-
7
- constructor(
8
- private readonly code: (props: any) => JSX.Element
9
- ) {
10
- }
11
-
12
- render(
13
- cellDiv: HTMLDivElement,
14
- rowIndex: number,
15
- columnIndex: number,
16
- areaIdent: AreaIdent,
17
- areaModel: AreaModelIf,
18
- cellValue: any,
19
- _domService: DomServiceIf): RendererCleanupFnType | undefined {
20
-
21
- const props = mergeProps({
22
- rowIndex,
23
- columnIndex,
24
- areaIdent,
25
- areaModel,
26
- cellValue
27
- });
28
- render(
29
- () => this.code(props),
30
- cellDiv
31
- );
32
-
33
- return undefined;
34
- }
35
-
36
-
37
- }
@@ -1,92 +0,0 @@
1
- import {GuiexpertTableProps} from "./GuiexpertTableProps";
2
- import {mergeProps, onMount} from "solid-js";
3
- import {
4
- EventListenerIf,
5
- FocusModelIf,
6
- LicenseManager,
7
- SelectionModelIf,
8
- SimpleDomService,
9
- TableOptions,
10
- TableScope
11
- } from '@guiexpert/table';
12
-
13
-
14
-
15
- /**
16
- * Render a table component with specified properties
17
- *
18
- * @param {GuiexpertTableProps} props - The properties of the table component
19
- * @returns {JSX.Element} - The rendered table component
20
- */
21
- export default (props: GuiexpertTableProps) => {
22
-
23
- let ref:any;
24
-
25
- const merged = mergeProps({
26
- tableModel: null,
27
- tableOptions: new TableOptions()
28
- }, props);
29
-
30
-
31
- onMount(() => {
32
- const listener: EventListenerIf = {
33
- onSelectionChanged(model: SelectionModelIf): void {
34
- const e = new CustomEvent("selectionChanged", { detail: model, bubbles: true });
35
- if (ref) ref.dispatchEvent(e);
36
- },
37
-
38
- onFocusChanged(model: FocusModelIf): void{
39
- const e = new CustomEvent("focusChanged", { detail: model, bubbles: true });
40
- if (ref) ref.dispatchEvent(e);
41
- },
42
-
43
- onCheckboxChanged: (evt: any) => {
44
- const e = new CustomEvent("checkboxChanged", { detail: evt, bubbles: true });
45
- if (ref) ref.dispatchEvent(e);
46
- },
47
-
48
- onContextmenu: (evt: any) => {
49
- const e = new CustomEvent("contextmenu", { detail: evt, bubbles: true });
50
- if (ref) ref.dispatchEvent(e);
51
- },
52
-
53
- onModelChanged: (evt: any) => {
54
- const e = new CustomEvent("modelChanged", { detail: evt, bubbles: true });
55
- if (ref) ref.dispatchEvent(e);
56
- },
57
-
58
- onMouseClicked: (evt: any) => {
59
- const e = new CustomEvent("mouseClicked", { detail: evt, bubbles: true });
60
- if (ref) ref.dispatchEvent(e);
61
- },
62
-
63
- onMouseDragging: (evt: any) => {
64
- const e = new CustomEvent("mouseDragging", { detail: evt, bubbles: true });
65
- if (ref) ref.dispatchEvent(e);
66
- },
67
-
68
- onMouseDraggingEnd: (evt: any) => {
69
- const e = new CustomEvent("mouseDraggingEnd", { detail: evt, bubbles: true });
70
- if (ref) ref.dispatchEvent(e);
71
- },
72
-
73
- onMouseMoved: (evt: any) => {
74
- const e = new CustomEvent("mouseMoved", { detail: evt, bubbles: true });
75
- if (ref) ref.dispatchEvent(e);
76
- }
77
- };
78
-
79
- const tableScope = new TableScope(
80
- ref, merged.tableModel, new SimpleDomService(), merged.tableOptions, listener
81
- );
82
- tableScope.firstInit();
83
- const e = new CustomEvent("tableReady", { detail: tableScope.getApi(), bubbles: true });
84
- if (ref) ref.dispatchEvent(e);
85
-
86
- if (merged.licenseKey) LicenseManager.getInstance().setLicenseKey(merged.licenseKey);
87
- });
88
-
89
- return (
90
- <div ref={ref} />
91
- );
92
- }
@@ -1,29 +0,0 @@
1
-
2
- import {
3
- FocusModelIf,
4
- GeModelChangeEvent, GeMouseEvent, SelectionModelIf, TableApi, TableModelIf, TableOptions
5
- } from '@guiexpert/table';
6
-
7
- export type GeMouseEventFn = (evt: GeMouseEvent) => {};
8
- export type GeCheckboxEventFn = (evt: any[]) => {};
9
- export type GeTableReadyEventFn = (evt: TableApi) => {};
10
- export type GeModelChangeEventFn = (evt: GeModelChangeEvent) => {};
11
- export type GeSelectionChangeEventFn = (evt: SelectionModelIf) => {};
12
- export type GeFocusChangeEventFn = (evt: FocusModelIf) => {};
13
-
14
- export interface GuiexpertTableProps {
15
- tableModel: TableModelIf,
16
- tableOptions?: TableOptions,
17
- mouseMoved?: GeMouseEventFn,
18
- contextmenu?: GeMouseEventFn,
19
- mouseClicked?: GeMouseEventFn,
20
- mouseDragging?: GeMouseEventFn,
21
- mouseDraggingEnd?: GeMouseEventFn,
22
- checkboxChanged?: GeCheckboxEventFn,
23
- modelChanged?: GeModelChangeEventFn,
24
- selectionChanged?: GeSelectionChangeEventFn;
25
- focusChanged?: GeFocusChangeEventFn;
26
- tableReady?: GeTableReadyEventFn,
27
- licenseKey?: string,
28
- }
29
-
@@ -1,10 +0,0 @@
1
- import { AreaIdent, AreaModelIf } from "@guiexpert/table";
2
-
3
- // TODO
4
- export interface RendererPropsIf {
5
- rowIndex: number;
6
- columnIndex: number;
7
- areaIdent: AreaIdent;
8
- areaModel: AreaModelIf;
9
- cellValue: any;
10
- }
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
1
-
2
- import { ComponentRendererWrapper } from "./ComponentRendererWrapper";
3
- import * as GuiexpertTableProps from "./GuiexpertTableProps";
4
- import GuiexpertTable from "./GuiexpertTable";
5
-
6
-
7
- export {
8
- GuiexpertTable,
9
- GuiexpertTableProps,
10
- ComponentRendererWrapper
11
- };
package/tsconfig.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "strict": true,
5
- "target": "ESNext",
6
- "module": "ESNext",
7
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
8
- "moduleResolution": "node",
9
- "allowSyntheticDefaultImports": true,
10
- "esModuleInterop": true,
11
- "jsx": "preserve",
12
- "jsxImportSource": "solid-js",
13
- "noEmit": true,
14
- "isolatedModules": true,
15
- "skipLibCheck": true,
16
- "types": [
17
- ]
18
- },
19
- "files": [],
20
- "include": ["src"],
21
- "exclude": ["node_modules", "dist"],
22
- "references": [
23
- {
24
- "path": "./tsconfig.lib.json"
25
- },
26
- {
27
- "path": "./tsconfig.spec.json"
28
- }
29
- ]
30
- }
package/tsconfig.lib.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc"
5
- },
6
- "include": [
7
- "src/**/*"
8
- ],
9
- "exclude": [
10
- "**/*.spec.ts",
11
- "**/*_spec.ts",
12
- "**/*.spec.tsx",
13
- "**/*_spec.tsx",
14
- "public/*"
15
- ]
16
- }
@@ -1,17 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": [
7
- "jest",
8
- "node"
9
- ]
10
- },
11
- "include": [
12
- "jest.config.ts",
13
- "src/**/*.test.ts",
14
- "src/**/*.spec.ts",
15
- "src/**/*.d.ts"
16
- ]
17
- }
package/vite.config.ts DELETED
@@ -1,58 +0,0 @@
1
-
2
- import { defineConfig } from "vite";
3
- import solidPlugin from 'vite-plugin-solid';
4
- import dts from "vite-plugin-dts";
5
- import { join } from "path";
6
- import {viteStaticCopy} from "vite-plugin-static-copy";
7
-
8
- export default defineConfig({
9
- cacheDir: "../../node_modules/.vite/solid-table",
10
-
11
- plugins: [
12
- dts({
13
- entryRoot: "src",
14
- tsconfigPath: join(__dirname, "tsconfig.lib.json"),
15
-
16
- }),
17
- solidPlugin(),
18
-
19
- viteStaticCopy({
20
- targets: [
21
- {
22
- src: 'README.md',
23
- dest: './'
24
- },
25
- {
26
- src: 'package.json',
27
- dest: './'
28
- }
29
- ]
30
- })
31
- ],
32
-
33
- // Configuration for building your library.
34
- // See: https://vitejs.dev/guide/build.html#library-mode
35
- build: {
36
- lib: {
37
- // Could also be a dictionary or array of multiple entry points.
38
- entry: "src/index.ts",
39
- name: "solid-table",
40
- fileName: "index",
41
- // Change this to the formats you want to support.
42
- // Don't forgot to update your package.json as well.
43
- formats: ["es", "cjs"]
44
- },
45
- rollupOptions: {
46
- // External packages that should not be bundled into your library.
47
- external: ["solid", "react-dom", "react/jsx-runtime"]
48
- }
49
- },
50
- resolve: {
51
- alias: [
52
- {
53
- find: /@guiexpert\/table/,
54
- replacement: join(__dirname, '..', 'table', 'src'),
55
- },
56
- ],
57
- }
58
- });
File without changes
File without changes
File without changes