@guiexpert/react-table 18.0.7 → 18.0.9
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/README.md +1 -1
- package/package.json +5 -2
- package/.eslintrc.json +0 -34
- package/dist/README.md +0 -102
- package/dist/package.json +0 -45
- package/jest.config.ts +0 -11
- package/patch.js +0 -16
- package/src/index.ts +0 -2
- package/src/lib/component-renderer-wrapper.ts +0 -39
- package/src/lib/guiexpert-table.tsx +0 -168
- package/src/lib/react-table.module.css +0 -8
- package/src/lib/react-table.spec.tsx +0 -6
- package/tsconfig.json +0 -23
- package/tsconfig.lib.json +0 -30
- package/tsconfig.spec.json +0 -23
- package/vite.config.ts +0 -69
- /package/{dist/index.cjs → index.cjs} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/lib → lib}/component-renderer-wrapper.d.ts +0 -0
- /package/{dist/lib → lib}/guiexpert-table.d.ts +0 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ This is the react component of the GuiExpert Table Project.
|
|
|
7
7
|
|
|
8
8
|
This is the UI-agnostic table component for your next web app. 😊
|
|
9
9
|
|
|
10
|
-
<img src="https://raw.githubusercontent.com/guiexperttable/ge-table/main/apps/
|
|
10
|
+
<img src="https://raw.githubusercontent.com/guiexperttable/ge-table/main/apps/webpage-guiexpert/src/assets/screens/heatmap.png" width="50%">
|
|
11
11
|
|
|
12
12
|
### Features
|
|
13
13
|
- Handle large datasets easily
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiexpert/react-table",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.9",
|
|
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",
|
|
@@ -17,7 +20,7 @@
|
|
|
17
20
|
"tslib": "^2.3.0",
|
|
18
21
|
"react": "18.2.0",
|
|
19
22
|
"react-dom": "18.2.0",
|
|
20
|
-
"@guiexpert/table": "^1.1.
|
|
23
|
+
"@guiexpert/table": "^1.1.26"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
26
|
"@vitejs/plugin-react": "^4.1.1",
|
package/.eslintrc.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"plugin:@nrwl/nx/react",
|
|
4
|
-
"../../.eslintrc.json"
|
|
5
|
-
],
|
|
6
|
-
"ignorePatterns": [
|
|
7
|
-
"!**/*"
|
|
8
|
-
],
|
|
9
|
-
"overrides": [
|
|
10
|
-
{
|
|
11
|
-
"files": [
|
|
12
|
-
"*.ts",
|
|
13
|
-
"*.tsx",
|
|
14
|
-
"*.js",
|
|
15
|
-
"*.jsx"
|
|
16
|
-
],
|
|
17
|
-
"rules": {}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"files": [
|
|
21
|
-
"*.ts",
|
|
22
|
-
"*.tsx"
|
|
23
|
-
],
|
|
24
|
-
"rules": {}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"files": [
|
|
28
|
-
"*.js",
|
|
29
|
-
"*.jsx"
|
|
30
|
-
],
|
|
31
|
-
"rules": {}
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
package/dist/README.md
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# ReactTable (GuiExpert Table)
|
|
3
|
-
|
|
4
|
-
This is the react 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/react-table
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Add GuiexpertTable component to a template:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
return (
|
|
58
|
-
<>
|
|
59
|
-
<GuiexpertTable
|
|
60
|
-
tableModel={tableModel}
|
|
61
|
-
tableOptions={new TableOptions}
|
|
62
|
-
/>
|
|
63
|
-
</>
|
|
64
|
-
);
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Import the following classes in your component:
|
|
68
|
-
```
|
|
69
|
-
import { GuiexpertTable } from "@guiexpert/react-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
|
-
|
package/dist/package.json
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@guiexpert/react-table",
|
|
3
|
-
"version": "18.0.7",
|
|
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
|
-
"react": "18.2.0",
|
|
26
|
-
"react-dom": "18.2.0"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@vitejs/plugin-react": "^4.1.1",
|
|
30
|
-
"@types/react": "^18.2.37",
|
|
31
|
-
"@types/react-dom": "^18.2.15",
|
|
32
|
-
"@testing-library/react": "^14.1.0",
|
|
33
|
-
"@types/node": "^20.11.17",
|
|
34
|
-
"vite": "^5.1.1",
|
|
35
|
-
"vite-plugin-dts": "^3.7.2",
|
|
36
|
-
"vite-plugin-eslint": "^1.8.1",
|
|
37
|
-
"vite-plugin-static-copy": "^0.17.0",
|
|
38
|
-
"vite-tsconfig-paths": "^4.2.1",
|
|
39
|
-
"vite-plugin-babel": "^1.2.0",
|
|
40
|
-
"react-test-renderer": "^18.2.0",
|
|
41
|
-
"ts-node": "10.9.1",
|
|
42
|
-
"tsconfig": "^7.0.0",
|
|
43
|
-
"typescript": "5.2.2"
|
|
44
|
-
}
|
|
45
|
-
}
|
package/jest.config.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export default {
|
|
3
|
-
displayName: "react-table",
|
|
4
|
-
preset: "../../jest.preset.js",
|
|
5
|
-
transform: {
|
|
6
|
-
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nrwl/react/plugins/jest",
|
|
7
|
-
"^.+\\.[tj]sx?$": ["babel-jest", { presets: ["@nrwl/react/babel"] }]
|
|
8
|
-
},
|
|
9
|
-
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
|
|
10
|
-
coverageDirectory: "../../coverage/libs/react-table"
|
|
11
|
-
};
|
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
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AreaIdent, AreaModelIf, CellRendererIf, DomServiceIf, RendererCleanupFnType } from "@guiexpert/table";
|
|
2
|
-
import { createRoot } from "react-dom/client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export class ComponentRendererWrapper implements CellRendererIf {
|
|
6
|
-
|
|
7
|
-
constructor(
|
|
8
|
-
private readonly Component: any
|
|
9
|
-
) {
|
|
10
|
-
console.info(Component);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
render(
|
|
14
|
-
cellDiv: HTMLDivElement,
|
|
15
|
-
rowIndex: number,
|
|
16
|
-
columnIndex: number,
|
|
17
|
-
areaIdent: AreaIdent,
|
|
18
|
-
areaModel: AreaModelIf,
|
|
19
|
-
cellValue: any,
|
|
20
|
-
domService: DomServiceIf): RendererCleanupFnType | undefined {
|
|
21
|
-
|
|
22
|
-
const props = {
|
|
23
|
-
cellDiv,
|
|
24
|
-
rowIndex,
|
|
25
|
-
columnIndex,
|
|
26
|
-
areaIdent,
|
|
27
|
-
areaModel,
|
|
28
|
-
cellValue
|
|
29
|
-
};
|
|
30
|
-
const root = createRoot(cellDiv, {});
|
|
31
|
-
root.render(this.Component(props));
|
|
32
|
-
|
|
33
|
-
return () => {
|
|
34
|
-
root.unmount();
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EventListenerIf,
|
|
3
|
-
FocusModelIf,
|
|
4
|
-
GeModelChangeEvent,
|
|
5
|
-
GeMouseEvent, LicenseManager, SelectionModelIf,
|
|
6
|
-
SimpleDomService,
|
|
7
|
-
TableApi,
|
|
8
|
-
TableModelIf,
|
|
9
|
-
TableOptions,
|
|
10
|
-
TableScope
|
|
11
|
-
} from '@guiexpert/table';
|
|
12
|
-
import { useEffect, useRef } from "react";
|
|
13
|
-
|
|
14
|
-
export type GeMouseEventFn = (evt: GeMouseEvent) => {};
|
|
15
|
-
export type GeCheckboxEventFn = (evt: any[]) => {};
|
|
16
|
-
export type GeTableReadyEventFn = (evt: TableApi) => {};
|
|
17
|
-
export type GeModelChangeEventFn = (evt: GeModelChangeEvent) => {};
|
|
18
|
-
export type GeSelectionChangeEventFn = (evt: SelectionModelIf) => {};
|
|
19
|
-
export type GeFocusChangeEventFn = (evt: FocusModelIf) => {};
|
|
20
|
-
|
|
21
|
-
export interface GuiexpertTableProps {
|
|
22
|
-
tableModel: TableModelIf,
|
|
23
|
-
tableOptions?: TableOptions,
|
|
24
|
-
mouseMoved?: GeMouseEventFn,
|
|
25
|
-
contextmenu?: GeMouseEventFn,
|
|
26
|
-
mouseClicked?: GeMouseEventFn,
|
|
27
|
-
mouseDragging?: GeMouseEventFn,
|
|
28
|
-
mouseDraggingEnd?: GeMouseEventFn,
|
|
29
|
-
checkboxChanged?: GeCheckboxEventFn,
|
|
30
|
-
modelChanged?: GeModelChangeEventFn,
|
|
31
|
-
selectionChanged?: GeSelectionChangeEventFn;
|
|
32
|
-
focusChanged?: GeFocusChangeEventFn;
|
|
33
|
-
tableReady?: GeTableReadyEventFn,
|
|
34
|
-
licenseKey?: string,
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Initialize and render the GuiexpertTable component.
|
|
39
|
-
*
|
|
40
|
-
* @param {Object} props - The properties of the GuiexpertTable component.
|
|
41
|
-
* @param {TableModel} props.tableModel - The model for the table.
|
|
42
|
-
* @param {TableOptions} [props.tableOptions=new TableOptions()] - The options for the table.
|
|
43
|
-
* @param {Function} [props.mouseMoved] - The callback for mouse movement events.
|
|
44
|
-
* @param {Function} [props.checkboxChanged] - The callback for checkbox change events.
|
|
45
|
-
* @param {Function} [props.contextmenu] - The callback for context menu events.
|
|
46
|
-
* @param {Function} [props.modelChanged] - The callback for model change events.
|
|
47
|
-
* @param {Function} [props.mouseClicked] - The callback for mouse click events.
|
|
48
|
-
* @param {Function} [props.mouseDragging] - The callback for mouse dragging events.
|
|
49
|
-
* @param {Function} [props.mouseDraggingEnd] - The callback for mouse dragging end events.
|
|
50
|
-
* @param {Function} [props.tableReady] - The callback for when the table is ready.
|
|
51
|
-
* @param {string} [props.licenseKey] - The license key for the GuiexpertTable component.
|
|
52
|
-
*
|
|
53
|
-
* @returns {JSX.Element} - The rendered GuiexpertTable component.
|
|
54
|
-
*/
|
|
55
|
-
export function GuiexpertTable(
|
|
56
|
-
{
|
|
57
|
-
tableModel,
|
|
58
|
-
tableOptions = new TableOptions(),
|
|
59
|
-
mouseMoved,
|
|
60
|
-
checkboxChanged,
|
|
61
|
-
contextmenu,
|
|
62
|
-
modelChanged,
|
|
63
|
-
mouseClicked,
|
|
64
|
-
mouseDragging,
|
|
65
|
-
mouseDraggingEnd,
|
|
66
|
-
selectionChanged,
|
|
67
|
-
focusChanged,
|
|
68
|
-
tableReady,
|
|
69
|
-
licenseKey
|
|
70
|
-
}: GuiexpertTableProps) {
|
|
71
|
-
|
|
72
|
-
const myContainer = useRef(null);
|
|
73
|
-
let initialized = false;
|
|
74
|
-
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (myContainer.current && !initialized) {
|
|
77
|
-
initTable(myContainer.current);
|
|
78
|
-
initialized = true;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
let root: HTMLDivElement | null;
|
|
83
|
-
|
|
84
|
-
const initTable = (ele: HTMLDivElement) => {
|
|
85
|
-
const listener: EventListenerIf = {
|
|
86
|
-
|
|
87
|
-
onSelectionChanged(model: SelectionModelIf): void {
|
|
88
|
-
if (selectionChanged) {
|
|
89
|
-
selectionChanged(model);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
onFocusChanged(model: FocusModelIf): void{
|
|
94
|
-
if (focusChanged) {
|
|
95
|
-
focusChanged(model);
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
onCheckboxChanged: (evt: any[]) => {
|
|
100
|
-
if (checkboxChanged) {
|
|
101
|
-
checkboxChanged(evt);
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
onContextmenu: (evt: GeMouseEvent) => {
|
|
106
|
-
if (contextmenu) {
|
|
107
|
-
contextmenu(evt);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
onModelChanged: (evt: GeModelChangeEvent) => {
|
|
112
|
-
if (modelChanged) {
|
|
113
|
-
modelChanged(evt);
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
onMouseClicked: (evt: GeMouseEvent) => {
|
|
118
|
-
if (mouseClicked) {
|
|
119
|
-
mouseClicked(evt);
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
onMouseDragging: (evt: GeMouseEvent) => {
|
|
124
|
-
if (mouseDragging) {
|
|
125
|
-
mouseDragging(evt);
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
onMouseDraggingEnd: (evt: GeMouseEvent) => {
|
|
130
|
-
if (mouseDraggingEnd) {
|
|
131
|
-
mouseDraggingEnd(evt);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
onMouseMoved: (evt: GeMouseEvent) => {
|
|
136
|
-
if (mouseMoved) {
|
|
137
|
-
mouseMoved(evt);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const tableScope = new TableScope(
|
|
143
|
-
ele, tableModel, new SimpleDomService(), tableOptions, listener
|
|
144
|
-
);
|
|
145
|
-
tableScope.firstInit();
|
|
146
|
-
if (tableReady) {
|
|
147
|
-
tableReady(tableScope.getApi());
|
|
148
|
-
}
|
|
149
|
-
if (licenseKey) LicenseManager.getInstance().setLicenseKey(licenseKey);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
return (
|
|
153
|
-
<div
|
|
154
|
-
ref={myContainer}
|
|
155
|
-
className="container-div"
|
|
156
|
-
style={{
|
|
157
|
-
width: "100%",
|
|
158
|
-
height: "100%",
|
|
159
|
-
background: "transparent",
|
|
160
|
-
padding: "0",
|
|
161
|
-
margin: "0"
|
|
162
|
-
}}></div>
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export default GuiexpertTable;
|
|
167
|
-
|
|
168
|
-
|
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"jsx": "react-jsx",
|
|
4
|
-
"allowJs": false,
|
|
5
|
-
"esModuleInterop": false,
|
|
6
|
-
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"types": [
|
|
9
|
-
"vite/client"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"files": [],
|
|
13
|
-
"include": [],
|
|
14
|
-
"references": [
|
|
15
|
-
{
|
|
16
|
-
"path": "./tsconfig.lib.json"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"path": "./tsconfig.spec.json"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"extends": "../../tsconfig.base.json"
|
|
23
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"types": [
|
|
6
|
-
"node",
|
|
7
|
-
"vite/client"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
|
12
|
-
"../../node_modules/@nrwl/react/typings/image.d.ts"
|
|
13
|
-
],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"**/*.spec.ts",
|
|
16
|
-
"**/*.test.ts",
|
|
17
|
-
"**/*.spec.tsx",
|
|
18
|
-
"**/*.test.tsx",
|
|
19
|
-
"**/*.spec.js",
|
|
20
|
-
"**/*.test.js",
|
|
21
|
-
"**/*.spec.jsx",
|
|
22
|
-
"**/*.test.jsx"
|
|
23
|
-
],
|
|
24
|
-
"include": [
|
|
25
|
-
"**/*.js",
|
|
26
|
-
"**/*.jsx",
|
|
27
|
-
"**/*.ts",
|
|
28
|
-
"**/*.tsx"
|
|
29
|
-
]
|
|
30
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,23 +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/**/*.test.tsx",
|
|
16
|
-
"src/**/*.spec.tsx",
|
|
17
|
-
"src/**/*.test.js",
|
|
18
|
-
"src/**/*.spec.js",
|
|
19
|
-
"src/**/*.test.jsx",
|
|
20
|
-
"src/**/*.spec.jsx",
|
|
21
|
-
"src/**/*.d.ts"
|
|
22
|
-
]
|
|
23
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import react from "@vitejs/plugin-react";
|
|
4
|
-
import viteTsConfigPaths from "vite-tsconfig-paths";
|
|
5
|
-
import dts from "vite-plugin-dts";
|
|
6
|
-
import { join } from "path";
|
|
7
|
-
import {viteStaticCopy} from "vite-plugin-static-copy";
|
|
8
|
-
|
|
9
|
-
export default defineConfig({
|
|
10
|
-
cacheDir: "../../node_modules/.vite/react-table",
|
|
11
|
-
|
|
12
|
-
plugins: [
|
|
13
|
-
dts({
|
|
14
|
-
entryRoot: "src",
|
|
15
|
-
tsconfigPath: join(__dirname, "tsconfig.lib.json"),
|
|
16
|
-
|
|
17
|
-
}),
|
|
18
|
-
react(),
|
|
19
|
-
|
|
20
|
-
viteStaticCopy({
|
|
21
|
-
targets: [
|
|
22
|
-
{
|
|
23
|
-
src: 'README.md',
|
|
24
|
-
dest: './'
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
src: 'package.json',
|
|
28
|
-
dest: './'
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
})
|
|
32
|
-
],
|
|
33
|
-
|
|
34
|
-
// Uncomment this if you are using workers.
|
|
35
|
-
// worker: {
|
|
36
|
-
// plugins: [
|
|
37
|
-
// viteTsConfigPaths({
|
|
38
|
-
// root: '../../',
|
|
39
|
-
// }),
|
|
40
|
-
// ],
|
|
41
|
-
// },
|
|
42
|
-
|
|
43
|
-
// Configuration for building your library.
|
|
44
|
-
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
45
|
-
build: {
|
|
46
|
-
lib: {
|
|
47
|
-
// Could also be a dictionary or array of multiple entry points.
|
|
48
|
-
entry: "src/index.ts",
|
|
49
|
-
name: "react-table",
|
|
50
|
-
fileName: "index",
|
|
51
|
-
// Change this to the formats you want to support.
|
|
52
|
-
// Don't forgot to update your package.json as well.
|
|
53
|
-
formats: ["es", "cjs"]
|
|
54
|
-
},
|
|
55
|
-
rollupOptions: {
|
|
56
|
-
// External packages that should not be bundled into your library.
|
|
57
|
-
external: ["react", "react-dom", "react/jsx-runtime"]
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
resolve: {
|
|
61
|
-
alias: [
|
|
62
|
-
{
|
|
63
|
-
find: /@guiexpert\/table/,
|
|
64
|
-
replacement: join(__dirname, '..', 'table', 'src'),
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|