• Stars
    star
    1,103
  • Rank 42,076 (Top 0.9 %)
  • Language Vue
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of components that visualizes DaySpan Calendars and Schedules using Vuetify

dayspan-vuetify

A collection of components for Schedules and Calendars in DaySpan using Vuetify

This library strives to offer all the functionality any modern calendar app could support, and more. Not only can this be used for calendar apps, but any application where the user wishes to control when events should occur within a system.

Click here for a full app example

Every feature of the library can be toggled with local and global settings, and all text can be localized.

Status

This library is nearing functional completion (documentation on every component, prop, event, slot, method will have to wait) but is still subject to the occasional small change in API.

Current documentation

Notice

  • This library uses v-html in a few places (to display event details for example) so you must sanitize your own data against XSS vulnerabilities.

Usage

Install with npm install --save dayspan-vuetify

This library works best with Vuetify >= 1.1.9

import DaySpanVuetify from 'dayspan-vuetify'

Vue.use( DaySpanVuetify, {
  // options is vue definition, the resulting reactive component is stored in components as this.$dayspan or Vue.$dayspan
  data: {
    // data or computed to override
  },
  computed: {
    // data or computed to override
  },
  methods: {
    // methods to override
  }
});

To see what options can be passed to the plugin, checkout this file.

Once done, you can access components like ds-event, ds-calendar, and ds-calendar-app from any component (they are registered globally).

Example / Template

Checkout dayspan-vuetify-example for an example of a calendar app which saves events to localStorage.

Example Code

Install with npm install --save dayspan-vuetify

app.js

import Vue from 'vue'
import Vuetify from 'vuetify'
import DaySpanVuetify from 'dayspan-vuetify'
import App from './App.vue'

import 'vuetify/dist/vuetify.min.css'
import 'material-design-icons-iconfont/dist/material-design-icons.css'
import 'dayspan-vuetify/dist/lib/dayspan-vuetify.min.css'

Vue.config.productionTip = false

Vue.use(Vuetify);

Vue.use(DaySpanVuetify, {
  methods: {
    getDefaultEventColor: () => '#1976d2'
  }
});

new Vue({
  el: '#app',
  render: h => h(App)
})

App.vue

<template>
  <v-app id="dayspan" v-cloak>
    <ds-calendar-app :calendar="calendar"></ds-calendar-app>
  </v-app>
</template>

<script>
import { Calendar } from 'dayspan';

export default {
  name: 'app',
  data: () => ({
    calendar: Calendar.months()
  })
}
</script>

<style>
body, html, #app, #dayspan {
  font-family: Roboto, sans-serif;
  width: 100%;
  height: 100%;
}
</style>

index.html

<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>You Calendar App Title</title>
    <style> [v-cloak] { display: none; } </style>
  </head>
  <body>
    <div id="app"></div>
    <!-- built files should be auto injected -->
  </body>
</html>

Locales

This library supports multiple locales but the build only comes with en-us/en. The following code shows you how to add locales, changing the current locale, and updating a given locale:

// You can access $dayspan via Vue.$dayspan or this.$dayspan inside a component.

$dayspan.setLocale('en'); // if en does not exist, this will have no affect
$dayspan.setLocale('fr', true); // true was passed, so if the locale does not exist an error is thrown
$dayspan.locales; // map of locale names to locale values

// A locale is really just an object that overrides the values you specify found in $dayspan. A locale does not need to specify all possible values, just ones that should be overriden when setLocale is called.

$dayspan.addLocale('es', {
  promptLabels: {
    // Are you sure you want to remove this event?
    actionRemove: '¿Estás seguro de que quieres eliminar este evento?'
  }
});

// Update locale (merge changes into locale)
$dayspan.updateLocale('en', {
  patterns: {
    lastDay: (day) => 'Final day of the month'
  }
});

French Locale

import fr from 'dayspan-vuetify/src/locales/fr';
import Vue from 'vue';
// dayspan-vuetify should already be loaded at this point
Vue.$dayspan.addLocales(['fr', 'fr-CA', 'fr-BE', 'fr-CH', 'fr-FR', 'fr-LU', 'fr-MC'], fr);

Dutch Locale

import nl from 'dayspan-vuetify/src/locales/nl';
import Vue from 'vue';
// dayspan-vuetify should already be loaded at this point
Vue.$dayspan.addLocales(['nl', 'nl-NL', 'nl-BE'], nl);

German Locale

import de from 'dayspan-vuetify/src/locales/de';
import Vue from 'vue';
// dayspan-vuetify should already be loaded at this point
Vue.$dayspan.addLocales(['de', 'de-DE', 'de-CH', 'de-AT', 'de-BE', 'de-IT', 'de-LI', 'de-LU'], de);

Catalan Locale

