Skip to content

Commit

Permalink
Initial Version
Browse files Browse the repository at this point in the history
  • Loading branch information
jesuslopezlugo committed Dec 5, 2017
1 parent 7218d50 commit b5de7ee
Show file tree
Hide file tree
Showing 8 changed files with 604 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# pt-crud-table
CRUD Table using Polymer Web Components
# \<pt-crud-table\>

CRUD Table

## Install the Polymer-CLI

First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your element locally.

## Viewing Your Element

```
$ polymer serve
```

## Running Tests

```
$ polymer test
```

Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "pt-crud-table",
"description": "CRUD Table",
"main": "pt-crud-table.html",
"dependencies": {
"polymer": "Polymer/polymer#^2.0.0",
"pt-select": "plusTTeam/pt-select#^1.0.0",
"pt-multilang-input": "plusTTeam/pt-multilang-input#^1.0.0",
"pt-tags-input": "plusTTeam/pt-tags-input#^1.0.0",
"pt-firebase-file-uploader": "plusTTeam/pt-firebase-file-uploader#^1.0.0",
"paper-dialog": "PolymerElements/paper-dialog#^2.0.0",
"vaadin-grid": "vaadin/vaadin-grid#^4.0.0",
"paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^2.1.0",
"iron-form": "PolymerElements/iron-form#^2.0.1",
"paper-checkbox": "PolymerElements/paper-checkbox#^2.0.1",
"iron-iconset-svg": "PolymerElements/iron-iconset-svg#^2.1.0"
},
"devDependencies": {
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0",
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
},
"resolutions": {
"polymer": "^2.0.0"
}
}
39 changes: 39 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">

<title>pt-crud-table demo</title>
<!-- TODO: Revert PATH from ../bower_components/ to ../../ -->
<script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="../bower_components/iron-demo-helpers/demo-pages-shared-styles.html">
<link rel="import" href="../bower_components/iron-demo-helpers/demo-snippet.html">
<link rel="import" href="../pt-crud-table.html">

<custom-style>
<style is="custom-style" include="demo-pages-shared-styles">
</style>
</custom-style>
</head>
<body>
<div class="vertical-section-container centered">
<h3>Basic pt-crud-table demo</h3>
<demo-snippet>
<template>
<pt-crud-table></pt-crud-table>

<script>
var table = document.querySelector('pt-crud-table');
table.data = [{id:1,name:"Name 1",description:"Description 1"},{id:2,name:"Name 2",description:"Description 2"}];
table.fields = [
{name: 'id', type: 'uid'},
{name: 'name',label: 'Name',type: 'input',required: true,show: true},
{name: 'description',label: 'Description',type: 'textarea',required: true,show: true}
];
</script>
</template>
</demo-snippet>
</div>
</body>
</html>
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0;url=demo/" />
<title>pt-crud-table</title>
</head>
<body>
<!--
ELEMENT API DOCUMENTATION SUPPORT COMING SOON
Visit demo/index.html to see live examples of your element running.
This page will automatically redirect you there when run in the browser
with `polymer serve`.
-->
</body>
</html>
7 changes: 7 additions & 0 deletions polymer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lint": {
"rules": [
"polymer-2"
]
}
}
Loading

0 comments on commit b5de7ee

Please sign in to comment.