All Projects β†’ iNeoO β†’ Vue Meeting Selector

iNeoO / Vue Meeting Selector

Licence: mit
This component is inspired from the meeting selector from doctolib with the power of Vuejs components.

Projects that are alternatives of or similar to Vue Meeting Selector

v-owl-carousel
πŸ¦‰ VueJS wrapper for Owl Carousel
Stars: ✭ 46 (+4.55%)
Mutual labels:  vue-components, vue-component
pagination
No description or website provided.
Stars: ✭ 14 (-68.18%)
Mutual labels:  vue-components, vue-component
vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (+188.64%)
Mutual labels:  vue-components, vue-component
unique-ui
δΈ€δΈͺη”¨δΊŽVue2.xηš„η§»εŠ¨η«―η»„δ»ΆεΊ“
Stars: ✭ 43 (-2.27%)
Mutual labels:  vue-components, vue-component
Vue Video Player
🎞 @videojs component for @vuejs
Stars: ✭ 4,026 (+9050%)
Mutual labels:  vue-components, vue-component
shadow
Shadow dom support for Vue
Stars: ✭ 46 (+4.55%)
Mutual labels:  vue-components, vue-component
vue-mapbox-map
A minimalist Vue component wrapping Mapbox GL or MapLibre GL for dynamic interaction!
Stars: ✭ 26 (-40.91%)
Mutual labels:  vue-components, vue-component
Vue Codemirror
⌨️ @codemirror component for @vuejs
Stars: ✭ 2,115 (+4706.82%)
Mutual labels:  vue-components, vue-component
Quasar
Quasar Framework - Build high-performance VueJS user interfaces in record time
Stars: ✭ 20,090 (+45559.09%)
Mutual labels:  vue-components, vue-component
vui-vc-next
Vue 3 with Vite Playground - Mobile web UI components - (vue3+vite2).
Stars: ✭ 15 (-65.91%)
Mutual labels:  vue-components, vue-component
vue-virtualised
Blazing fast scrolling and updating for any amount of list and hierarchical data.
Stars: ✭ 18 (-59.09%)
Mutual labels:  vue-components, vue-component
Vue Touch Ripple
πŸ‘† Touch ripple component for @vuejs
Stars: ✭ 443 (+906.82%)
Mutual labels:  vue-components, vue-component
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+475%)
Mutual labels:  vue-components, vue-component
vstx-data-table
A data table component for the Vue Stacks Ecosystem
Stars: ✭ 34 (-22.73%)
Mutual labels:  vue-components, vue-component
Vue Diagrams
Diagram component for vue.js, inspired by react-diagrams
Stars: ✭ 218 (+395.45%)
Mutual labels:  vue-components, vue-component
v-tostini
Toast plugin for Vue.js 2.x
Stars: ✭ 12 (-72.73%)
Mutual labels:  vue-components, vue-component
Vue Parallax Js
Tiny vue component that adds a directive for parallax effect on elements.
Stars: ✭ 107 (+143.18%)
Mutual labels:  vue-components, vue-component
Vue Awesome Swiper
πŸ† Swiper component for @vuejs
Stars: ✭ 12,072 (+27336.36%)
Mutual labels:  vue-components, vue-component
vue-notification-bell
Vue.js notification bell component.
Stars: ✭ 64 (+45.45%)
Mutual labels:  vue-components, vue-component
Cheetah Grid
The fastest open-source data table for web.
Stars: ✭ 417 (+847.73%)
Mutual labels:  vue-components, vue-component

This component is inspired from the meeting selector from doctolib with the power of Vuejs components.

Build status Coverage Status

vue-meeting-selector

Dependencies

  • required: Vuejs >= 2.6.x

Install

npm install vue-meeting-selector --save
yarn add vue-meeting-selector

Include the file in your app

import VueMeetingSelector from 'vue-meeting-selector';

Contributing

Issues and PR's are much appreciated. When you create a new PR please make it against the develop branch when adding new features and to the fix branch when fixing small issues instead of master.

Usage and Documentation

Fast exemple

<template>
  <vue-meeting-selector
    v-model="meeting"
    :date="date"
    :loading="loading"
    :meetings-days="meetingsDays"
    @next-date="nextDate"
    @previous-date="previousDate" />
