@guiexpert/svelte-table 1.0.1 → 1.0.4

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,8 +1,9 @@
1
1
  {
2
2
  "name": "@guiexpert/svelte-table",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
+ "type": "module",
4
5
  "scripts": {
5
- "publish": "npm publish"
6
+ "publish": "npm publish --access=public"
6
7
  },
7
8
  "main": "./index.js",
8
9
  "types": "./index.d.ts",
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/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/svelte-table.iml" filepath="$PROJECT_DIR$/.idea/svelte-table.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
package/project.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "name": "@guiexpert/svelte-table",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "libs/svelte-table/src",
5
- "projectType": "library",
6
- "tags": [],
7
- "targets": {
8
- "lint": {
9
- "executor": "@nrwl/linter:eslint",
10
- "outputs": [
11
- "{options.outputFile}"
12
- ],
13
- "options": {
14
- "lintFilePatterns": [
15
- "libs/svelte-table/**/*.{ts,svelte,spec.ts}"
16
- ]
17
- }
18
- },
19
- "check": {
20
- "executor": "nx:run-commands",
21
- "options": {
22
- "command": "svelte-check",
23
- "cwd": "libs/svelte-table"
24
- }
25
- },
26
- "test": {
27
- "executor": "@nxext/vitest:vitest",
28
- "options": {
29
- "vitestConfig": "libs/svelte-table/vitest.config.ts"
30
- }
31
- }
32
- }
33
- }
@@ -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
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,59 +0,0 @@
1
- <script>
2
- import { createEventDispatcher, onMount } from "svelte";
3
- import { SimpleDomService, TableOptions, TableScope } from "@guiexpert/table";
4
-
5
- export let tableModel;
6
- export let tableOptions = new TableOptions();
7
-
8
- let root;
9
- const dispatch = createEventDispatcher();
10
-
11
- onMount(() => {
12
-
13
- const listener = {
14
- onCheckboxChanged: (evt) => {
15
- dispatch("checkboxChanged", evt);
16
- },
17
-
18
- onContextmenu: (evt) => {
19
- dispatch("contextmenu", evt);
20
- },
21
-
22
- onModelChanged: (evt) => {
23
- dispatch("modelChanged", evt);
24
- },
25
-
26
- onMouseClicked: (evt) => {
27
- dispatch("mouseClicked", evt);
28
- },
29
-
30
- onMouseDragging: (evt) => {
31
- dispatch("mouseDragging", evt);
32
- },
33
-
34
- onMouseDraggingEnd: (evt) => {
35
- dispatch("mouseDraggingEnd", evt);
36
- },
37
-
38
- onMouseMoved: (evt) => {
39
- dispatch("mouseMoved", evt);
40
- }
41
- };
42
-
43
- const tableScope = new TableScope(
44
- root, tableModel, new SimpleDomService(), tableOptions, listener
45
- );
46
- tableScope.firstInit();
47
- dispatch("tableReady", tableScope.getApi());
48
- });
49
- </script>
50
-
51
- <div
52
- bind:this={root}
53
- class="ge-table"
54
- style="width: 100%; height: 100%; background-color: transparent; padding: 0; margin: 0">
55
- </div>
56
-
57
- <style>
58
-
59
- </style>
package/svelte.config.cjs DELETED
@@ -1,7 +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
- };
package/tsconfig.json DELETED
@@ -1,38 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "moduleResolution": "node",
5
- "target": "es2017",
6
- /**
7
- Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript
8
- to enforce using `import type` instead of `import` for Types.
9
- */
10
- "importsNotUsedAsValues": "error",
11
- "isolatedModules": true,
12
- /**
13
- To have warnings/errors of the Svelte compiler at the correct position,
14
- enable source maps by default.
15
- */
16
- "sourceMap": true,
17
- /** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */
18
- "types": [
19
- "svelte"
20
- ],
21
- "strict": false,
22
- "esModuleInterop": true,
23
- "skipLibCheck": true,
24
- "forceConsistentCasingInFileNames": true,
25
- /** Needed for the vite-tsconfig-paths vite plugin. */
26
- "checkJs": true
27
- },
28
- "files": [],
29
- "include": [],
30
- "references": [
31
- {
32
- "path": "./tsconfig.lib.json"
33
- },
34
- {
35
- "path": "./tsconfig.spec.json"
36
- }
37
- ]
38
- }
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/vitest.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { mergeConfig } from "vite";
2
- import { svelte } from "@sveltejs/vite-plugin-svelte";
3
- import baseConfig from "../../vitest.config";
4
-
5
- export default mergeConfig(baseConfig, {
6
- plugins: [svelte({ hot: !process.env.VITEST })]
7
- });
File without changes