@guiexpert/svelte-table 4.0.5 → 4.0.6

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,12 +1,15 @@
1
1
  {
2
2
  "name": "@guiexpert/svelte-table",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
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
15
  "import": "./index.js",
@@ -16,7 +19,7 @@
16
19
  "dependencies": {
17
20
  "tslib": "^2.3.0",
18
21
  "preact": "^10.19.4",
19
- "@guiexpert/table": "^1.1.24"
22
+ "@guiexpert/table": "^1.1.25"
20
23
  },
21
24
  "devDependencies": {
22
25
  "svelte": "^4.2.1",
package/.eslintrc.js DELETED
@@ -1,30 +0,0 @@
1
- module.exports = {
2
- parser: "@typescript-eslint/parser",
3
- plugins: ["svelte3", "@typescript-eslint"],
4
- extends: ["../../.eslintrc.json"],
5
- ignorePatterns: ["!**/*", "vitest.config.ts"],
6
- overrides: [
7
- {
8
- files: ["*.ts", "*.js", "*.svelte"],
9
- parserOptions: {
10
- project: ["libs/svelte-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
- files: ["*.svelte"],
24
- processor: "svelte3/svelte3"
25
- }
26
- ],
27
- settings: {
28
- "svelte3/typescript": require("typescript")
29
- }
30
- };
package/dist/README.md DELETED
@@ -1,103 +0,0 @@
1
-
2
- # SvelteTable (GuiExpert Table)
3
-
4
- This is the Svelte 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 Svelte project (run this in your project root directory):
49
-
50
- ```
51
- npm install --save @guiexpert/table @guiexpert/svelte-table
52
- ```
53
-
54
- Add GuiexpertTable component to a template:
55
-
56
- ```
57
- <GuiexpertTable
58
- on:mouseClicked={handleMouseClicked}
59
- on:tableReady={handleTableReady}
60
- tableModel={tableModel}
61
- tableOptions={tableOptions}
62
- ></SvelteTable>
63
- ```
64
-
65
- Import the following classes in your component:
66
- ```
67
- <script lang="ts">
68
-
69
- import { GuiexpertTable } from "@guiexpert/svelte-table";
70
- import {
71
- GeMouseEvent,
72
- TableApi
73
- TableFactory,
74
- TableModelIf,
75
- TableOptions,
76
- TableOptionsIf
77
- } from "@guiexpert/table";
78
- ```
79
-
80
-
81
- Add a tableModel property and a onTableReady method to the component:
82
-
83
- ```
84
- const tableModel: TableModelIf = TableFactory.createTableModel({
85
- headerData: [
86
- ['Header 1', 'Header 2']
87
- ],
88
- bodyData: [
89
- ['Text 1a', 'Text 2a'],
90
- ['Text 1b', 'Text 2b'],
91
- ]
92
- });
93
-
94
- function onTableReady(api: TableApi) {
95
- console.info("onTableReady API:", api);
96
- }
97
- ```
98
-
99
- There are numerous possibilities to create table models.
100
- Please refer to the [Documentation](https://gui.expert/doc) for further information or the [Demo](https://gui.expert/demos) section for examples.
101
-
102
-
103
-
package/dist/package.json DELETED
@@ -1,50 +0,0 @@
1
- {
2
- "name": "@guiexpert/svelte-table",
3
- "version": "4.0.5",
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 --no-git-checks --access public"
15
- },
16
- "exports": {
17
- ".": {
18
- "import": "./index.js",
19
- "require": "./index.cjs"
20
- }
21
- },
22
- "dependencies": {
23
- "tslib": "^2.3.0",
24
- "@guiexpert/table": "workspace:^",
25
- "preact": "^10.19.4"
26
- },
27
- "devDependencies": {
28
- "svelte": "^4.2.1",
29
- "svelte-check": "^2.10.2",
30
- "svelte-jester": "^2.3.2",
31
- "svelte-preprocess": "^5.0.4",
32
- "@sveltejs/vite-plugin-svelte": "^2.5.2",
33
- "@testing-library/svelte": "^4.0.5",
34
- "@tsconfig/svelte": "^4.0.1",
35
- "eslint-plugin-svelte3": "^4.0.0",
36
- "@types/react": "^18.2.37",
37
- "@types/react-dom": "^18.2.15",
38
- "@types/node": "^20.11.17",
39
- "vite": "^5.1.1",
40
- "vite-plugin-dts": "^3.7.2",
41
- "vite-plugin-eslint": "^1.8.1",
42
- "vite-plugin-static-copy": "^0.17.0",
43
- "vite-tsconfig-paths": "^4.2.1",
44
- "vite-plugin-babel": "^1.2.0",
45
- "@vitejs/plugin-react": "^4.1.1",
46
- "ts-node": "10.9.1",
47
- "tsconfig": "^7.0.0",
48
- "typescript": "5.2.2"
49
- }
50
- }
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,38 +0,0 @@
1
- import { AreaIdent, AreaModelIf, CellRendererIf, DomServiceIf, RendererCleanupFnType } from "@guiexpert/table";
2
-
3
-
4
- export class ComponentRendererWrapper implements CellRendererIf {
5
-
6
- constructor(
7
- private readonly Component:any
8
- ) {
9
- }
10
-
11
- render(
12
- cellDiv: HTMLDivElement,
13
- rowIndex: number,
14
- columnIndex: number,
15
- areaIdent: AreaIdent,
16
- areaModel: AreaModelIf,
17
- cellValue: any,
18
- _domService: DomServiceIf): RendererCleanupFnType | undefined {
19
-
20
-
21
- const c = new this.Component({
22
- target: cellDiv,
23
- props: {
24
- cellDiv,
25
- rowIndex,
26
- columnIndex,
27
- areaIdent,
28
- areaModel,
29
- cellValue
30
- }
31
- });
32
- return () => {
33
- c.$destroy();
34
- };
35
- }
36
-
37
-
38
- }
@@ -1,67 +0,0 @@
1
- <script lang="ts">
2
- import { createEventDispatcher, onMount } from 'svelte';
3
- import { EventListenerIf, FocusModelIf, LicenseManager, SelectionModelIf, SimpleDomService, TableOptions, TableScope } from '../../table/src'; // "@guiexpert/table";
4
-
5
- export let tableModel: any;
6
- export let tableOptions = new TableOptions();
7
- export let licenseKey: string | undefined;
8
-
9
- let root: any;
10
- const dispatch = createEventDispatcher();
11
-
12
- onMount(() => {
13
-
14
- const listener: EventListenerIf = {
15
- onSelectionChanged(model: SelectionModelIf): void {
16
- dispatch('selectionChanged', model);
17
- },
18
- onFocusChanged(model: FocusModelIf): void{
19
- dispatch('focusChanged', model);
20
- },
21
- onCheckboxChanged: (evt: any) => {
22
- dispatch('checkboxChanged', evt);
23
- },
24
-
25
- onContextmenu: (evt: any) => {
26
- dispatch('contextmenu', evt);
27
- },
28
-
29
- onModelChanged: (evt: any) => {
30
- dispatch('modelChanged', evt);
31
- },
32
-
33
- onMouseClicked: (evt: any) => {
34
- dispatch('mouseClicked', evt);
35
- },
36
-
37
- onMouseDragging: (evt: any) => {
38
- dispatch('mouseDragging', evt);
39
- },
40
-
41
- onMouseDraggingEnd: (evt: any) => {
42
- dispatch('mouseDraggingEnd', evt);
43
- },
44
-
45
- onMouseMoved: (evt: any) => {
46
- dispatch('mouseMoved', evt);
47
- }
48
- };
49
-
50
- const tableScope = new TableScope(
51
- root, tableModel, new SimpleDomService(), tableOptions, listener
52
- );
53
- tableScope.firstInit();
54
- dispatch('tableReady', tableScope.getApi());
55
-
56
- if (licenseKey) LicenseManager.getInstance().setLicenseKey(licenseKey);
57
- });
58
- </script>
59
-
60
- <div
61
- bind:this={root}
62
- class="ge-table"
63
- style="width: 100%; height: 100%; background-color: transparent; padding: 0; margin: 0"></div>
64
-
65
- <style>
66
-
67
- </style>
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export { default as GuiexpertTable } from "./GuiexpertTable.svelte";
2
- export { ComponentRendererWrapper } from "./ComponentRendererWrapper";
package/src/vite-env.d.ts DELETED
@@ -1,2 +0,0 @@
1
- /// <reference types="svelte" />
2
- /// <reference types="vite/client" />
package/svelte.config.cjs DELETED
@@ -1,10 +0,0 @@
1
- const sveltePreprocess = require("svelte-preprocess");
2
-
3
- module.exports = {
4
- // Consult https://github.com/sveltejs/svelte-preprocess
5
- // for more information about preprocessors
6
- preprocess: sveltePreprocess(),
7
- vitePlugin: {
8
- prebundleSvelteLibraries: false
9
- }
10
- };
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": false,
11
- "jsx": "preserve",
12
- "jsxImportSource": "svelte-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,14 +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
- "public/*"
13
- ]
14
- }
@@ -1,18 +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
- "**/*.spec.ts",
13
- "**/*.spec.tsx",
14
- "**/*.spec.js",
15
- "**/*.spec.jsx",
16
- "**/*.d.ts"
17
- ]
18
- }
package/vite.config.mts DELETED
@@ -1,70 +0,0 @@
1
-
2
- import {defineConfig} from "vite";
3
- import {svelte} from '@sveltejs/vite-plugin-svelte';
4
- import dts from "vite-plugin-dts";
5
- import {join} from "path";
6
- import {viteStaticCopy} from "vite-plugin-static-copy";
7
-
8
-
9
- export default defineConfig({
10
- cacheDir: "../../node_modules/.vite/svelte-table",
11
-
12
- plugins: [
13
- dts({
14
- entryRoot: "src",
15
- tsconfigPath: join(__dirname, "tsconfig.lib.json"),
16
-
17
- }),
18
- svelte({
19
- prebundleSvelteLibraries: true
20
- }),
21
-
22
- viteStaticCopy({
23
- targets: [
24
- {
25
- src: 'README.md',
26
- dest: './'
27
- },
28
- {
29
- src: 'package.json',
30
- dest: './'
31
- }
32
- ]
33
- })
34
- ],
35
-
36
- // Uncomment this if you are using workers.
37
- // worker: {
38
- // plugins: [
39
- // viteTsConfigPaths({
40
- // root: '../../',
41
- // }),
42
- // ],
43
- // },
44
-
45
- // Configuration for building your library.
46
- // See: https://vitejs.dev/guide/build.html#library-mode
47
- build: {
48
- lib: {
49
- // Could also be a dictionary or array of multiple entry points.
50
- entry: "src/index.ts",
51
- name: "svelte-table",
52
- fileName: "index",
53
- // Change this to the formats you want to support.
54
- // Don't forgot to update your package.json as well.
55
- formats: ["es", "cjs"]
56
- },
57
- rollupOptions: {
58
- // External packages that should not be bundled into your library.
59
- external: ["svelte", "react-dom", "react/jsx-runtime"]
60
- }
61
- },
62
- resolve: {
63
- alias: [
64
- {
65
- find: /@guiexpert\/table/,
66
- replacement: join(__dirname, '..', 'table', 'src'),
67
- },
68
- ],
69
- }
70
- });
File without changes
File without changes
File without changes