@toast-ui/vue-calendar
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tui-calendar")):"function"==typeof define&&define.amd?define(["tui-calendar"],t):"object"==typeof exports?exports.toastui=t(require("tui-calendar")):e.toastui=t(e.tui.Calendar)}(window,function(e){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var a=function(){var e=this.$createElement;return(this._self._c||e)("div",{ref:"tuiCalendar"})};a._withStripped=!0;var i=n(0),r=n.n(i),s=["afterRenderSchedule","beforeCreateSchedule","beforeDeleteSchedule","beforeUpdateSchedule","clickDayname","clickSchedule","clickTimezonesCollapseBtn"],o=["start","category"];var c=function(e,t,n,a,i,r,s,o){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),a&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):i&&(c=o?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}({name:"ToastUICalendar",props:{calendars:{type:Array,default:function(){return[]}},schedules:{type:Array,default:function(){return[]},validator:function(e){var t=!1;return e.forEach(function(e){t=o.some(function(t){return!e.hasOwnProperty(t)})}),!t}},view:{type:String,default:"week"},taskView:{type:[Boolean,Array],default:!0},scheduleView:{type:[Boolean,Array],default:!0},theme:{type:Object,default:function(){return{}}},template:{type:Object,default:function(){return{}}},week:{type:Object,default:function(){return{}}},month:{type:Object,default:function(){return{}}},useCreationPopup:{type:Boolean,default:!0},useDetailPopup:{type:Boolean,default:!0},timezones:{type:Array,default:function(){return[]}},disableDblClick:{type:Boolean,default:!1},disableClick:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},usageStatistics:{type:Boolean,default:!0}},watch:{calendars:function(e){this.calendarInstance.setCalendars(e)},schedules:function(){this.calendarInstance.clear(),this.reflectSchedules()},view:function(e){this.calendarInstance.changeView(e,!0)},taskView:function(e){this.calendarInstance.setOptions({taskView:e})},scheduleView:function(e){this.calendarInstance.setOptions({scheduleView:e})},theme:{handler:function(e){this.calendarInstance.setTheme(this.cloneData(e))},deep:!0},week:{handler:function(e){var t="week"!==this.view&&"day"!==this.view;this.calendarInstance.setOptions({week:this.cloneData(e)},t)},deep:!0},month:{handler:function(e){var t="month"!==this.view;this.calendarInstance.setOptions({month:this.cloneData(e)},t)},deep:!0},timezones:function(e){this.calendarInstance.setOptions({timezones:e})},disableDblClick:function(e){this.calendarInstance.setOptions({disableDblClick:e})},disableClick:function(e){this.calendarInstance.setOptions({disableClick:e})},isReadOnly:function(e){this.calendarInstance.setOptions({isReadOnly:e})}},data:function(){return{calendarInstance:null}},mounted:function(){this.calendarInstance=new r.a(this.$refs.tuiCalendar,{defaultView:this.view,taskView:this.taskView,scheduleView:this.scheduleView,theme:this.theme,template:this.template,week:this.week,month:this.month,calendars:this.calendars,useCreationPopup:this.useCreationPopup,useDetailPopup:this.useDetailPopup,timezones:this.timezones,disableDblClick:this.disableDblClick,disableClick:this.disableClick,isReadOnly:this.isReadOnly,usageStatistics:this.usageStatistics}),this.addEventListeners(),this.reflectSchedules()},destroyed:function(){var e=this;s.forEach(function(t){return e.calendarInstance.off(t)}),this.calendarInstance.destroy()},methods:{cloneData:function(e){return JSON.parse(JSON.stringify(e))},addEventListeners:function(){var e=this;s.forEach(function(t){e.calendarInstance.on(t,function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return e.$emit.apply(e,[t].concat(a))})})},reflectSchedules:function(){this.schedules.length>0&&this.invoke("createSchedules",this.schedules)},getRootElement:function(){return this.$refs.tuiCalendar},invoke:function(e){var t;if(this.calendarInstance[e]){for(var n,a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++)i[r-1]=arguments[r];t=(n=this.calendarInstance)[e].apply(n,i)}return t}}},a,[],!1,null,null,null);c.options.__file="src/Calendar.vue";var l=c.exports;n.d(t,"Calendar",function(){return l})}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tui-calendar")):"function"==typeof define&&define.amd?define(["tui-calendar"],t):"object"==typeof exports?exports.toastui=t(require("tui-calendar")):e.toastui=t(e.tui.Calendar)}(window,function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var i=function(){var e=this.$createElement;return(this._self._c||e)("div",{ref:"tuiCalendar"})};i._withStripped=!0;var a=n(0),r=n.n(a),s=["start","category"];var o=function(e,t,n,i,a,r,s,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}({name:"ToastUICalendar",props:{calendars:{type:Array,default:function(){return[]}},schedules:{type:Array,default:function(){return[]},validator:function(e){var t=!1;return e.forEach(function(e){t=s.some(function(t){return!e.hasOwnProperty(t)})}),!t}},view:{type:String,default:"week"},taskView:{type:[Boolean,Array],default:!0},scheduleView:{type:[Boolean,Array],default:!0},theme:{type:Object,default:function(){return{}}},template:{type:Object,default:function(){return{}}},week:{type:Object,default:function(){return{}}},month:{type:Object,default:function(){return{}}},useCreationPopup:{type:Boolean,default:!0},useDetailPopup:{type:Boolean,default:!0},timezones:{type:Array,default:function(){return[]}},disableDblClick:{type:Boolean,default:!1},disableClick:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},usageStatistics:{type:Boolean,default:!0}},watch:{calendars:function(e){this.calendarInstance.setCalendars(e)},schedules:function(){this.calendarInstance.clear(),this.reflectSchedules()},view:function(e){this.calendarInstance.changeView(e,!0)},taskView:function(e){this.calendarInstance.setOptions({taskView:e})},scheduleView:function(e){this.calendarInstance.setOptions({scheduleView:e})},theme:{handler:function(e){this.calendarInstance.setTheme(this.cloneData(e))},deep:!0},week:{handler:function(e){var t="week"!==this.view&&"day"!==this.view;this.calendarInstance.setOptions({week:this.cloneData(e)},t)},deep:!0},month:{handler:function(e){var t="month"!==this.view;this.calendarInstance.setOptions({month:this.cloneData(e)},t)},deep:!0},timezones:function(e){this.calendarInstance.setOptions({timezones:e})},disableDblClick:function(e){this.calendarInstance.setOptions({disableDblClick:e})},disableClick:function(e){this.calendarInstance.setOptions({disableClick:e})},isReadOnly:function(e){this.calendarInstance.setOptions({isReadOnly:e})}},mounted:function(){this.calendarInstance=new r.a(this.$refs.tuiCalendar,{defaultView:this.view,taskView:this.taskView,scheduleView:this.scheduleView,theme:this.theme,template:this.template,week:this.week,month:this.month,calendars:this.calendars,useCreationPopup:this.useCreationPopup,useDetailPopup:this.useDetailPopup,timezones:this.timezones,disableDblClick:this.disableDblClick,disableClick:this.disableClick,isReadOnly:this.isReadOnly,usageStatistics:this.usageStatistics}),this.addEventListeners(),this.reflectSchedules()},beforeDestroy:function(){this.calendarInstance.off(),this.calendarInstance.destroy()},methods:{cloneData:function(e){return JSON.parse(JSON.stringify(e))},addEventListeners:function(){for(var e=this,t=function(){var t=i[n];e.calendarInstance.on(t,function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.$emit.apply(e,[t].concat(i))})},n=0,i=Object.keys(this.$listeners);n<i.length;n++)t()},reflectSchedules:function(){this.schedules.length>0&&this.invoke("createSchedules",this.schedules)},getRootElement:function(){return this.$refs.tuiCalendar},invoke:function(e){var t;if(this.calendarInstance[e]){for(var n,i=arguments.length,a=new Array(i>1?i-1:0),r=1;r<i;r++)a[r-1]=arguments[r];t=(n=this.calendarInstance)[e].apply(n,a)}return t}}},i,[],!1,null,null,null);o.options.__file="src/Calendar.vue";var l=o.exports;n.d(t,"Calendar",function(){return l})}])}); |
{ | ||
"name": "@toast-ui/vue-calendar", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "TOAST UI Calendar for Vue", | ||
"main": "dist/toastui-vue-calendar.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
"src", | ||
"index.d.ts" | ||
], | ||
@@ -15,10 +17,10 @@ "scripts": { | ||
"serve": "vue serve ./example/App.vue", | ||
"note": "tuie --tag=$(git describe --tags)" | ||
"note": "tuie" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/nhnent/toast-ui.vue-calendar.git" | ||
"url": "https://github.com/nhn/toast-ui.vue-calendar.git" | ||
}, | ||
"homepage": "https://github.com/nhnent/toast-ui.vue-calendar", | ||
"bugs": "https://github.com/nhnent/toast-ui.vue-calendar/issues", | ||
"homepage": "https://github.com/nhn/toast-ui.vue-calendar", | ||
"bugs": "https://github.com/nhn/toast-ui.vue-calendar/issues", | ||
"author": "NHN. FE Development Lab <dl_javascript@nhn.com>", | ||
@@ -42,3 +44,3 @@ "license": "MIT", | ||
"eslint-plugin-vue": "^4.7.1", | ||
"tui-release-notes": "git+https://github.com/nhnent/tui.release-notes.git", | ||
"tui-release-notes": "git+https://github.com/nhn/tui.release-notes.git", | ||
"vue-loader": "^15.4.1", | ||
@@ -50,4 +52,4 @@ "vue-template-compiler": "^2.5.17", | ||
"dependencies": { | ||
"tui-calendar": "^1.9.0" | ||
"tui-calendar": "^1.11.0" | ||
} | ||
} |
@@ -50,22 +50,35 @@ # TOAST UI Calendar for Vue | ||
```js | ||
import 'tui-calendar/dist/tui-calendar.css' | ||
import { Calendar } from '@toast-ui/vue-calendar' | ||
``` | ||
```js | ||
import { Calendar } from '@toast-ui/vue-calendar'; | ||
import 'tui-calendar/dist/tui-calendar.css'; | ||
// If you use the default popups, use this. | ||
import 'tui-date-picker/dist/tui-date-picker.css'; | ||
import 'tui-time-picker/dist/tui-time-picker.css'; | ||
``` | ||
* Using Commonjs module | ||
```js | ||
require('tui-calendar/dist/tui-calendar.css'); | ||
var toastui = require('@toast-ui/vue-calendar'); | ||
var Calendar = toastui.Calendar; | ||
``` | ||
```js | ||
require('tui-calendar/dist/tui-calendar.css'); | ||
// If you use the default popups, use this. | ||
require('tui-date-picker/dist/tui-date-picker.css'); | ||
require('tui-time-picker/dist/tui-time-picker.css'); | ||
var toastui = require('@toast-ui/vue-calendar'); | ||
var Calendar = toastui.Calendar; | ||
``` | ||
* Using Single File Component | ||
```js | ||
import 'tui-calendar/dist/tui-calendar.css' | ||
import Calendar from '@toast-ui/vue-calendar/src/Calendar.vue' | ||
``` | ||
```js | ||
import 'tui-calendar/dist/tui-calendar.css' | ||
import Calendar from '@toast-ui/vue-calendar/src/Calendar.vue' | ||
// If you use the default popups, use this. | ||
import 'tui-date-picker/dist/tui-date-picker.css'; | ||
import 'tui-time-picker/dist/tui-time-picker.css'; | ||
``` | ||
* Using namespace | ||
@@ -114,3 +127,3 @@ | ||
We provide props for [Options of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/global.html#Options). Each name of props is same options of Toast UI Calendar except `view` is for `defaultView` of option. Additionally you can set schedules using `schedules` of prop. | ||
We provide props for [Options of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/Options). Each name of props is same options of Toast UI Calendar except `view` is for `defaultView` of option. Additionally you can set schedules using `schedules` of prop. | ||
@@ -124,10 +137,10 @@ | Name | Type | Default | Reactive | Description | | ||
| scheduleView | Boolean, Array | true | O | Show the all day and time grid in weekly, daily view. If set `true`, the all day and time show. If you want to show only the all day or time, set array like this: `['allday']` or `['time']`.| | ||
| theme | Object | {} | O | Customize theme. For more infomation about theme, see [ThemeConfig of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/global.html#themeConfig). | | ||
| week | Object | {} | O | Set more for the `week` and `day` view. For more infomation about week, see [WeekOptions of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/global.html#WeekOptions). | | ||
| month | Object | {} | O | Set more for the `month` view. For more infomation about month, see [MonthOptions of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/global.html#MonthOptions). | | ||
| timezones | Array | [] | O | Set multiple time zones. For more information about timezones, see [Timezone of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/global.html#Timezone). | | ||
| theme | Object | {} | O | Customize theme. For more infomation about theme, see [ThemeConfig of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/themeConfig). | | ||
| week | Object | {} | O | Set more for the `week` and `day` view. For more infomation about week, see [WeekOptions of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/WeekOptions). | | ||
| month | Object | {} | O | Set more for the `month` view. For more infomation about month, see [MonthOptions of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/MonthOptions). | | ||
| timezones | Array | [] | O | Set multiple time zones. For more information about timezones, see [Timezone of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/Timezone). | | ||
| disableDblClick | Boolean | false | O | Disable double click to create a schedule. | | ||
| disableClick | Boolean | false | O | Whether to use mouse click events as defaults to create schedules. | | ||
| isReadOnly | Boolean | false | O | Set read only mode. If `true`, a user can't create and modify any schedule. | | ||
| template | Object | {} | X | Customize renderer. For more information about template, see [Template of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/global.html#Template). | | ||
| template | Object | {} | X | Customize renderer. For more information about template, see [Template of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/Template). | | ||
| useCreationPopup | Boolean | true | X | Whether use default creation popup or not. | | ||
@@ -199,5 +212,5 @@ | useDetailPopup | Boolean | true | X | Whether use default detail popup or not. | | ||
], | ||
view: 'day' | ||
taskView: false | ||
scheduleView: ['time'] | ||
view: 'day', | ||
taskView: false, | ||
scheduleView: ['time'], | ||
theme: { | ||
@@ -257,3 +270,3 @@ 'month.dayname.height': '30px', | ||
For more information such as the parameters of each event, see [Event of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/Calendar.html). | ||
For more information such as the parameters of each event, see [Event of Toast UI Calendar](https://nhn.github.io/tui.calendar/latest/Calendar#event-afterRenderSchedule). | ||
@@ -260,0 +273,0 @@ #### Example |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
26885
7
12
379
0
Updatedtui-calendar@^1.11.0