import ca from 'dayspan-vuetify/src/locales/ca';
import Vue from 'vue';
// dayspan-vuetify should already be loaded at this point
Vue.$dayspan.addLocales(['ca', 'ca-ES'], ca);

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

More Repositories

1

dayspan

A date & schedule library to use for advanced calendars in TypeScript and JS.
TypeScript
136
star
2

SemanticUI-Angular

Angular Directives for Semantic UI
JavaScript
57
star
3

vuex-typescript-interface

Adding magical type safety to Vuex without additional code
TypeScript
45
star
4

TrieHard

A generic compact Trie implementation in Java. Built for high-performance applications.
Java
43
star
5

Ents

A hybrid of the Entity-Component-System and Model-View-Controller patterns with new concepts developed specifically for games. Ents is easy to integrate into your game, is developed to be decoupled from a graphics library, and is very memory conscious compared to similar frameworks.
Java
42
star
6

Steerio

An extensive steering behavior library in Java, Javascript, C#, C, and C++
Java
37
star
7

unitz

A unit parser, converter, & combiner in JS: '1 cup' + '1.5 pint' = '1 quart`
JavaScript
35
star
8

vuex-router-actions

Streamline complex Vuex actions and have fast and secure asynchronous routing in your app.
TypeScript
31
star
9

Azzet

An Asset Loading Library in Java. Load assets from any source (classpath, file system, web, database, etc) in many formats (XML, JSON, audio, images, etc) either directly or in a background process.
Java
31
star
10

dayspan-vuetify-example

A standalone example of a Calendar app using dayspan-vuetify
Vue
27
star
11

storkjs

Simple key-value storage in your browser.
JavaScript
24
star
12

unitz-ts

A unit parser, converter, & calculator for TypeScript and JS
JavaScript
19
star
13

iteratez

A powerful functional iterator, transformer, and mutator - like Underscore.js, except for everything
TypeScript
14
star
14

CDSL

A data structure library written in C
C
5
star
15

Falcon

A fast Java event-driven networking library that has a unified API over various networking technologies: TCP, UDP, blocking (OIO), and non-blocking (NIO).
Java
5
star
16

Taskaroo

A Java library that handles execution of tasks. Tasks can be executed sequentially, in parallel, or in any order. Tasks can be canceled at any point, and can be ran synchronously or asynchronously.
Java
5
star
17

valid8or

A validator and transformer in TypeScript/JS for simple and complex data types
TypeScript
4
star
18

Buffero

A Java library used for efficiently and safely working with ByteBuffers.
Java
4
star
19

Blackbuck

A game networking library in java focused around making asynchronous method calls.
Java
4
star
20

typed-query-builder

A fully featured fully typed query builder interface that supports multiple databases.
TypeScript
4
star
21

Curity

A Java library with data structures developed for various projects. Many of the structures have to do with concurrency and thread-safety.
Java
4
star
22

Statastic

A Java library for tracking statistics over time in a round robin database. A round robin database is a fixed size database with several time spans it accumulates statistics over.
Java
4
star
23

gameprogblog

Java
3
star
24

Daperz

A Java library for writing/reading data in a generic way to a store. The library is designed with the idea that the user will be constantly modifying this file (or sections of it) and the library will efficiently load and persistent data between Java objects and the store implementation (memory, file, etc).
Java
3
star
25

Testility

A small Java library with a few classes I've used in other projects in JUnit tests.
Java
2
star
26

vue-fiery

The most extensive Google Firestore plugin for Vue
TypeScript
2
star
27

Gamesol

A Generic Game Solving Library in Java. You define the state of a game, possible moves, and gamesol will find the first solution, all solutions, the path to those solutions, anything you want!
Java
2
star
28

Reflector

A specialized Java library for serializing primitives, simple objects, and method calls into a compressed format to and from a ByteBuffer.
Java
2
star
29

TheProf

A simple Java Profiler that outputs the performance of your application into CSV files.
Java
1
star
30

pubsub.js

A lightweight publish/subscribe server & client written in javascript.
JavaScript
1
star
31

Rekord-Java

An ORM for Java with intelligent loading and caching
Java
1
star
32

Jayjax

The easiest way to call your Java code from JavaScript or form submits. Minimal configuration, create a public API, upload files, and automatic object serialization.
Java
1
star
33

Zource

A Java library for pooling expensive resources.
Java
1
star
34

Surfice

A Java library centered around the concept of a Service, which is a glorified thread that continually loops performing some job and handling events sent to the Service.
Java
1
star
35

scrute

A TypeScript/JS library for observing changes and adding computed properties (inspired by Vue)
TypeScript
1
star
36

full-stack-typescript-vue-template

A template project for a full-stack Typescript application which uses Vue for the front-end.
TypeScript
1
star
37

Dependz

A dependency analysis utility in Java which uses topological sorting to order values based on their dependencies.
Java
1
star