Skip to content

Commit e3a6948

Browse files
committed
[update] to v10.0
1 parent 53b627b commit e3a6948

8 files changed

Lines changed: 407 additions & 389 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm install
1414
npm start
1515
```
1616

17-
The app starts locally with the public trial wrapper package `@dhtmlx/trial-react-gantt` pinned to `^9.1.4`.
17+
The app starts locally with the public trial wrapper package `@dhtmlx/trial-react-gantt` pinned to `^10.0.0`.
1818

1919
## Build for production
2020

package-lock.json

Lines changed: 390 additions & 377 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-gantt-examples",
33
"private": true,
4-
"version": "9.1.4",
4+
"version": "10.0.0",
55
"type": "module",
66
"scripts": {
77
"start": "vite",
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@ant-design/icons": "^5.6.1",
1414
"@base-ui-components/react": "^1.0.0-alpha.6",
15-
"@dhtmlx/trial-react-gantt": "^9.1.4",
15+
"@dhtmlx/trial-react-gantt": "^10.0.0",
1616
"@emotion/react": "^11.13.3",
1717
"@emotion/styled": "^11.13.0",
1818
"@mui/icons-material": "^6.1.0",
@@ -21,7 +21,7 @@
2121
"antd": "^5.24.1",
2222
"react": "^18.3.1",
2323
"react-dom": "^18.3.1",
24-
"react-draggable": "^4.4.6",
24+
"react-draggable": "~4.5.0",
2525
"react-router-dom": "^7.1.4",
2626
"dayjs": "^1.11.13"
2727
},

src/examples/custom-form/Demo.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export default function BasicInitDemo() {
3434
ref={ganttRef}
3535
tasks={tasks}
3636
links={links}
37-
customLightbox={<CustomLightbox />} />
37+
customLightbox={<CustomLightbox />}
38+
/>
3839
</div>
3940
);
4041
}

src/examples/inline-editors/Demo.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export default function BasicInitDemo() {
8888
TextEditor: TextEditor,
8989
DurationEditor: DurationEditor,
9090
DateEditor: DateEditor
91-
}}/>
91+
}}
92+
/>
9293
</div>
9394
);
9495
}

src/examples/redux-toolkit/Demo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ const ReactGanttExample: React.FC = () => {
8484
save: (entity, action, payload, id) => {
8585
if (entity === "task") {
8686
if (action === "update") {
87-
dispatch(updateTask(payload as Task));
87+
dispatch(updateTask(payload as SerializedTask));
8888
} else if (action === "create") {
89-
dispatch(createTask(payload as Task));
89+
dispatch(createTask(payload as SerializedTask));
9090
} else if (action === "delete") {
9191
dispatch(deleteTask(String(id)));
9292
}

src/redux/ganttSlice.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ const ganttSlice = createSlice({
8585
initialState,
8686
reducers: {
8787

88-
updateTask(state, action: PayloadAction<Task>) {
88+
updateTask(state, action: PayloadAction<SerializedTask>) {
8989
const updatedTask = action.payload;
9090
const index = state.tasks.findIndex(task => task.id === updatedTask.id);
9191
if (index !== -1) {
9292
state.tasks[index] = { ...state.tasks[index], ...updatedTask };
9393
}
9494
},
95-
createTask(state, action: PayloadAction<Task>) {
95+
createTask(state, action: PayloadAction<SerializedTask>) {
9696
state.tasks.push({...action.payload, id: `DB_ID:${action.payload.id}` });// emulate database ID
9797
},
9898
deleteTask(state, action: PayloadAction<string>) {

vite.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
import { defineConfig } from 'vite'
1+
import { defineConfig, type PluginOption } from 'vite'
22
import react from '@vitejs/plugin-react'
33

44
// https://vite.dev/config/
55
export default defineConfig({
66
base: './',
7-
plugins: [react()],
7+
// Cast works around a duplicate vite install: @vitejs/plugin-react resolves its
8+
// own nested vite, producing a Plugin type that is structurally identical but a
9+
// distinct type identity from this project's vite. Runtime is unaffected.
10+
plugins: [react() as PluginOption],
811
build:{
912
sourcemap:true,
1013
minify: false,

0 commit comments

Comments
 (0)