-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JelteMX
committed
Jan 20, 2020
0 parents
commit 8406849
Showing
46 changed files
with
24,721 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const base = require("@mendix/pluggable-widgets-tools/configs/eslint.ts.base.json"); | ||
|
||
module.exports = { | ||
...base, | ||
rules: { | ||
"@typescript-eslint/ban-ts-ignore": "warn", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"react/no-find-dom-node": "off", | ||
"react/no-deprecated": "warn" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* text=auto | ||
*.ts text eol=lf | ||
*.tsx text eol=lf | ||
*.js text eol=lf | ||
*.jsx text eol=lf | ||
*.css text eol=lf | ||
*.scss text eol=lf | ||
*.json text eol=lf | ||
*.xml text eol=lf | ||
*.md text eol=lf | ||
*.gitattributes eol=lf | ||
*.gitignore eol=lf | ||
*.png binary | ||
*.jpg binary | ||
*.gif binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dist/ | ||
node_modules/ | ||
*.log | ||
.env | ||
.vscode | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
The Apache License v2.0 | ||
|
||
Copyright Jelte Lagendijk 2019 | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
[](https://travis-ci.org/JelteMX/mendix-dynamic-table) | ||
[](https://coveralls.io/github/JelteMX/mendix-dynamic-table?branch=master) | ||
[]([https://david-dm.org/JelteMX/mendix-dynamic-table](https://david-dm.org/JelteMX/mendix-dynamic-table)) | ||
[]([https://david-dm.org/JelteMX/mendix-dynamic-table?type=dev](https://david-dm.org/JelteMX/mendix-dynamic-table?type=dev)) | ||
[-orange.svg)](https://docs.mendix.com/developerportal/app-store/app-store-content-support) | ||
[](https://appstore.home.mendix.com/link/modeler/) | ||
[](https://github.com/JelteMX/mendix-dynamic-table/releases/latest) | ||
[](https://github.com/JelteMX/mendix-dynamic-table/issues) | ||
|
||
## Dynamic (Tree) Table for Mendix | ||
|
||
Mendix Dynamic (Tree) Table using [Ant Design Table](https://ant.design/components/table/) (MIT License). This is inspired on the [Tree Table widget](https://appstore.home.mendix.com/link/app/111095/), but takes objects in the columns as well. | ||
|
||
 | ||
|
||
Show a reference table. Rows & Columns are Mendix objects, Entry objects are in between. | ||
|
||
 | ||
|
||
> See test-project [https://dynamictabletest-sandbox.mxapps.io/](https://dynamictabletest-sandbox.mxapps.io/) for a live demo! On the bottom of this page there is a short explanation of the Domain model that is used. | ||
> Missing features? See TODO at the bottom to see which items are still on the TODO list. If you find other bugs, please report this as an issue [here](https://github.com/JelteMX/mendix-dynamic-table/issues) | ||
## Features | ||
|
||
- Display a tree structure in a table | ||
- Data Sources: XPath, Microflow, Nanoflow | ||
- Children: Get over reference, Microflow, Nanoflow | ||
- Selection of rows (single, multi) | ||
- Events: Click/Double click on Row, Column, Entry or empty field | ||
|
||
> This widget is about 850Kb uncompressed, so in your cloud deployment this widget should take about 220 Kb of network resources | ||
Tested: | ||
|
||
- IE11 & Edge | ||
- Chrome | ||
- Firefox | ||
- Safari | ||
|
||
## Basic Configuration | ||
|
||
### 1. Row | ||
|
||
 | ||
|
||
- Rows can be retrieved over XPath, Microflows and Nanoflows | ||
- Your title can be purely text or HTML, either through the attribute or Nanoflow. Make sure you sanitize any user input to prevent XSS issues. | ||
|
||
### 2. Row Children | ||
|
||
 | ||
|
||
- This is totally optional. If you want to do a tree structure, please configure the children | ||
- You can either get these over a Child reference (see bottom for explanation) or through a Microflow/Nanoflow when using a hasChildren attribute | ||
|
||
### 3. Column | ||
|
||
 | ||
|
||
- Columns can be retrieved over XPath, Microflows and Nanoflows | ||
- Your title can be purely text or HTML, either through the attribute or Nanoflow. Make sure you sanitize any user input to prevent XSS issues. | ||
|
||
### 4. Entries | ||
|
||
 | ||
|
||
- An Entry is an object that is linked to 1 row and 1 column | ||
- An Entry has a title (see Column/Row title, same principle) | ||
- In order to retrieve entries, you will need to use a Data Helper (see next) | ||
|
||
### 5. Data Helper | ||
|
||
 | ||
|
||
- See explanation in the settings screen | ||
|
||
### 6. Selection | ||
|
||
 | ||
|
||
### 7. Events | ||
|
||
 | ||
|
||
### 8. UI Settings | ||
|
||
 | ||
|
||
## Demo project | ||
|
||
[https://dynamictabletest-sandbox.mxapps.io/](https://dynamictabletest-sandbox.mxapps.io/) | ||
|
||
### Domain Model | ||
|
||
This demo uses the following domain model: | ||
|
||
 | ||
|
||
Short explanation: | ||
|
||
- A table is placed inside a data view with a `View` object | ||
- For the first rows, it will get all `Rows` that have a reference to `View` and `_Root = true` | ||
- Every row might have children. You either get these over a reference `Children`, or when you use a Microflow and `_hasChildren = true` | ||
- `Column` Objects also have a reference to View, although it is not entirely necessary | ||
- When loading `Entry` object, the widget will create a `EntryHelper` object that has references to the shown Rows&Columns. This helper is passed down to a microflow/nanoflow | ||
- When the `Entry` objects are loaded, the widget will place these in the correct field based on the reference to a Column/Row | ||
- The `SelectionHelper` is used for selections, but this is based on the test-project and can be disregarded here. | ||
|
||
## Issues, suggestions and feature requests | ||
|
||
Please report your issues [here](https://github.com/JelteMX/mendix-dynamic-table/issues) | ||
|
||
## TODO | ||
|
||
The following things need to be further tested and/or fixed. Please don't report this as a bug if this is in the TODO list: | ||
|
||
- Basic WebModeler preview + settings | ||
- Add Icon attribute (from Tree Table) | ||
- Add config for when context changes (reload rows?) | ||
- Column overflow (first column) | ||
- Header height | ||
- Left column lock issue with header. This is when locking the left column, it can get out of sync with the header. | ||
- Unit tests | ||
|
||
## License | ||
|
||
Apache 2 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.