Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enterprise features #34

Merged
merged 27 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dbf724a
Added some features from the enterprise version
JordanMarr Apr 21, 2024
92c1f34
Update dependency table
mattgallagher92 May 24, 2024
ef9b677
Add CSS imports to v2 migration guide
mattgallagher92 May 24, 2024
4347315
Run fantomas
mattgallagher92 May 24, 2024
30601f8
Link to React Grid docs in doc comments
mattgallagher92 May 24, 2024
dd170b9
Improve comments for AgGrid.field
mattgallagher92 May 24, 2024
5acdcce
Fix onColumnGroupOpened
mattgallagher92 Jun 28, 2024
cbb0102
Update demo code to use new API
mattgallagher92 Jun 28, 2024
94ebf5f
Refactor property implementation
mattgallagher92 Jun 28, 2024
b0ef4fb
Remove commented out code
mattgallagher92 Jun 28, 2024
3fea3bb
Reinstate code (removed because of fantomas error)
mattgallagher92 Jun 28, 2024
9131651
Add LicenseManager.setLicenseKey
mattgallagher92 Jun 28, 2024
2eb5cac
Document API changes in README's migration section
mattgallagher92 Jun 28, 2024
56db3fc
Improve type safety and type inference of wrapper
mattgallagher92 Jun 28, 2024
7b9ee80
Split enterprise features into their own module
jwthomson Jul 19, 2024
dc48b67
Fix MultiColumn not working due to naming error
Larocceau Aug 16, 2024
3c71122
DU for built in menu items
Larocceau Aug 16, 2024
8baaca8
Cell renderer and value formatter should be able to deal with null data
Larocceau Aug 30, 2024
6049cc2
Let ValueGetter play nicely with empty values that occur when using c…
Larocceau Aug 30, 2024
338247f
Move aggFunction to ColumnDef; add rowGroup ColumnDef
Larocceau Aug 30, 2024
c89e2c9
fix demo after introducing breaking changes
Larocceau Aug 30, 2024
2b81c8c
add GetDataPath function to support treeData attribute
Larocceau Aug 30, 2024
40801f8
Use .NET 8 SDK
mattgallagher92 Sep 6, 2024
1f65f52
Handle .mjs files in webpack
mattgallagher92 Sep 6, 2024
9024a45
Fix .md indentation
mattgallagher92 Sep 6, 2024
f5ded7a
remove unused api version
Larocceau Oct 4, 2024
ae7d0a1
Use options in menuItemDef where possible
Larocceau Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"fable"
]
},
"fantomas-tool": {
"version": "4.4.0",
"commands": [
"fantomas"
]
},
"femto": {
"version": "0.16.0",
"commands": [
"femto"
]
},
"fantomas": {
"version": "6.3.9",
"commands": [
"fantomas"
]
}
}
}
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
insert_final_newline = true

[src/Client/*.fs]
# Feliz style
fsharp_single_argument_web_mode=true
[*.{fs,fsx}]
fsharp_multiline_bracket_style = stroustrup
fsharp_newline_before_multiline_computation_expression = false
58 changes: 51 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,57 @@

Feliz-style bindings for [ag-grid-react](https://www.npmjs.com/package/ag-grid-react)

## Version Compatibility
## Versions

### The table below gives the ranges of compatible versions of Feliz AgGrid with its dependent packages.
### Required versions of dependencies

| Feliz.AgGrid | ag-grid-react/community | React | Fable | Feliz |
|- |- |- |- |- |
| 0.0.6 | 25.x | 17.x | 3.x | 1.x |
| 1.x | 31.x | 18.x | 4.x | 2.x |
Note: ag-grid-react/enterprise is only required if using enterprise features.

| Feliz.AgGrid | ag-grid-react/community | ag-grid-react/enterprise | React | Fable | Feliz |
|--------------|-------------------------|--------------------------|-------|-------|-------|
| 2.x | 31.x | 31.x | 18.x | 4.x | 2.x |
| 1.x | 31.x | - | 18.x | 4.x | 2.x |
| 0.0.6 | 25.x | - | 17.x | 3.x | 1.x |

### Migration guides

#### v1 to v2

##### Import AG Grid style sheets

To give you better control of your bundle, Feliz.AgGrid no longer imports styles for you, so you will need to include
appropriate imports yourself. For example, add the following lines to your client code to import the necessary styles
and the Balham theme.

```fsharp
importAll "ag-grid-community/styles/ag-grid.css"
importAll "ag-grid-community/styles/ag-theme-balham.css"
```

##### Use new API

Many properties have been updated to more closely reflect the AG Grid docs. In particular, functions like
valueFormatter, valueSetter and cellRenderer now take single-parameter functions, with that parameter having properties
on it allowing you to access the data that you need. This makes it easier for you to get started from the AG Grid docs.

For example, rather than `ColumnDef.cellRenderer` giving you the value in the cell, you are now given a params object
that has a `.value` field.

```diff
- ColumnDef.cellRenderer (fun x _ ->
+ ColumnDef.cellRenderer (fun rendererParams ->
Html.span [
Html.span [
prop.style [ style.fontSize 9 ]
prop.children [ Html.text "🏅" ]
]
- Html.textf "%i" x
+ Html.text $"%i{rendererParams.value}"
])
```

You can see more examples of the required changes in [Git
commit `cbb0102`](https://github.com/CompositionalIT/feliz-ag-grid/commit/cbb0102e9a7504d0518d32999071c1751ea85be6).

## Installation

Expand All @@ -21,7 +64,8 @@ Found in `./src`

## Demo

Demo code is in `./demo`. You can see it running live at [https://compositionalit.github.io/feliz-ag-grid/](https://compositionalit.github.io/feliz-ag-grid/)
Demo code is in `./demo`. You can see it running live
at [https://compositionalit.github.io/feliz-ag-grid/](https://compositionalit.github.io/feliz-ag-grid/)

## Publishing a new package

Expand Down
18 changes: 9 additions & 9 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
## Deploy

- Change the reference to the src project into a reference to the appropriate NuGet package, e.g.:
``` diff
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\src\Feliz.AgGrid.fsproj" />
- </ItemGroup>
<ItemGroup>
<PackageReference Include="Feliz" Version="1.65.0" />
+ <PackageReference Include="Feliz.AgGrid" Version="0.0.4" />
```
```diff
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\src\Feliz.AgGrid.fsproj" />
- </ItemGroup>
<ItemGroup>
<PackageReference Include="Feliz" Version="1.65.0" />
+ <PackageReference Include="Feliz.AgGrid" Version="0.0.4" />
```
- Run `npm run publish-docs`
Loading