Skip to content

Commit c410ed8

Browse files
committed
Migrate to Blueprint 5
1 parent d155d47 commit c410ed8

File tree

15 files changed

+5483
-18677
lines changed

15 files changed

+5483
-18677
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Blueprint Datagrid
22

3-
Blueprint Datagrid is an enhanced table component for [Blueprint 4](https://blueprintjs.com/). It adds features like paging, sorting and filtering to basic Blueprint tables. Blueprint Datagrid is built with Blueprint components and styling and stays faithful to the look-and-feel of the library in both dark and light mode. It supports and is written in Typescript.
3+
Blueprint Datagrid is an enhanced table component for [Blueprint 5](https://blueprintjs.com/). It adds features like paging, sorting and filtering to basic Blueprint tables. Blueprint Datagrid is built with Blueprint components and styling and stays faithful to the look-and-feel of the library in both dark and light mode. It supports and is written in Typescript.
44

55
Documentation and examples can be found on the project's [Github Page](https://alex-c.github.io/blueprint-datagrid/)!
66

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ To run:
99

1010
You might need to link the docs app's React to the parent project's React with `npm link`:
1111

12+
- Build the library with `npm run build`
1213
- Navigate to the docs app's `node_modules/react`
1314
- Execute `npm link`
1415
- Navigate to the parent project's main directory

docs/package-lock.json

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

docs/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44
"private": true,
55
"homepage": "https://alex-c.github.io/blueprint-datagrid/",
66
"dependencies": {
7-
"@blueprintjs/core": "^4.14.3",
8-
"@blueprintjs/icons": "~4.12.2",
9-
"@blueprintjs/popover2": "^1.11.3",
10-
"@blueprintjs/select": "^4.8.16",
11-
"@reduxjs/toolkit": "^1.8.2",
12-
"@types/node": "^17.0.35",
13-
"@types/react": "^17.0.2",
14-
"@types/react-dom": "^17.0.2",
7+
"@blueprintjs/core": "^5.0.0",
8+
"@blueprintjs/icons": "^5.0.0",
9+
"@blueprintjs/select": "^5.0.0",
10+
"@reduxjs/toolkit": "^2.0.1",
11+
"@types/node": "^20.0.0",
12+
"@types/react": "^18.2.0",
13+
"@types/react-dom": "^18.2.0",
1514
"blueprint-datagrid": "file:..",
1615
"highlight.js": "^11.7.0",
17-
"react": "^17.0.2",
18-
"react-dom": "^17.0.2",
16+
"react": "^18.2.0",
17+
"react-dom": "^18.2.0",
1918
"react-redux": "^8.0.2",
2019
"react-router": "^6.3.0",
2120
"react-router-dom": "^6.3.0",

docs/src/app-slice.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const initialState = {
1111
};
1212

1313
const setDarModeActive = (isDarkModeActive: boolean) => {
14-
document.body.className = isDarkModeActive ? "bp4-dark" : "bp4-body";
14+
document.body.className = isDarkModeActive ? "bp5-dark" : "bp5-body";
1515
};
1616
setDarModeActive(initialState.isDarkModeActive);
1717

@@ -25,7 +25,6 @@ export const appSlice = createSlice({
2525
state.isDarkModeActive = action.payload;
2626
},
2727
},
28-
extraReducers: {},
2928
});
3029

3130
export const appReducer = appSlice.reducer;

docs/src/components/example.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { Button } from "@blueprintjs/core";
1+
import { Button, Tooltip } from "@blueprintjs/core";
22
import { IconNames } from "@blueprintjs/icons";
3-
import { Tooltip2 } from "@blueprintjs/popover2";
43
import { useState } from "react";
54
import { CodeBlock } from "./code-block";
65
import "./example.scss";
@@ -17,9 +16,9 @@ export const Example = (props: ExampleProps) => {
1716
return (
1817
<div className="example">
1918
<div className="example-controls">
20-
<Tooltip2 content={showCode ? "Show example" : "Show code"}>
19+
<Tooltip content={showCode ? "Show example" : "Show code"}>
2120
<Button icon={showCode ? IconNames.PANEL_TABLE : IconNames.CODE} onClick={() => setShowCode(!showCode)} />
22-
</Tooltip2>
21+
</Tooltip>
2322
</div>
2423
{showCode ? <CodeBlock code={props.code} /> : <div className="example-table">{props.children}</div>}
2524
</div>

docs/src/data/pepper-varieties/pepper-variety-slice.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export const varietySlice = createSlice({
1313
name: "varieties",
1414
initialState,
1515
reducers: {},
16-
extraReducers: {},
1716
});
1817

1918
export const varietyReducer = varietySlice.reducer;

docs/src/data/users/user-slice.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export const userSlice = createSlice({
1919
name: "users",
2020
initialState,
2121
reducers: {},
22-
extraReducers: {},
2322
});
2423

2524
export const userReducer = userSlice.reducer;

docs/src/index.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
@import "~normalize.css";
33
@import "~@blueprintjs/core/lib/css/blueprint.css";
44
@import "~@blueprintjs/icons/lib/css/blueprint-icons.css";
5-
@import "~@blueprintjs/popover2/lib/css/blueprint-popover2.css";
65
@import "~@blueprintjs/core/lib/scss/variables";
76

87
html {
9-
.bp4-dark {
8+
.bp5-dark {
109
background-color: $pt-dark-app-background-color;
1110
}
1211
}
@@ -17,9 +16,9 @@ body,
1716
height: 100%;
1817
}
1918

20-
body.bp4-dark {
19+
body.bp5-dark {
2120
@include meta.load-css("node_modules/highlight.js/styles/github-dark.css");
2221
}
23-
body:not(.bp4-dark) {
22+
body:not(.bp5-dark) {
2423
@include meta.load-css("node_modules/highlight.js/styles/github.css");
2524
}

docs/src/pages/page-home.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const HomePage = () => {
3939
<p>
4040
Welcome to the <strong>Blueprint Datagrid</strong> documentation! <strong>Blueprint Datagrid</strong> is an enhanced table component for{" "}
4141
<a href="https://blueprintjs.com/" target="_blank" rel="noreferrer">
42-
Blueprint 4
42+
Blueprint 5
4343
</a>
4444
. It adds features like paging, sorting and filtering to basic Blueprint tables. <strong>Blueprint Datagrid</strong> is built with Blueprint components and styling and
4545
stays faithful to the look-and-feel of the library in both dark and light mode. It supports and is written in Typescript.
@@ -65,17 +65,14 @@ export const HomePage = () => {
6565
</Section>
6666
<Section title="Dependencies">
6767
<p>
68-
<strong>Blueprint Datagrid</strong> depends on the following <a href="https://blueprintjs.com/">Blueprint 4</a> packages:
68+
<strong>Blueprint Datagrid</strong> depends on the following <a href="https://blueprintjs.com/">Blueprint 5</a> packages:
6969
<ul>
7070
<li>
7171
<a href="https://www.npmjs.com/package/@blueprintjs/core">@blueprintjs/core</a>
7272
</li>
7373
<li>
7474
<a href="https://www.npmjs.com/package/@blueprintjs/icons">@blueprintjs/icons</a>
7575
</li>
76-
<li>
77-
<a href="https://www.npmjs.com/package/@blueprintjs/popover2">@blueprintjs/popover2</a>
78-
</li>
7976
<li>
8077
<a href="https://www.npmjs.com/package/@blueprintjs/select">@blueprintjs/select</a>
8178
</li>

0 commit comments

Comments
 (0)