Skip to content

PFElements/pf-calendar-events-data

Repository files navigation

<pf-calendar-events-data>

pf-elements

A Polymer 2.0 based collection of reusable web components Join the chat at https://gitter.im/pf-elements/Lobby

pf-calendar-events-data

An Advanced Polymer 2.0 based custom elements to get the calendar events, appointments, meetings data from Firebase. To be used in conjunction with pf-calendar-events element.

Firebase based headless Polymer 2.0 Element. This element has no UI, and is used for CRUD operations for calendar events. It exposes the API for Add/Update/Delete events and manages that operations on Firebase.

Use this element in conjunction with other pf-calendar UI element or make your own front-end element and use this element to take care of backend firebase integration.

Element Name Latest Version (Bower) Npm version Build Status
pf-calendar-events-data GitHub version npm version Build Status

Published on webcomponents.org

Demo

Click here for docs & demo

Install the Polymer-CLI

First, make sure you have the Polymer CLI installed. Then run polymer serve to serve your application locally.

Learn more

See the list of elements, demos, and documentation by browsing this collection on webcomponents.org:

Methods

The following methods are available for crude events operation:

Methods Description
addEvent(event) Take event object and add as a new Event, meeting or reminder into firebase
updateEvent(key,event) Take firebase data ref key and updated event object , update the given ref key node
deleteEvent(key) Take record ref key and delete that event

Example

     <firebase-app
                  name="pf-calendar-firebase"
                  api-key="AIzaSyBOML3Qc_rtqDeVAr2ous6Z8-E1FDqH4CI"
                  auth-domain="pf-calendar-firebase.firebaseapp.com"
                  database-url="https://pf-calendar-firebase.firebaseio.com">
          </firebase-app>
          <pf-calendar-events-data
                  databasename="pf-calendar-firebase"
                  databasepath="testdata"
                  eventsData="{{results}}"
                  filterAttr="color"
                  filterValue="green"></pf-calendar-events-data>

-> Replace firebase-app with yours

Viewing Your Application

$ polymer serve

Building Your Application

$ polymer build

This will create a build/ folder with bundled/ and unbundled/ sub-folders containing a bundled (Vulcanized) and unbundled builds, both run through HTML, CSS, and JS optimizers.

You can serve the built versions by giving polymer serve a folder to serve from:

$ polymer serve build/bundled

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.

Contributing

Comments, questions, suggestions, issues, and pull requests are all welcome.

Get in touch with the team

Joing us at Join the chat at https://gitter.im/pf-elements/Lobby

Some ways to help:

  • Test the elements and provide feedback: We would love to hear your feedback on anything related to the elements, like features, API and design. The best way to start is by trying them out. And to get a quick response, either drop a question/comment on the chat or open an issue in GitHub.
  • Report bugs: File issues for the elements in their respective GitHub projects.
  • Send pull requests: If you want to contribute code, check out the development instructions below.

We encourage you to read the contribution instructions by GitHub also.

License

MIT License