A front-end renderer of many different sources of tabular data.
Tabular Database ... TeebyDeeby ... TbdB ... Teeby ... Tb
-
iframe referencing a data source (.json, .csv, .md)
https://modularizer.github.io/teebydeeby/?src=https://data.cityofnewyork.us/resource/uvxr-2jwn.json
<iframe src="https://modularizer.github.io/teebydeeby/?src=https://data.cityofnewyork.us/resource/uvxr-2jwn.json"></iframe>
-
iframe with data as an attribute
<iframe src="https://modularizer.github.io/teebydeeby/?headers=a,b,c&data=[[1,2,3],[4,5,6],[7,8,9]]"></iframe>
<iframe src='https://modularizer.github.io/teebydeeby/?data=[{"a":1,"b":2,"c": 3},{"a":4,"b":5,"c":6}]'></iframe>
<iframe src='https://modularizer.github.io/teebydeeby/?data={"a":[4,7],"b":[5,8],"c":[6,9]}'></iframe>
- import and use all in one
<script src="https://modularizer.github.io/teebydeeby/tbdb.js">[ {"name": "Fred", "age": 23, "height": "5'10\""}, {"name": "Sally", "age": 25, "height": "5'6\""}, {"name": "Bob", "age": 27, "height": "6'0\""} ]</script>
- data as innerHTML
<teeby-deeby headers="a,b,c">[[1,2,3],[4,5,6],[7,8,9]]</teeby-deeby>
2... And many more ways to pass in data! (see below)
- single minified distribution file
- NOTE: does not iclude lz-string, so you'll need to include that in your project if you want to use lz compressed strings
- Render tables from a variety of pre-loaded data sources
- JSON (many formats)
- CSV
- Markdown
- HTML
- Excel
- Google Sheets
- YAML
- Multiple ways to pass in data
- attributes
- innerHTML
- url
- lz compressed string
- NOTE: requires
lz-string
package from<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
- NOTE: requires
- base64 encoded string
- drag and drop file upload
- use script tag as teeby-deeby element
- copy and paste
- set attribute through javascript
- Add styling options
- width
- height
- padding
- radius
- gap
- colors
- scroll
- Front-end rendering features
- pagination
- filtering
- sorting
- searching
- hiding columns
- drag/drop reordering rows
- drag/drop reordering columns
- data types
- per column data types
- autodetected data types
- int
- float
- image
- date
- time
- datetime
- currency
- percent
- boolean
- string
- Editing
- contenteditable
- headereditable
- callback slots
- undo/redo
- common web requests on update
- SQL
- simple select queries
- load schema
- query builder (using sort, filter, etc.)
- query editor
- SQL on update
- Caching
- cache style preferences
- cache table settings
- column order
- column visibility
- column width
- pagination
Please! I probably don't have time to see this project through, so it you want to work on it, reach out! modularizer@gmail.com
- install node and npm
- run
install.sh
to install the necessary packages and setup pre-commit hooks
- parameters can be passed in as attributes on the html tag
- parameters can be passed in as search parameters in the url
JSON
lz
- any parameter can be passed in as a lz encoded string (fromlz-string
packageLZString.compressToEncodedURIComponent
)base64
- any parameter can be passed in as a base64 encoded string (frombtoa
)
data
- the data to be renderedlist of lists
- a list of lists of row valueslist of dicts
- a list of dictionaries of row valuesdict of dicts
- a dictionary of dictionaries of row valuesdict of lists
- a dictionary of lists of column valuesdict
- a dictionary of values- if
mode
ishorizontal
then the keys are the headers and there is one row - if
mode
isvertical
then there are two columns, one for the keys and one for the values
- if
headers
- the headers of the data (if data is alist of lists
and headers can't be inferred from the data)md
- render from a markdown table stringcsv
- render from csv stringsrc
- the source of the data- .json
- .csv
- .md
innerHTML of a <table>
tag nested in the <teeby-deeby>
tag will be used as the data source
mode
- if the data is a dictionary, then it can behorizontal
orvertical
contenteditable
- whether data can be editedheadereditable
- whether headers can be editedpage
- the page number to start onpagesize
- the number of rows to show per page
wide
w80
half
third
quarter
scroll
- adds a scrollbar to the table body without scrolling the header- NOTE: this messes with some built-in styles and makes it so the headers don't auto-size to the body. This needs some work to look better, but the functionality is worth it not looking quite as nice
h50
p16
p12
p8
p4
p2
round
soft
square
zero
nogap
gap1
gap2
dark
blue
green
red
yellow
purple
orange
rainbow
dblue
dgreen