@event-calendar/core 4.4.2 → 4.5.0

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 CHANGED
@@ -228,8 +228,8 @@ This bundle contains a version of the calendar that includes all plugins and is
228
228
 
229
229
  The first step is to include the following lines of code in the `<head>` section of your page:
230
230
  ```html
231
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.4.2/dist/event-calendar.min.css">
232
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.4.2/dist/event-calendar.min.js"></script>
231
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.5.0/dist/event-calendar.min.css">
232
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.5.0/dist/event-calendar.min.js"></script>
233
233
  ```
234
234
 
235
235
  <details>
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v4.4.2
2
+ * EventCalendar v4.5.0
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  .ec {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v4.4.2
2
+ * EventCalendar v4.5.0
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  import { tick, getContext, untrack, setContext, onMount, mount, unmount } from "svelte";
@@ -1216,7 +1216,9 @@ class State {
1216
1216
  if (newView === view2) {
1217
1217
  this._viewComponent.set(component);
1218
1218
  if (isFunction(opts.viewDidMount)) {
1219
- tick().then(() => opts.viewDidMount(get(this._view)));
1219
+ tick().then(() => opts.viewDidMount({
1220
+ view: toViewWithLocalDates(get(this._view))
1221
+ }));
1220
1222
  }
1221
1223
  for (let key of keys(opts)) {
1222
1224
  this[key]._set(opts[key]);
@@ -1891,7 +1893,7 @@ function BaseEvent($$anchor, $$props) {
1891
1893
  let style = $.derived(() => entries(styles()({
1892
1894
  "background-color": $.get(bgColor),
1893
1895
  "color": $.get(txtColor)
1894
- })).map((entry) => `${entry[0]}:${entry[1]}`).join(";"));
1896
+ })).map((entry) => `${entry[0]}:${entry[1]}`).concat($.get(event).styles).join(";"));
1895
1897
  let classNames = $.derived(() => classes()([
1896
1898
  bgEvent($.get(display)) ? $theme().bgEvent : $theme().event,
1897
1899
  ...createEventClasses($eventClassNames(), $.get(event), $_view())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "title": "Event Calendar Core package",
5
5
  "description": "Full-sized drag & drop event calendar with resource & timeline views",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  let txtColor = $derived(event.textColor ?? resourceTextColor(event, $resources) ?? $eventTextColor);
28
28
  let style = $derived(entries(styles(
29
29
  {'background-color': bgColor, 'color': txtColor}
30
- )).map(entry => `${entry[0]}:${entry[1]}`).join(';'));
30
+ )).map(entry => `${entry[0]}:${entry[1]}`).concat(event.styles).join(';'));
31
31
 
32
32
  // Class
33
33
  let classNames = $derived(classes([
@@ -2,7 +2,7 @@ import {get, writable} from 'svelte/store';
2
2
  import {tick} from 'svelte';
3
3
  import {createOptions, createParsers} from './options.js';
4
4
  import {activeRange, currentRange, dayGrid, events, now, today, view as view2, viewDates, viewTitle, filteredEvents} from './stores.js';
5
- import {identity, intl, intlRange, isFunction, keys} from '#lib';
5
+ import {identity, intl, intlRange, isFunction, keys, toViewWithLocalDates} from '#lib';
6
6
 
7
7
  export default class {
8
8
  constructor(plugins, input) {
@@ -111,7 +111,9 @@ export default class {
111
111
  // switch view component
112
112
  this._viewComponent.set(component);
113
113
  if (isFunction(opts.viewDidMount)) {
114
- tick().then(() => opts.viewDidMount(get(this._view)));
114
+ tick().then(() => opts.viewDidMount({
115
+ view: toViewWithLocalDates(get(this._view))
116
+ }));
115
117
  }
116
118
  // update store values
117
119
  for (let key of keys(opts)) {