</template>

<script>
import VueMeetingSelector from 'vueMeetingSelector';

export default {
  components: {
    VueMeetingSelector,
  },
  data() {
    return {
      date: new Date('2020-01-01:01:00'),
      meeting: null,
      loading: false,
      meetingsDays: [],
    };
  },
  methods: {
    getMeetings(date) {
      // methods who return the meetings
    },
    async nextDate() {
      this.loading = true;
      const date = new Date(this.date);
      date.setDate(date.getDate() + 7);
      this.meetingsDays = await this.getMeetings(date);
      this.date = date;
      this.loading = false;
    },
    async previousDate() {
      this.loading = true;
      const date = new Date(this.date);
      date.setDate(date.getDate() - 7);
      this.meetingsDays = await this.getMeetings(date);
      this.date = date;
      this.loading = false;
    },
  },
  async created() {
    this.loading = true;
    this.meetingsDays = await this.getMeetings(this.date);
    this.loading = false;
  },
};
</script>

Types

interface MeetingSlot {
  date: Date | string;
  [key: string]: any;
}
interface MeetingsDay {
  date: Date | string;
  slots: MeetingSlot[];
  [key: string]: any;
}
interface ClassNames {
  tabClass?: string,
  tabPaginationleft?: string,
  tabPaginationPreviousButton?: string,
  tabPaginationRight?: string,
  tabPaginationNextButton?: string,
  tabPaginationUpButton?: string,
  tabPaginationDownButton?: string,
  tabDays?: string,
  tabDayDisplay?: string,
  tabMeetings?: string,
  tabMeeting?: string,
  tabMeetingButton?: string,
  tabMeetingEmpty?: string,
  tabLoading?: string,
}
// defaults value are available in src/defaults/calendarOptions.ts
interface CalendarOptions {
  daysLabel: string[]; // Labels for days in title, start by sunday
  monthsLabel: string[]; // labels for months in title, start by january
  limit: number, // max nb meetings to display on a same column
  loadingLabel: string; // label to display when loading
  disabledDate: Function; // function to disable left button (date is passed as params)
}

Props

Params Type
v-model MeetingSlot | MeetingSlot[]
date Date | string
meetingsDays MeetingsDays[]
calendarOptions Object
classNames Object
multi boolean
loading boolean

Events

Name Params
meeting-slot-selected MeetingSlot | MeetingSlot[]
meeting-slot-unselected -
change MeetingSlot
next-date -
previous-date -

Slots/ScopedSlots available

To change head of every column, a meetings (MeetingsDay) is passed as slot-scope.

<template
  #header="{ meetings }">
  <div>{{ meetings.date }}</div>
</template>

To change the previous/next button.

<template #button-previous>
  <button
    @click="previous">
    previous
  </button>
</template>
<template #button-next>
  <button
    @click="next">
    next
  </button>
</template>

To change up/down button to change hours of meetings, you will have to trigger methods with refs

<template #button-up="{ isDisabled }">
  <button
    :disabled="isDisabled"
    @click="up">
    up
  </button>
</template>
<template
  #button-down="{ isDisabled }">
  <button
    :disabled="isDisabled"
    @click="down">
    down
  </button>
</template>


<script>
export default {
  methods: {
    up() {
      this.$refs.meetingSelector.previousMeetings();
      // (this.$refs.meetingSelector as Vue & { previousMeetings: () => void }).previousMeetings();
    },
    down() {
      this.$refs.meetingSelector.nextMeetings();
      // (this.$refs.meetingSelector as Vue & { nextMeetings: () => void }).nextMeetings();
    },
  },  
};
</script>

To change the display of a meeting. (you will have to manually change the v-model) if the meeting don't have date, it's because the is no meeting. (you will have to handle a different display)

<template
  #meeting="{ meeting }">
  <div>{{ meeting.date }}</div>
</template>

To change the display of loading

<template
  #loading>
  Loading ...
</template>

Project setup

npm install

Compiles and hot-reloads for development component

npm run dev

Compiles and hot-reloads for development doc

npm run doc

Compiles and minifies for production the lib

npm run build:lib

Compiles and minifies for production the doc

npm run build:doc

Run your unit tests

npm run test:unit

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].