@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "4.6.0",
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.34.8"
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
@@ -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,
@@ -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: ['buttonText', 'theme'].includes(key)
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 ['buttonText', 'theme']) {
148
+ for (let key of specialOptions) {
149
149
  if (isFunction(opts[key])) {
150
150
  override[key] = opts[key](result[key]);
151
151
  }