From 4581f18f5f0e2139df6cf7abc4d4131e6ac8c884 Mon Sep 17 00:00:00 2001 From: sirbeagle Date: Wed, 31 Jul 2019 17:00:26 -0400 Subject: [PATCH] add in JSON description files for quasar-app-extension-daykeep; change dependency structure to try and avoid having multiple copies of Vue initialized which might be causing #66. --- .../calendar/mixins/code/CalendarMixin.js | 2 - .../calendar/templates/quasar/Calendar.json | 50 ++++++++++++++ .../templates/quasar/CalendarAgenda.json | 53 ++++++++++++++ .../templates/quasar/CalendarMonth.json | 44 ++++++++++++ .../templates/quasar/CalendarMultiDay.json | 69 +++++++++++++++++++ package.json | 16 +++-- 6 files changed, 225 insertions(+), 9 deletions(-) create mode 100644 component/calendar/templates/quasar/Calendar.json create mode 100644 component/calendar/templates/quasar/CalendarAgenda.json create mode 100644 component/calendar/templates/quasar/CalendarMonth.json create mode 100644 component/calendar/templates/quasar/CalendarMultiDay.json diff --git a/component/calendar/mixins/code/CalendarMixin.js b/component/calendar/mixins/code/CalendarMixin.js index 1e998da..d08b712 100644 --- a/component/calendar/mixins/code/CalendarMixin.js +++ b/component/calendar/mixins/code/CalendarMixin.js @@ -53,8 +53,6 @@ export default { ) }, handleEventDetailEvent: function (params, thisRef) { - console.debug('handleEventDetailEvent triggered, params = ', params) - console.debug(this) if (!this.preventEventDetail) { if (thisRef === undefined) { thisRef = 'defaultEventDetail' diff --git a/component/calendar/templates/quasar/Calendar.json b/component/calendar/templates/quasar/Calendar.json new file mode 100644 index 0000000..7133895 --- /dev/null +++ b/component/calendar/templates/quasar/Calendar.json @@ -0,0 +1,50 @@ +{ + "type": "component", + "props": { + "start-date": { + "type": [ + "Date", + "DateTime" + ], + "desc": "A JavaScript Date or Luxon DateTime object that passes in a starting display date for the calendar to display." + }, + "sunday-first-day-of-week": { + "type": "Boolean", + "desc": "If true this will force month and week calendars to start on a Sunday instead of the standard Monday." + }, + "calendar-locale": { + "type": "String", + "desc": "A string setting the locale. We use the Luxon package for this and they describe how to set this at https://moment.github.io/luxon/docs/manual/intl.html. This will default to the user's system setting." + }, + "calendar-timezone": { + "type": "String", + "desc": "Manually set the timezone for the calendar. Many strings can be passed in including 'UTC' or any valid [IANA zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This is better explained [here](https://moment.github.io/luxon/docs/manual/zones.html)." + }, + "event-ref": { + "type": "String", + "desc": "Give the calendar component a custom name so that events triggered on the global event bus can be watched." + }, + "prevent-event-detail": { + "type": "Boolean", + "desc": "Prevent the default event detail popup from appearing when an event is clicked in a calendar." + }, + "allow-editing": { + "type": "Boolean", + "desc": "Allows for individual events to be edited. See the editing section." + }, + "render-html": { + "type": "Boolean", + "desc": "Event descriptions render HTML tags and provide a WYSIWYG editor when editing. No HTML validation is performed so be sure to pass the data passed in does not present a security threat." + }, + "day-display-start-hour": { + "type": "Number", + "desc": "Will scroll to a defined start hour when a day / multi-day component is rendered. Pass in the hour of the day from 0-23, the default being '7'. Current has no effect on the 'CalendarAgenda' component." + }, + + "tab-labels": { + "type": "Object", + "desc": "Passing in an object with strings that will override the labels for the different calendar components. Set variables for 'month', 'week', 'threeDay', 'day' and 'agenda'. Eventually we will replace this with language files and will use the 'calendar-locale' setting." + } + + } +} diff --git a/component/calendar/templates/quasar/CalendarAgenda.json b/component/calendar/templates/quasar/CalendarAgenda.json new file mode 100644 index 0000000..5871f5d --- /dev/null +++ b/component/calendar/templates/quasar/CalendarAgenda.json @@ -0,0 +1,53 @@ +{ + "type": "component", + "props": { + "start-date": { + "type": [ + "Date", + "DateTime" + ], + "desc": "A JavaScript Date or Luxon DateTime object that passes in a starting display date for the calendar to display." + }, + "sunday-first-day-of-week": { + "type": "Boolean", + "desc": "If true this will force month and week calendars to start on a Sunday instead of the standard Monday." + }, + "calendar-locale": { + "type": "String", + "desc": "A string setting the locale. We use the Luxon package for this and they describe how to set this at https://moment.github.io/luxon/docs/manual/intl.html. This will default to the user's system setting." + }, + "calendar-timezone": { + "type": "String", + "desc": "Manually set the timezone for the calendar. Many strings can be passed in including 'UTC' or any valid [IANA zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This is better explained [here](https://moment.github.io/luxon/docs/manual/zones.html)." + }, + "event-ref": { + "type": "String", + "desc": "Give the calendar component a custom name so that events triggered on the global event bus can be watched." + }, + "prevent-event-detail": { + "type": "Boolean", + "desc": "Prevent the default event detail popup from appearing when an event is clicked in a calendar." + }, + "allow-editing": { + "type": "Boolean", + "desc": "Allows for individual events to be edited. See the editing section." + }, + "render-html": { + "type": "Boolean", + "desc": "Event descriptions render HTML tags and provide a WYSIWYG editor when editing. No HTML validation is performed so be sure to pass the data passed in does not present a security threat." + }, + "day-display-start-hour": { + "type": "Number", + "desc": "Will scroll to a defined start hour when a day / multi-day component is rendered. Pass in the hour of the day from 0-23, the default being '7'. Current has no effect on the 'CalendarAgenda' component." + }, + + "num-days": { + "type": "Number", + "desc": "The number of days the multi-day calendar. A value of `1` will change the header to be more appropriate for a single day." + }, + "scroll-height": { + "type": "String", + "desc": "Defaults to '200px', this is meant to define the size of the 'block' style." + } + } +} diff --git a/component/calendar/templates/quasar/CalendarMonth.json b/component/calendar/templates/quasar/CalendarMonth.json new file mode 100644 index 0000000..1b5d525 --- /dev/null +++ b/component/calendar/templates/quasar/CalendarMonth.json @@ -0,0 +1,44 @@ +{ + "type": "component", + "props": { + "start-date": { + "type": [ + "Date", + "DateTime" + ], + "desc": "A JavaScript Date or Luxon DateTime object that passes in a starting display date for the calendar to display." + }, + "sunday-first-day-of-week": { + "type": "Boolean", + "desc": "If true this will force month and week calendars to start on a Sunday instead of the standard Monday." + }, + "calendar-locale": { + "type": "String", + "desc": "A string setting the locale. We use the Luxon package for this and they describe how to set this at https://moment.github.io/luxon/docs/manual/intl.html. This will default to the user's system setting." + }, + "calendar-timezone": { + "type": "String", + "desc": "Manually set the timezone for the calendar. Many strings can be passed in including 'UTC' or any valid [IANA zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This is better explained [here](https://moment.github.io/luxon/docs/manual/zones.html)." + }, + "event-ref": { + "type": "String", + "desc": "Give the calendar component a custom name so that events triggered on the global event bus can be watched." + }, + "prevent-event-detail": { + "type": "Boolean", + "desc": "Prevent the default event detail popup from appearing when an event is clicked in a calendar." + }, + "allow-editing": { + "type": "Boolean", + "desc": "Allows for individual events to be edited. See the editing section." + }, + "render-html": { + "type": "Boolean", + "desc": "Event descriptions render HTML tags and provide a WYSIWYG editor when editing. No HTML validation is performed so be sure to pass the data passed in does not present a security threat." + }, + "day-display-start-hour": { + "type": "Number", + "desc": "Will scroll to a defined start hour when a day / multi-day component is rendered. Pass in the hour of the day from 0-23, the default being '7'. Current has no effect on the 'CalendarAgenda' component." + } + } +} diff --git a/component/calendar/templates/quasar/CalendarMultiDay.json b/component/calendar/templates/quasar/CalendarMultiDay.json new file mode 100644 index 0000000..1666599 --- /dev/null +++ b/component/calendar/templates/quasar/CalendarMultiDay.json @@ -0,0 +1,69 @@ +{ + "type": "component", + "props": { + "start-date": { + "type": [ + "Date", + "DateTime" + ], + "desc": "A JavaScript Date or Luxon DateTime object that passes in a starting display date for the calendar to display." + }, + "sunday-first-day-of-week": { + "type": "Boolean", + "desc": "If true this will force month and week calendars to start on a Sunday instead of the standard Monday." + }, + "calendar-locale": { + "type": "String", + "desc": "A string setting the locale. We use the Luxon package for this and they describe how to set this at https://moment.github.io/luxon/docs/manual/intl.html. This will default to the user's system setting." + }, + "calendar-timezone": { + "type": "String", + "desc": "Manually set the timezone for the calendar. Many strings can be passed in including 'UTC' or any valid [IANA zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This is better explained [here](https://moment.github.io/luxon/docs/manual/zones.html)." + }, + "event-ref": { + "type": "String", + "desc": "Give the calendar component a custom name so that events triggered on the global event bus can be watched." + }, + "prevent-event-detail": { + "type": "Boolean", + "desc": "Prevent the default event detail popup from appearing when an event is clicked in a calendar." + }, + "allow-editing": { + "type": "Boolean", + "desc": "Allows for individual events to be edited. See the editing section." + }, + "render-html": { + "type": "Boolean", + "desc": "Event descriptions render HTML tags and provide a WYSIWYG editor when editing. No HTML validation is performed so be sure to pass the data passed in does not present a security threat." + }, + "day-display-start-hour": { + "type": "Number", + "desc": "Will scroll to a defined start hour when a day / multi-day component is rendered. Pass in the hour of the day from 0-23, the default being '7'. Current has no effect on the 'CalendarAgenda' component." + }, + + "num-days": { + "type": "Number", + "desc": "The number of days the multi-day calendar. A value of `1` will change the header to be more appropriate for a single day." + }, + "nav-days": { + "type": "Number", + "desc": "This is how many days the previous / next navigation buttons will jump." + }, + "force-start-of-week": { + "type": "Boolean", + "desc": "Default is 'false'. This is appropriate if you have a week display (7 days) that you want to always start on the first day of the week." + }, + "day-cell-height": { + "type": "Number", + "desc": "Default is '5'. How high in units (unit type defined by 'day-cell-height-unit') an hour should be." + }, + "day-cell-height-unit": { + "type": "String", + "desc": "his is how many days the previous / next navigation buttons will jump." + }, + "show-half-hours": { + "type": "Boolean", + "desc": "Default is `false`. Show ticks and labels for half hour segments." + } + } +} diff --git a/package.json b/package.json index bc78882..b41d47e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@daykeep/calendar-quasar", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "productName": "Daykeep Calendar for Quasar", "description": "A full display calendar for the Quasar Vue.js framework", "keywords": [ @@ -32,15 +32,13 @@ "build:pwa": "quasar build -m pwa" }, "dependencies": { - "@daykeep/calendar-core": "^1.0.0-beta.4", - "@quasar/extras": "1.1.2", + "@daykeep/calendar-core": "^1.0.0", "lodash.has": "^4.5.2", - "luxon": "1.16.0", - "quasar": "1.0.0-rc.4" + "luxon": "^1.17.2" }, "devDependencies": { - "@quasar/app": "1.0.0-rc.6", - "@quasar/quasar-app-extension-dotenv": "1.0.0-beta.10", + "@quasar/app": "^1.0.4", + "@quasar/quasar-app-extension-dotenv": "^1.0.0-beta.10", "@vue/eslint-config-standard": "^4.0.0", "babel-eslint": "^10.0.1", "copy-webpack-plugin": "^5.0.3", @@ -50,6 +48,10 @@ "eslint-plugin-vue": "^5.0.0", "strip-ansi": "=3.0.1" }, + "peerDependencies": { + "@quasar/extras": "^1.2.0", + "quasar": "^1.0.5" + }, "engines": { "node": ">= 8.9.0", "npm": ">= 5.6.0",