Skip to content

Commit 8406849

Browse files
author
JelteMX
committed
First setup
0 parents  commit 8406849

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+24721
-0
lines changed

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const base = require("@mendix/pluggable-widgets-tools/configs/eslint.ts.base.json");
2+
3+
module.exports = {
4+
...base,
5+
rules: {
6+
"@typescript-eslint/ban-ts-ignore": "warn",
7+
"@typescript-eslint/no-empty-interface": "off",
8+
"react/no-find-dom-node": "off",
9+
"react/no-deprecated": "warn"
10+
}
11+
};

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto
2+
*.ts text eol=lf
3+
*.tsx text eol=lf
4+
*.js text eol=lf
5+
*.jsx text eol=lf
6+
*.css text eol=lf
7+
*.scss text eol=lf
8+
*.json text eol=lf
9+
*.xml text eol=lf
10+
*.md text eol=lf
11+
*.gitattributes eol=lf
12+
*.gitignore eol=lf
13+
*.png binary
14+
*.jpg binary
15+
*.gif binary

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dist/
2+
node_modules/
3+
*.log
4+
.env
5+
.vscode
6+
.DS_Store

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The Apache License v2.0
2+
3+
Copyright Jelte Lagendijk 2019
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.

README.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
[![Build Status](https://travis-ci.org/JelteMX/mendix-dynamic-table.svg?branch=master)](https://travis-ci.org/JelteMX/mendix-dynamic-table)
2+
[![Coverage Status](https://coveralls.io/repos/github/JelteMX/mendix-dynamic-table/badge.svg?branch=master)](https://coveralls.io/github/JelteMX/mendix-dynamic-table?branch=master)
3+
[![Dependencies](https://david-dm.org/JelteMX/mendix-dynamic-table.svg)]([https://david-dm.org/JelteMX/mendix-dynamic-table](https://david-dm.org/JelteMX/mendix-dynamic-table))
4+
[![DevDependencies](https://david-dm.org/JelteMX/mendix-dynamic-table/dev-status.svg)]([https://david-dm.org/JelteMX/mendix-dynamic-table?type=dev](https://david-dm.org/JelteMX/mendix-dynamic-table?type=dev))
5+
[![Support](https://img.shields.io/badge/Support-Community%20(no%20active%20support)-orange.svg)](https://docs.mendix.com/developerportal/app-store/app-store-content-support)
6+
[![Studio](https://img.shields.io/badge/Studio%20version-8.0%2B-blue.svg)](https://appstore.home.mendix.com/link/modeler/)
7+
[![GitHub release](https://img.shields.io/github/release/JelteMX/mendix-dynamic-table)](https://github.com/JelteMX/mendix-dynamic-table/releases/latest)
8+
[![GitHub issues](https://img.shields.io/github/issues/JelteMX/mendix-dynamic-table)](https://github.com/JelteMX/mendix-dynamic-table/issues)
9+
10+
## Dynamic (Tree) Table for Mendix
11+
12+
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.
13+
14+
![logo](/assets/AppStoreIcon.png)
15+
16+
Show a reference table. Rows & Columns are Mendix objects, Entry objects are in between.
17+
18+
![screenshot](/assets/screenshot.png)
19+
20+
> 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.
21+
22+
> 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)
23+
24+
## Features
25+
26+
- Display a tree structure in a table
27+
- Data Sources: XPath, Microflow, Nanoflow
28+
- Children: Get over reference, Microflow, Nanoflow
29+
- Selection of rows (single, multi)
30+
- Events: Click/Double click on Row, Column, Entry or empty field
31+
32+
> This widget is about 850Kb uncompressed, so in your cloud deployment this widget should take about 220 Kb of network resources
33+
34+
Tested:
35+
36+
- IE11 & Edge
37+
- Chrome
38+
- Firefox
39+
- Safari
40+
41+
## Basic Configuration
42+
43+
### 1. Row
44+
45+
![settings](/assets/settings1.png)
46+
47+
- Rows can be retrieved over XPath, Microflows and Nanoflows
48+
- 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.
49+
50+
### 2. Row Children
51+
52+
![settings](/assets/settings2.png)
53+
54+
- This is totally optional. If you want to do a tree structure, please configure the children
55+
- You can either get these over a Child reference (see bottom for explanation) or through a Microflow/Nanoflow when using a hasChildren attribute
56+
57+
### 3. Column
58+
59+
![settings](/assets/settings3.png)
60+
61+
- Columns can be retrieved over XPath, Microflows and Nanoflows
62+
- 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.
63+
64+
### 4. Entries
65+
66+
![settings](/assets/settings4.png)
67+
68+
- An Entry is an object that is linked to 1 row and 1 column
69+
- An Entry has a title (see Column/Row title, same principle)
70+
- In order to retrieve entries, you will need to use a Data Helper (see next)
71+
72+
### 5. Data Helper
73+
74+
![settings](/assets/settings5.png)
75+
76+
- See explanation in the settings screen
77+
78+
### 6. Selection
79+
80+
![settings](/assets/settings6.png)
81+
82+
### 7. Events
83+
84+
![settings](/assets/settings7.png)
85+
86+
### 8. UI Settings
87+
88+
![settings](/assets/settings8.png)
89+
90+
## Demo project
91+
92+
[https://dynamictabletest-sandbox.mxapps.io/](https://dynamictabletest-sandbox.mxapps.io/)
93+
94+
### Domain Model
95+
96+
This demo uses the following domain model:
97+
98+
![domain model](/assets/domain-model.png)
99+
100+
Short explanation:
101+
102+
- A table is placed inside a data view with a `View` object
103+
- For the first rows, it will get all `Rows` that have a reference to `View` and `_Root = true`
104+
- Every row might have children. You either get these over a reference `Children`, or when you use a Microflow and `_hasChildren = true`
105+
- `Column` Objects also have a reference to View, although it is not entirely necessary
106+
- 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
107+
- When the `Entry` objects are loaded, the widget will place these in the correct field based on the reference to a Column/Row
108+
- The `SelectionHelper` is used for selections, but this is based on the test-project and can be disregarded here.
109+
110+
## Issues, suggestions and feature requests
111+
112+
Please report your issues [here](https://github.com/JelteMX/mendix-dynamic-table/issues)
113+
114+
## TODO
115+
116+
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:
117+
118+
- Basic WebModeler preview + settings
119+
- Add Icon attribute (from Tree Table)
120+
- Add config for when context changes (reload rows?)
121+
- Column overflow (first column)
122+
- Header height
123+
- Left column lock issue with header. This is when locking the left column, it can get out of sync with the header.
124+
- Unit tests
125+
126+
## License
127+
128+
Apache 2

assets/AppStoreIcon.png

39.1 KB
Loading

assets/domain-model.png

91 KB
Loading

assets/screenshot.png

84.7 KB
Loading

assets/settings1.png

102 KB
Loading

assets/settings2.png

86.4 KB
Loading

0 commit comments

Comments
 (0)