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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chroniq/chroniq

v2.2.1

Published

Not for commercial use. If you want to use it in your project for commercial user, please contact [email protected].

Downloads

44

Readme

Notice

Not for commercial use. If you want to use it in your project for commercial user, please contact [email protected].

For more information check the licence.

Chroniq

NOT FOR COMMERCIAL USE! CHECK THE LICENCE

Full featured resource calendar inspired by full calendar, big calendar and many other calendar solutions out there.

See the Docs and Examples

Are you interested in using Chroniq in your product? Please contact us at [email protected].

Features

TBD

Hint

By having React-dnd in your Project, you should import Chroniq not as default because the HTML5 backend could throws errors when their are two instances of it. See for more informationen (https://github.com/react-dnd/react-dnd/issues/186)

Props


type Props = {
    /*
     * for 3rd party components (append to first real DOM el)
     * */
    className?: string,
    style?: <{}>,
    /*
     * view properties
     * */
    view: string,
    onViewChange?: () => {
       view: string,
       state: <Object> 
    },
    views: Array<["month", "week", "day", "agenda"] string>,
    /*
     * date & time properties
     * */
    date: Date,
    onDateChange?: () => Array<Date>,
    minTime: Date,
    maxTime: Date,
    scrollTime: Date,
    slotDuration: number,
    slotInterval: number,
    /*
     * localization
     * */
    culture: string,
    rtl: boolean,
    /*
     * events
     * */
    events: Array<Event>,
    onSelectEvent?: () => Array<Event>,
    /*
     * resource
     * */
    resources?: Array<Resource>,
    joinedResources: Array<number | string>,
    onChangeJoinedResources?: () => ,
    activeResources: Array<number | string>,
    onChangeActiveResources?: () => ,
    /*
     * background events
     * */
    backgroundEvents?: Array<BackgroundEvent>,
    onSelectBackgroundEvent?: () => {
        event: <Event>,
        state: <Object>
    },
    /*
     * business hours
     * */
    businessHours?: Array<BusinessHour>,
    /*
     * drag & drop and resize
     * */
    onEventDrag?: () => {
        events: Array<Event>,
        state: <Object>
    },
    onEventDragBegin?: () => {
        event: <Event>,
        state: <Object>,
        id: number | string,
        resourceId: number | string,
        start: Date,
        end: Date
    },
    onEventDrop?: () => {
        events: Array<Event>,
        state: <Object>
    },
    onEventResize?: () => {
        events: Array<Event>,
        state: <Object>
    },
    snapDuration?: Date, // must be implemented
    /*
     * selection
     * */
    selectedEvents: Array<number | string>,
    onSelectSlot?: () => {
        state: <Object>,
        action: "select" | "click",
        start: Date,
        end: Date,
        resources: Array<{
            color: string,
            id: number | string
        }>,
        slots: Array<Date>
    },
    /*
     * accessors
     * */
    accessors: {
        events: EventAccessor,
        backgroundEvents: BackgroundEventAccessor
    },
    mutators: {
        events: EventMutator,
        backgroundEvents: BackgroundEventMutator
    },
    /*
     * Layout Strategies
     * */
    layoutStrategies: {
        events: LayoutStrategy,
        backgroundEvents: LayoutStrategy
    },
    /*
     * Custom Components
     * */
    components: {
        event: Array<React.Component>,
        backgroundEvent: Array<React.Component>,
        eventOverlay: Array<React.Component>,
        eventWrapper: Array<React.Component>,
        dayWrapper: Array<React.Component>,
        dateCellWrapper: Array<React.Component>,
        toolbar: Array<React.Component>,
        agenda: {
            date: React.Component,
            time: React.Component,
            event: React.Component,
            backgroundEvent: React.Component
        },
        day: {
            header: React.Component,
            event: React.Component,
            backgroundEvent: React.Component,
            eventOverlay: React.Component
        },
        week: {
            header: React.Component,
            event: React.Component,
            backgroundEvent: React.Component,
            eventOverlay: React.Component
        },
        month: {
            header: React.Component,
            dateHeader: React.Component,
            event: React.Component,
            backgroundEvent: React.Component
        }
    },
    /*
     * date formats
     * */
    formats: {
        dateFormat: string,
        dayFormat: string,
        weekdayFormat: string,
        timeGutterFormat: string,
        monthHeaderFormat: string,
        dayRangeHeaderFormat: ({ start: Date, end: Date }, culture: string, local: Date): Date,
        dayHeaderFormat: string,
        agendaHeaderFormat: string,
        selectRangeFormat: ({ start: Date, end: Date }, culture: string, local: Date): Date,
        agendaDateFormat: string,
        agendaTimeFormat: string,
        agendaTimeRangeFormat: ({ start: Date, end: Date }, culture: string, local: Date): Date,
        eventTimeRangeFormat: ({ start: Date, end: Date }, culture: string, local: Date): Date,
        eventTimeRangeStartFormat: ({ start: Date, end: Date }, culture: string, local: Date): Date,
        eventTimeRangeEndFormat: ({ start: Date, end: Date }, culture: string, local: Date): Date
    },
    /*
     * messages
     * */
    messages: {
        allDay: string | Function,
        previous: string | Function,
        next: string | Function,
        today: string | Function,
        month: string | Function,
        week: string | Function,
        day: string | Function,
        agenda: string | Function,
        date: string | Function,
        time: string | Function,
        event: string | Function,
        showMore: string | Function
    },
    /*
     * i dont know ¯\_(ツ)_/¯
     * */
    drilldownView: React.Component,
    getDrillDownView: Function,
    toolbar: Function,
    popup: boolean,
    now: Date,
    popupOffset: boolean,
    selectable: boolean,
    /*
     * deprecated props (will be removed asap)
     * */
    longPressThreshold: number,
    onDoubleClickEvent: () => {
        event: <Event>,
        state: <Object>
    }
}

Types

Chroniq works with several data types of Events and Resource.

Event

type Event = {
    id: number | string,
    title: string,
    start: Date,
    end: Date,
    allDay?: boolean,
    color?: string,
    resourceId?: number | string | Array<number> | Array<string>
}

Background Event

type BackgroundEvent = {
    id: number | string,
    title: string,
    start: Date,
    end: Date,
    color?: string,
    resourceId?: number | string
}

Business Hour

type BusinessHour = {
    days: Array<number>,
    from: Date,
    to: date
}

Resource

type Resource = {
    id: number | string,
    title: string,
    color?: string,
    businessHours: Array<BusinessHour>
}

Roadmap

  • DnD Rewrite (remove old code from BigCalendar)
  • move mutiple selected events through the calendar
  • add prop snapDuration for dragging an specific duration
  • Rendering Preview as interval Highlight event
  • Rewrite Selection as internal selection event
  • Implement Prop restrictTo on Events/BackgroundEvents. Restricts events to special views
  • Prop fixedMonthRow

Credits

Incoqnito logo