Skip to content

Commit 9b7c52c

Browse files
committed
more examples
1 parent a62c6cc commit 9b7c52c

File tree

21 files changed

+214
-3
lines changed

21 files changed

+214
-3
lines changed

examples/cdn-es5/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[Open fullscreen](https://html.activewidgets.com/cdn-es5/) | [Source on github](https://github.com/activewidgets/html/tree/master/examples/cdn-es5) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/html/tree/master/examples/cdn-es5)
3+
4+
HTML (custom elements) example

examples/cdn-es5/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>CDN (no build) - ActiveWidgets/HTML</title>
6+
7+
<script src="https://polyfill.io/v3/polyfill.min.js?features=Promise"></script>
8+
9+
<link href="https://cdn.activewidgets.com/html/3/ax.css" rel="stylesheet" />
10+
<script src="https://cdn.activewidgets.com/html/3/ax.js"></script>
11+
12+
<link href="src/styles.css" rel="stylesheet" />
13+
</head>
14+
<body>
15+
<ax-datagrid>Loading...</ax-datagrid>
16+
<script src="src/index.js"></script>
17+
</body>
18+
</html>

examples/cdn-es5/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "html-cdn-es5",
3+
"version": "1.0.0",
4+
"description": "CDN (no build) - ActiveWidgets/HTML",
5+
"keywords": [],
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
11+
"dependencies": {
12+
"@activewidgets/html": "0.0.10"
13+
},
14+
"devDependencies": {
15+
"parcel-bundler": "^1"
16+
},
17+
"private": true
18+
}

examples/cdn-es5/src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
var el = document.querySelector('ax-datagrid');
3+
4+
el.rows = [
5+
{ framework: 'none', source: 'CDN', language: 'ES5'}
6+
];

examples/cdn-es5/src/styles.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
body {
3+
margin: 60px;
4+
font: 14px/1.2143 'Segoe UI', 'Avenir', 'Helvetica Neue', 'Tahoma', sans-serif;
5+
}
6+
7+
.ax-datagrid {
8+
max-height: 80px;
9+
}
10+
11+
.ax-headers-view {
12+
font-weight: bold;
13+
color: #666;
14+
border-bottom: 1px solid #aaa;
15+
}
16+
17+
.ax-gridlines {
18+
border-bottom: 1px solid #eee;
19+
}

examples/columns/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[Open fullscreen](https://html.activewidgets.com/columns/) | [Source on github](https://github.com/activewidgets/html/tree/master/examples/columns) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/html/tree/master/examples/columns)
3+
4+
HTML (custom elements) example

examples/columns/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Columns, rows - ActiveWidgets/HTML</title>
6+
</head>
7+
<body>
8+
<ax-datagrid>Loading...</ax-datagrid>
9+
<script src="src/index.js"></script>
10+
</body>
11+
</html>

examples/columns/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "html-columns",
3+
"version": "1.0.0",
4+
"description": "Columns, rows - ActiveWidgets/HTML",
5+
"keywords": [],
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
11+
"dependencies": {
12+
"@activewidgets/html": "0.0.10"
13+
},
14+
"devDependencies": {
15+
"parcel-bundler": "^1"
16+
},
17+
"private": true
18+
}

examples/columns/src/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import '@activewidgets/html';
3+
import { northwind } from "@activewidgets/examples/data";
4+
import './styles.css';
5+
6+
7+
const el = document.querySelector('ax-datagrid');
8+
9+
el.columns = [
10+
{header: 'Code', field: 'customerID', width: 80, style: 'background:#def', fixed: true},
11+
{header: 'Company Name', field: 'companyName', width: 160},
12+
{header: 'Contact', field: 'contactName', width: 120},
13+
{header: 'Title', field: 'contactTitle', width: 120},
14+
{header: 'Address', field: 'address', width: 120},
15+
{header: 'City', field: 'city'},
16+
{header: 'Zip', field: 'postalCode', align: 'right'},
17+
{header: 'Phone', field: 'phone'},
18+
{header: 'Fax', field: 'fax'},
19+
{header: 'Country', field: 'country'}
20+
];
21+
22+
el.rows = northwind.customers;

examples/columns/src/styles.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
body {
3+
margin: 60px;
4+
font: 14px/1.2143 'Segoe UI', 'Avenir', 'Helvetica Neue', 'Tahoma', sans-serif;
5+
}
6+
7+
.ax-headers-view {
8+
font-weight: bold;
9+
color: #666;
10+
border-bottom: 1px solid #aaa;
11+
}
12+
13+
.ax-gridlines {
14+
border-bottom: 1px solid #eee;
15+
}

0 commit comments

Comments
 (0)