npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oveasoft/planning

v1.2.5

Published

An AngularJS planning component

Readme

Oveasoft Planning

The Oveasoft's Planning is an AngularJS based package used to display a planning of appointments.

Install it

yarn add @oveasoft/planning

Run it

  • Requires Node 8.4.0+

With yarn:

yarn build - Webpack build
yarn test  - Karma test
yarn demo  - Run the demo

Use it

The module name is : ovaPlanning First, import the module like this :

import ovaPlanning from '@ovasoft/planning';

angular.module('myModule', [ovaPlanning]);

Then you can use the component like this :

<ova-planning></ova-planning>

It will render an empty planning.

To fill the planning with items, you must pass objects as an array through the appointments property :

<ova-planning appointments="myItems"></ova-planning>

See https://momentjs.com/docs/#/parsing/ for valid values.

You can pass a template through the configuration to display an appointment.

const myConfiguration = {
    template: $appointment => `<my-appointment-component item="$appointment"></my-appointment-component>`
};

And set the config key like this :

<ova-planning config="myConfiguration"></ova-planning>

Configure it

You can also pass a config attribute like this :

const myConfiguration = {
    'momentLocale': 'en',
    'datePath': 'date',
    'slot': [[6, 20]],
    'slotInterval': 30,
    'currentWeek': new Date()
};
<ova-planning config="myConfiguration"></ova-planning>

Available key for configuration

let configuration = {
    currentWeek: moment(),      // The day you want to start on.
    datePath: 'date',           // The path to your date on the data.
    dayLabelFormat: 'ddd DD',   // The format of label.
    debug: false,               // Set the debug mode.
    editOnClick: true,          // Set the built-in appointment edition on click.
    excludedDays: [],           // Exclude days from weeks. (0 = First day of the week, Monday or Sunday depending the locale)
    momentLocale: "fr",         // Set the locale of Moment.
    showControls: false,        // Show/Hide the controls to navigate through planning.
    showLabel: true,            // Show/Hide the label of the current week.
    showPause: true,            // Show/Hide breaks line.
    slot: [[8, 18], [14, 18]],  // Define ranges of weeks.
    slotInterval: 45,           // Define the interval of slots.
    theme: 'blue',              // Set the theme.
    onChangeWeek: () => {},     // Executed when controls are used.
    onClick: (data) => {},      // Executed when an appointment is clicked.
    onLoad: () => {},           // Bind data like placed and misplaced events.
    selectSlot: () => {},       // Return slot information when you click it.
    viewer: 'month',            // Set the default viewer.
    views: {
        week: {
            template: () => '<my-week-template></my-week-template>'     // Set the template for week view.
        },
        month: {
            weeksPerView: {
                default: 4, // The default number of week displayed on the month view.
                current: 4, // The current number of week displayed on the month view.
            },
            template: () => '<my-month-template></my-month-template>'   // Set the template for month view.
        }
        trimester: {
            columnType: 'month',
            range: {
                past: 2,
                future: 2
            },
            labels: date => date.format('MMMM YYYY'),
            template: () => `<my-trimester-template data="$appointment"></my-trimester-template>`
        }   
    }
};

Viewers

The list of availables viewers :

  • month
  • week
  • trimester

Themes

The list of availables themes:

  • blue
  • brown
  • purple
  • teal
  • green
  • navy
  • brick

That's it

Breaking changes

1.1.x

On 1.0.x we used transclude like this to pass the template :

<ova-planning config="myConfiguration">
    <my-appointment-component item="$parent.$parent.$appointment"></my-appointment-component>
</ova-planning>

On 1.1.x we now pass the template as a parameter of the configuration.

const myConfiguration = {
    momentLocale: 'en',
    slot: [[6, 20]],
    slotInterval: 30,
    currentWeek: new Date(),
    template: $appointment => `<my-appointment-component item="$appointment"></my-appointment-component>`
};

And remain :

<ova-planning config="myConfiguration"></ova-planning>

1.2.x

Templates

As the 1.2.x introduce a secondary view of the planning, the template is now passed this way :

let myConfiguration = {
    momentLocale: 'en',
    slot: [[6, 20]],
    slotInterval: 30,
    currentWeek: new Date(),
    views: {
        week: {
            template: () => '<my-week-template></my-week-template>'
        },
        month: {
            template: () => '<my-month-template></my-month-template>'
        }       
    }
};

Date on items

In <1.1.x, objects in the array MUST have a date property with a value equal to a MomentJS object or any value that can be parsed and give a valid MomentJS object.

Example :

let validItems = [
    { date: moment() },
    { date: '2018-11-05' },
    { date: new Date },
    { date: [2018, 1, 14, 15, 25, 50, 125] }
];

It's bit different now, you still have to provide a date-like property, but you can choose the path on your data :

Here are some examples :

let configuration = { ... };

let data = [{ id: 1, username: 'Foo', details: { birthday: '1990-12-10' } }];
configuration.datePath = 'details.birthday';

let data = [{ id: 1, path: { to: { date: '1990-12-10' } } }];
configuration.datePath = 'path.to.date';

By default, datePath is set to 'date' and should not break your project.

ToDo

  • ~~Resolve the scope issue to ommit $parent.$parent.~~
  • ~~Inject a default template.~~