@event-calendar/core 4.6.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -4
- package/dist/index.css +1 -1
- package/dist/index.js +180 -246
- package/package.json +2 -2
- package/src/plugins/interaction/Action.svelte +3 -2
- package/src/storage/options.js +3 -0
- package/src/storage/state.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event-calendar/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"title": "Event Calendar Core package",
|
|
5
5
|
"description": "Full-sized drag & drop event calendar with resource & timeline views",
|
|
6
6
|
"keywords": [
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"#components": "./src/lib/components/index.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"svelte": "^5.
|
|
35
|
+
"svelte": "^5.41.2"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {getContext} from 'svelte';
|
|
2
|
+
import {getContext, onMount} from 'svelte';
|
|
3
3
|
import {
|
|
4
4
|
addDay, addDuration, ancestor, assign, cloneDate, cloneEvent, copyTime, createDuration, getElementWithPayload,
|
|
5
5
|
getPayload, isFunction, listen, listView, max, min, noop, rect, runAll, subtractDay, subtractDuration,
|
|
@@ -582,7 +582,6 @@
|
|
|
582
582
|
let target = jsEvent.target;
|
|
583
583
|
let stops = [];
|
|
584
584
|
let stop = () => runAll(stops);
|
|
585
|
-
stops.push(listen(window, 'touchmove', noop, {passive: false}))
|
|
586
585
|
stops.push(listen(target, 'touchmove', createPreventDefaultHandler(() => interacting)));
|
|
587
586
|
stops.push(listen(target, 'touchend', stop));
|
|
588
587
|
stops.push(listen(target, 'touchcancel', stop));
|
|
@@ -596,6 +595,8 @@
|
|
|
596
595
|
}
|
|
597
596
|
};
|
|
598
597
|
}
|
|
598
|
+
|
|
599
|
+
onMount(() => listen(window, 'touchmove', noop, {passive: false}));
|
|
599
600
|
</script>
|
|
600
601
|
|
|
601
602
|
<svelte:window
|
package/src/storage/options.js
CHANGED
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
createDate, createDuration, createEvents, createEventSources, createResources, createDateRange, keys, setMidnight
|
|
3
3
|
} from '#lib';
|
|
4
4
|
|
|
5
|
+
// Options where initial value is passed to the function
|
|
6
|
+
export const specialOptions = ['buttonText', 'customButtons', 'theme'];
|
|
7
|
+
|
|
5
8
|
export function createOptions(plugins) {
|
|
6
9
|
let options = {
|
|
7
10
|
allDayContent: undefined,
|
package/src/storage/state.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {get, writable} from 'svelte/store';
|
|
2
2
|
import {tick} from 'svelte';
|
|
3
|
-
import {createOptions, createParsers} from './options.js';
|
|
3
|
+
import {createOptions, createParsers, specialOptions} from './options.js';
|
|
4
4
|
import {activeRange, currentRange, dayGrid, events, now, today, view as view2, viewDates, viewTitle, filteredEvents} from './stores.js';
|
|
5
5
|
import {identity, intl, intlRange, isFunction, keys, toViewWithLocalDates} from '#lib';
|
|
6
6
|
|
|
@@ -86,7 +86,7 @@ export default class {
|
|
|
86
86
|
|
|
87
87
|
this[key] = {
|
|
88
88
|
// Set value in all views
|
|
89
|
-
set:
|
|
89
|
+
set: specialOptions.includes(key)
|
|
90
90
|
? value => {
|
|
91
91
|
if (isFunction(value)) {
|
|
92
92
|
let result = value(defOpts[key]);
|
|
@@ -145,7 +145,7 @@ function mergeOpts(...args) {
|
|
|
145
145
|
let result = {};
|
|
146
146
|
for (let opts of args) {
|
|
147
147
|
let override = {};
|
|
148
|
-
for (let key of
|
|
148
|
+
for (let key of specialOptions) {
|
|
149
149
|
if (isFunction(opts[key])) {
|
|
150
150
|
override[key] = opts[key](result[key]);
|
|
151
151
|
}
|