@event-calendar/interaction
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -180,6 +180,3 @@ import { SvelteComponent, init, safe_not_equal, noop, listen, run_all, component_subscribe, globals, subscribe, is_function, set_store_value, create_component, mount_component, transition_in, transition_out, destroy_component, empty, insert, group_outros, check_outros, detach, binding_callbacks } from 'svelte/internal'; | ||
function start(eventToDrag, jsEvent) { | ||
(window.getSelection | ||
? window.getSelection() | ||
: document.selection).empty(); | ||
window.getSelection().removeAllRanges(); | ||
event = eventToDrag; | ||
@@ -186,0 +183,0 @@ colRect = rect(colEl); |
{ | ||
"name": "@event-calendar/interaction", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"title": "Event Calendar Interaction plugin", | ||
@@ -20,4 +20,5 @@ "description": "Full-sized drag & drop event calendar with resource view", | ||
"dependencies": { | ||
"@event-calendar/common": "~0.3.2", | ||
"svelte": "^3.42.3" | ||
} | ||
} |
@@ -7,3 +7,3 @@ # Event Calendar [](https://www.jsdelivr.com/package/npm/@event-calendar/build) | ||
* Lightweight (40.7kb [br](https://en.wikipedia.org/wiki/Brotli) compressed `modern` version) | ||
* Lightweight (40.6kb [br](https://en.wikipedia.org/wiki/Brotli) compressed `modern` version) | ||
* Zero-dependency (pre-built bundle) | ||
@@ -18,2 +18,3 @@ * Used by [Bookly](https://wordpress.org/plugins/bookly-responsive-appointment-booking-tool/) | ||
- [Pre-built browser ready bundle](#pre-built-browser-ready-bundle) | ||
- [Modifying options after initialization](#modifying-options-after-initialization) | ||
- [Options](#options) | ||
@@ -127,12 +128,12 @@ <table> | ||
<script> | ||
import Calendar from '@event-calendar/core'; | ||
import TimeGrid from '@event-calendar/time-grid'; | ||
import Calendar from '@event-calendar/core'; | ||
import TimeGrid from '@event-calendar/time-grid'; | ||
let plugins = [TimeGrid]; | ||
let options = { | ||
view: 'timeGridWeek', | ||
events: [ | ||
// your list of events | ||
] | ||
}; | ||
let plugins = [TimeGrid]; | ||
let options = { | ||
view: 'timeGridWeek', | ||
events: [ | ||
// your list of events | ||
] | ||
}; | ||
</script> | ||
@@ -148,12 +149,12 @@ | ||
let ec = new Calendar({ | ||
target: document.getElementById('ec'), | ||
props: { | ||
plugins: [TimeGrid], | ||
options: { | ||
view: 'timeGridWeek', | ||
events: [ | ||
// your list of events | ||
] | ||
} | ||
target: document.getElementById('ec'), | ||
props: { | ||
plugins: [TimeGrid], | ||
options: { | ||
view: 'timeGridWeek', | ||
events: [ | ||
// your list of events | ||
] | ||
} | ||
} | ||
}); | ||
@@ -173,6 +174,6 @@ ``` | ||
let ec = new EventCalendar(document.getElementById('ec'), { | ||
view: 'timeGridWeek', | ||
events: [ | ||
// your list of events | ||
] | ||
view: 'timeGridWeek', | ||
events: [ | ||
// your list of events | ||
] | ||
}); | ||
@@ -189,13 +190,13 @@ ``` | ||
<script> | ||
import Calendar from '@event-calendar/core'; | ||
import TimeGrid from '@event-calendar/time-grid'; | ||
import Calendar from '@event-calendar/core'; | ||
import TimeGrid from '@event-calendar/time-grid'; | ||
let plugins = [TimeGrid]; | ||
let options = { | ||
view: 'timeGridWeek' | ||
}; | ||
let plugins = [TimeGrid]; | ||
let options = { | ||
view: 'timeGridWeek' | ||
}; | ||
function updateOptions() { | ||
options.slotDuration = '01:00'; | ||
} | ||
function updateOptions() { | ||
options.slotDuration = '01:00'; | ||
} | ||
</script> | ||
@@ -289,3 +290,3 @@ | ||
function (date) { | ||
// return formatted date string | ||
// return formatted date string | ||
} | ||
@@ -422,3 +423,3 @@ ``` | ||
function (eventInfo) { | ||
// return string or object | ||
// return string or object | ||
} | ||
@@ -879,3 +880,3 @@ ``` | ||
function (time) { | ||
// return formatted time string | ||
// return formatted time string | ||
} | ||
@@ -1277,18 +1278,18 @@ ``` | ||
<script> | ||
import Calendar from '@event-calendar/core'; | ||
import TimeGrid from '@event-calendar/time-grid'; | ||
import Calendar from '@event-calendar/core'; | ||
import TimeGrid from '@event-calendar/time-grid'; | ||
let ec; | ||
let plugins = [TimeGrid]; | ||
let options = { | ||
view: 'timeGridWeek', | ||
eventSources: [{events: function() { | ||
console.log('fetching...'); | ||
return []; | ||
}}] | ||
}; | ||
let ec; | ||
let plugins = [TimeGrid]; | ||
let options = { | ||
view: 'timeGridWeek', | ||
eventSources: [{events: function() { | ||
console.log('fetching...'); | ||
return []; | ||
}}] | ||
}; | ||
function invokeMethod() { | ||
ec.refetchEvents(); | ||
} | ||
function invokeMethod() { | ||
ec.refetchEvents(); | ||
} | ||
</script> | ||
@@ -1295,0 +1296,0 @@ |
1688
54424
2
506
+ Added@event-calendar/common@0.3.3(transitive)