@event-calendar/core 3.3.0 → 3.4.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 +67 -25
- package/index.js +34 -19
- package/package.json +1 -1
- package/src/Calendar.svelte +7 -5
- package/src/lib/events.js +23 -13
- package/src/lib/resources.js +0 -1
- package/src/lib/utils.js +4 -0
package/README.md
CHANGED
|
@@ -204,8 +204,8 @@ import '@event-calendar/core/index.css';
|
|
|
204
204
|
### Pre-built browser ready bundle
|
|
205
205
|
Include the following lines of code in the `<head>` section of your page:
|
|
206
206
|
```html
|
|
207
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.
|
|
208
|
-
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.
|
|
207
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.4.0/event-calendar.min.css">
|
|
208
|
+
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.4.0/event-calendar.min.js"></script>
|
|
209
209
|
```
|
|
210
210
|
|
|
211
211
|
<details>
|
|
@@ -668,7 +668,7 @@ Determines whether the events on the calendar can be dragged and resized (both a
|
|
|
668
668
|
If you don't need both, use the more specific [eventStartEditable](#eventstarteditable) and [eventDurationEditable](#eventdurationeditable) instead.
|
|
669
669
|
|
|
670
670
|
### events
|
|
671
|
-
- Type `
|
|
671
|
+
- Type `array`
|
|
672
672
|
- Default `[]`
|
|
673
673
|
|
|
674
674
|
Array of plain objects that will be parsed into [Event](#event-object) objects and displayed on the calendar.
|
|
@@ -804,11 +804,11 @@ This is currently an alias for the `eventBackgroundColor`.
|
|
|
804
804
|
|
|
805
805
|
Defines the content that is rendered inside an event’s element.
|
|
806
806
|
|
|
807
|
-
This value can be either a [Content](#content) or a function that returns content
|
|
807
|
+
This value can be either a [Content](#content) or a function that returns content or `undefined`:
|
|
808
808
|
|
|
809
809
|
```js
|
|
810
810
|
function (info) {
|
|
811
|
-
// return Content
|
|
811
|
+
// return Content or undefined
|
|
812
812
|
}
|
|
813
813
|
```
|
|
814
814
|
`info` is an object with the following properties:
|
|
@@ -842,6 +842,8 @@ The current [View](#view-object) object
|
|
|
842
842
|
</tr>
|
|
843
843
|
</table>
|
|
844
844
|
|
|
845
|
+
In case the function returns `undefined`, the event will be rendered in the default way.
|
|
846
|
+
|
|
845
847
|
### eventDidMount
|
|
846
848
|
- Type `function`
|
|
847
849
|
- Default `undefined`
|
|
@@ -1614,13 +1616,13 @@ Defines the height of the entire calendar.
|
|
|
1614
1616
|
This should be a valid CSS value like `'100%'` or `'600px'`.
|
|
1615
1617
|
|
|
1616
1618
|
### hiddenDays
|
|
1617
|
-
- Type `
|
|
1619
|
+
- Type `array`
|
|
1618
1620
|
- Default `[]`
|
|
1619
1621
|
|
|
1620
1622
|
Exclude certain days-of-the-week from being displayed, where Sunday is `0`, Monday is `1`, etc. Saturday is `6`.
|
|
1621
1623
|
|
|
1622
1624
|
### highlightedDates
|
|
1623
|
-
- Type `
|
|
1625
|
+
- Type `array`
|
|
1624
1626
|
- Default `[]`
|
|
1625
1627
|
|
|
1626
1628
|
Array of dates that need to be highlighted in the calendar.
|
|
@@ -1811,7 +1813,7 @@ Enables a marker indicating the current time in `timeGrid`/`resourceTimeGrid` vi
|
|
|
1811
1813
|
Enables mouse cursor pointer in `timeGrid`/`resourceTimeGrid` and other views.
|
|
1812
1814
|
|
|
1813
1815
|
### resources
|
|
1814
|
-
- Type `
|
|
1816
|
+
- Type `array`
|
|
1815
1817
|
- Default `[]`
|
|
1816
1818
|
|
|
1817
1819
|
Array of plain objects that will be parsed into [Resource](#resource-object) objects for displaying in the resource view.
|
|
@@ -2076,13 +2078,13 @@ This should be a value that can be parsed into a [Duration](#duration-object) ob
|
|
|
2076
2078
|
|
|
2077
2079
|
### slotWidth
|
|
2078
2080
|
- Type `integer`
|
|
2079
|
-
- Default `
|
|
2081
|
+
- Default `72`
|
|
2080
2082
|
|
|
2081
2083
|
Defines the time slot width in pixels in `ResourceTimeline` views. When changing the setting, you must additionally override the following CSS styles:
|
|
2082
2084
|
|
|
2083
2085
|
```css
|
|
2084
2086
|
.ec-timeline .ec-time, .ec-timeline .ec-line {
|
|
2085
|
-
width:
|
|
2087
|
+
width: 72px; /* override this value */
|
|
2086
2088
|
}
|
|
2087
2089
|
```
|
|
2088
2090
|
|
|
@@ -2531,48 +2533,48 @@ The [eventTextColor](#eventtextcolor) override for this specific event
|
|
|
2531
2533
|
<tr>
|
|
2532
2534
|
<td>
|
|
2533
2535
|
|
|
2534
|
-
`
|
|
2536
|
+
`classNames`
|
|
2535
2537
|
</td>
|
|
2536
2538
|
<td>
|
|
2537
2539
|
|
|
2538
|
-
|
|
2540
|
+
An array of additional CSS classes for this specific event
|
|
2539
2541
|
</td>
|
|
2540
2542
|
</tr>
|
|
2541
|
-
</table>
|
|
2542
|
-
|
|
2543
|
-
### Parsing event from a plain object
|
|
2544
|
-
When Event Calendar receives an array of plain event’s objects either from the `events` option or as a result of an HTTP request to a URL of an event source, it parses the input objects into proper Event objects.
|
|
2545
|
-
|
|
2546
|
-
Here are all admissible fields for the event’s input object:
|
|
2547
|
-
<table>
|
|
2548
2543
|
<tr>
|
|
2549
2544
|
<td>
|
|
2550
2545
|
|
|
2551
|
-
`
|
|
2546
|
+
`styles`
|
|
2552
2547
|
</td>
|
|
2553
2548
|
<td>
|
|
2554
2549
|
|
|
2555
|
-
|
|
2550
|
+
An array of additional inline styling declarations for this specific event
|
|
2556
2551
|
</td>
|
|
2557
2552
|
</tr>
|
|
2558
2553
|
<tr>
|
|
2559
2554
|
<td>
|
|
2560
2555
|
|
|
2561
|
-
`
|
|
2556
|
+
`extendedProps`
|
|
2562
2557
|
</td>
|
|
2563
2558
|
<td>
|
|
2564
2559
|
|
|
2565
|
-
|
|
2560
|
+
A plain object holding miscellaneous properties specified during parsing in the explicitly given `extendedProps` field
|
|
2566
2561
|
</td>
|
|
2567
2562
|
</tr>
|
|
2563
|
+
</table>
|
|
2564
|
+
|
|
2565
|
+
### Parsing event from a plain object
|
|
2566
|
+
When Event Calendar receives an array of plain event’s objects either from the `events` option or as a result of an HTTP request to a URL of an event source, it parses the input objects into proper Event objects.
|
|
2567
|
+
|
|
2568
|
+
Here are all admissible fields for the event’s input object:
|
|
2569
|
+
<table>
|
|
2568
2570
|
<tr>
|
|
2569
2571
|
<td>
|
|
2570
2572
|
|
|
2571
|
-
`
|
|
2573
|
+
`id`
|
|
2572
2574
|
</td>
|
|
2573
2575
|
<td>
|
|
2574
2576
|
|
|
2575
|
-
`
|
|
2577
|
+
`string` or `integer` A unique identifier of the event. Default `auto-generated value`
|
|
2576
2578
|
</td>
|
|
2577
2579
|
</tr>
|
|
2578
2580
|
<tr>
|
|
@@ -2638,6 +2640,26 @@ Here are all admissible fields for the event’s input object:
|
|
|
2638
2640
|
<tr>
|
|
2639
2641
|
<td>
|
|
2640
2642
|
|
|
2643
|
+
`durationEditable`
|
|
2644
|
+
</td>
|
|
2645
|
+
<td>
|
|
2646
|
+
|
|
2647
|
+
`boolean` Overrides the master [eventDurationEditable](#eventdurationeditable) option for this single event. Default `undefined`
|
|
2648
|
+
</td>
|
|
2649
|
+
</tr>
|
|
2650
|
+
<tr>
|
|
2651
|
+
<td>
|
|
2652
|
+
|
|
2653
|
+
`resourceIds` or `resourceId`
|
|
2654
|
+
</td>
|
|
2655
|
+
<td>
|
|
2656
|
+
|
|
2657
|
+
`string`, `integer` or `array` An ID of a resource or an array of resource IDs that the event is associated with. Default `[]`
|
|
2658
|
+
</td>
|
|
2659
|
+
</tr>
|
|
2660
|
+
<tr>
|
|
2661
|
+
<td>
|
|
2662
|
+
|
|
2641
2663
|
`display`
|
|
2642
2664
|
</td>
|
|
2643
2665
|
<td>
|
|
@@ -2678,6 +2700,26 @@ Here are all admissible fields for the event’s input object:
|
|
|
2678
2700
|
<tr>
|
|
2679
2701
|
<td>
|
|
2680
2702
|
|
|
2703
|
+
`classNames` or `className`
|
|
2704
|
+
</td>
|
|
2705
|
+
<td>
|
|
2706
|
+
|
|
2707
|
+
`string` or `array` Sets additional CSS classes for this single event. See [eventClassNames](#eventclassnames). Default `[]`
|
|
2708
|
+
</td>
|
|
2709
|
+
</tr>
|
|
2710
|
+
<tr>
|
|
2711
|
+
<td>
|
|
2712
|
+
|
|
2713
|
+
`styles` or `style`
|
|
2714
|
+
</td>
|
|
2715
|
+
<td>
|
|
2716
|
+
|
|
2717
|
+
`string` or `array` Sets additional inline styling declarations for this single event. This value can be either a string containing styles `'font-size: 24px; border-radius: 4px; ...'` or an array of strings `['font-size: 24px', 'border-radius: 4px', ...]`. Default `[]`
|
|
2718
|
+
</td>
|
|
2719
|
+
</tr>
|
|
2720
|
+
<tr>
|
|
2721
|
+
<td>
|
|
2722
|
+
|
|
2681
2723
|
`extendedProps`
|
|
2682
2724
|
</td>
|
|
2683
2725
|
<td>
|
package/index.js
CHANGED
|
@@ -274,6 +274,10 @@ function symbol() {
|
|
|
274
274
|
return Symbol('ec');
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
function isArray(value) {
|
|
278
|
+
return Array.isArray(value);
|
|
279
|
+
}
|
|
280
|
+
|
|
277
281
|
function createElement(tag, className, content, attrs = []) {
|
|
278
282
|
let el = document.createElement(tag);
|
|
279
283
|
el.className = className;
|
|
@@ -373,21 +377,20 @@ function createEvents(input) {
|
|
|
373
377
|
return input.map(event => {
|
|
374
378
|
let result = {
|
|
375
379
|
id: 'id' in event ? String(event.id) : `{generated-${eventId++}}`,
|
|
376
|
-
resourceIds:
|
|
377
|
-
? event.resourceIds.map(String)
|
|
378
|
-
: ('resourceId' in event ? [String(event.resourceId)] : []),
|
|
380
|
+
resourceIds: toArrayProp(event, 'resourceId').map(String),
|
|
379
381
|
allDay: event.allDay ?? (noTimePart(event.start) && noTimePart(event.end)),
|
|
380
382
|
start: createDate(event.start),
|
|
381
383
|
end: createDate(event.end),
|
|
382
|
-
title: event.title
|
|
383
|
-
titleHTML: event.titleHTML || '',
|
|
384
|
+
title: event.title ?? '',
|
|
384
385
|
editable: event.editable,
|
|
385
386
|
startEditable: event.startEditable,
|
|
386
387
|
durationEditable: event.durationEditable,
|
|
387
|
-
display: event.display
|
|
388
|
-
extendedProps: event.extendedProps
|
|
389
|
-
backgroundColor: event.backgroundColor
|
|
390
|
-
textColor: event.textColor
|
|
388
|
+
display: event.display ?? 'auto',
|
|
389
|
+
extendedProps: event.extendedProps ?? {},
|
|
390
|
+
backgroundColor: event.backgroundColor ?? event.color,
|
|
391
|
+
textColor: event.textColor,
|
|
392
|
+
classNames: toArrayProp(event, 'className'),
|
|
393
|
+
styles: toArrayProp(event, 'style')
|
|
391
394
|
};
|
|
392
395
|
|
|
393
396
|
if (result.allDay) {
|
|
@@ -407,6 +410,11 @@ function createEvents(input) {
|
|
|
407
410
|
});
|
|
408
411
|
}
|
|
409
412
|
|
|
413
|
+
function toArrayProp(input, propName) {
|
|
414
|
+
let result = input[propName + 's'] ?? input[propName] ?? [];
|
|
415
|
+
return isArray(result) ? result : [result];
|
|
416
|
+
}
|
|
417
|
+
|
|
410
418
|
function createEventSources(input) {
|
|
411
419
|
return input.map(source => ({
|
|
412
420
|
events: source.events,
|
|
@@ -446,7 +454,9 @@ function createEventContent(chunk, displayEventEnd, eventContent, theme, _intlEv
|
|
|
446
454
|
view: toViewWithLocalDates(_view)
|
|
447
455
|
})
|
|
448
456
|
: eventContent;
|
|
449
|
-
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
if (content === undefined) {
|
|
450
460
|
let domNodes;
|
|
451
461
|
switch (chunk.event.display) {
|
|
452
462
|
case 'background':
|
|
@@ -477,6 +487,7 @@ function createTimeElement(timeText, chunk, theme) {
|
|
|
477
487
|
}
|
|
478
488
|
|
|
479
489
|
function createEventClasses(eventClassNames, event, _view) {
|
|
490
|
+
let result = event.classNames;
|
|
480
491
|
if (eventClassNames) {
|
|
481
492
|
if (is_function(eventClassNames)) {
|
|
482
493
|
eventClassNames = eventClassNames({
|
|
@@ -484,9 +495,12 @@ function createEventClasses(eventClassNames, event, _view) {
|
|
|
484
495
|
view: toViewWithLocalDates(_view)
|
|
485
496
|
});
|
|
486
497
|
}
|
|
487
|
-
|
|
498
|
+
result = [
|
|
499
|
+
...isArray(eventClassNames) ? eventClassNames : [eventClassNames],
|
|
500
|
+
...result
|
|
501
|
+
];
|
|
488
502
|
}
|
|
489
|
-
return
|
|
503
|
+
return result;
|
|
490
504
|
}
|
|
491
505
|
|
|
492
506
|
function toEventWithLocalDates(event) {
|
|
@@ -664,7 +678,6 @@ function createResources(input) {
|
|
|
664
678
|
return input.map(resource => ({
|
|
665
679
|
id: String(resource.id),
|
|
666
680
|
title: resource.title || '',
|
|
667
|
-
titleHTML: resource.titleHTML || '',
|
|
668
681
|
eventBackgroundColor: resource.eventBackgroundColor,
|
|
669
682
|
eventTextColor: resource.eventTextColor
|
|
670
683
|
}));
|
|
@@ -2640,21 +2653,23 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
2640
2653
|
}
|
|
2641
2654
|
|
|
2642
2655
|
function addEvent(event) {
|
|
2643
|
-
|
|
2656
|
+
event = createEvents([event])[0];
|
|
2657
|
+
$_events.push(event);
|
|
2644
2658
|
_events.set($_events);
|
|
2645
|
-
return
|
|
2659
|
+
return event;
|
|
2646
2660
|
}
|
|
2647
2661
|
|
|
2648
2662
|
function updateEvent(event) {
|
|
2649
2663
|
for (let e of $_events) {
|
|
2650
2664
|
if (e.id == event.id) {
|
|
2651
|
-
|
|
2665
|
+
event = createEvents([event])[0];
|
|
2666
|
+
assign(e, event);
|
|
2652
2667
|
_events.set($_events);
|
|
2653
|
-
|
|
2668
|
+
return event;
|
|
2654
2669
|
}
|
|
2655
2670
|
}
|
|
2656
2671
|
|
|
2657
|
-
return
|
|
2672
|
+
return null;
|
|
2658
2673
|
}
|
|
2659
2674
|
|
|
2660
2675
|
function removeEventById(id) {
|
|
@@ -2862,4 +2877,4 @@ class Calendar extends SvelteComponent {
|
|
|
2862
2877
|
}
|
|
2863
2878
|
}
|
|
2864
2879
|
|
|
2865
|
-
export { DAY_IN_SECONDS, addDay, addDuration, ancestor, assign, bgEvent, btnTextDay, btnTextMonth, btnTextWeek, btnTextYear, ceil, cloneDate, cloneEvent, copyTime, createDate, createDuration, createElement, createEventChunk, createEventClasses, createEventContent, createEventSources, createEvents, createResources, createSlotTimeLimits, createTimes, createView, datesEqual, debounce, Calendar as default, eventIntersects, floor, flushDebounce, getElementWithPayload, getPayload, ghostEvent, hasPayload, hasYScroll, height, helperEvent, intl, intlRange, keyEnter, keys, listView, max, min, nextClosestDay, nextDate, noTimePart, outsideEvent, pointerEvent, prepareEventChunks, prevClosestDay, prevDate, previewEvent, rect, repositionEvent, resourceBackgroundColor, resourceTextColor, runReposition, setContent, setMidnight, setPayload, sortEventChunks, subtractDay, subtractDuration, symbol, task, themeView, timelineView, toEventWithLocalDates, toISOString, toLocalDate, toSeconds, toViewWithLocalDates, viewResources };
|
|
2880
|
+
export { DAY_IN_SECONDS, addDay, addDuration, ancestor, assign, bgEvent, btnTextDay, btnTextMonth, btnTextWeek, btnTextYear, ceil, cloneDate, cloneEvent, copyTime, createDate, createDuration, createElement, createEventChunk, createEventClasses, createEventContent, createEventSources, createEvents, createResources, createSlotTimeLimits, createTimes, createView, datesEqual, debounce, Calendar as default, eventIntersects, floor, flushDebounce, getElementWithPayload, getPayload, ghostEvent, hasPayload, hasYScroll, height, helperEvent, intl, intlRange, isArray, keyEnter, keys, listView, max, min, nextClosestDay, nextDate, noTimePart, outsideEvent, pointerEvent, prepareEventChunks, prevClosestDay, prevDate, previewEvent, rect, repositionEvent, resourceBackgroundColor, resourceTextColor, runReposition, setContent, setMidnight, setPayload, sortEventChunks, subtractDay, subtractDuration, symbol, task, themeView, timelineView, toEventWithLocalDates, toISOString, toLocalDate, toSeconds, toViewWithLocalDates, viewResources };
|
package/package.json
CHANGED
package/src/Calendar.svelte
CHANGED
|
@@ -67,20 +67,22 @@
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export function addEvent(event) {
|
|
70
|
-
|
|
70
|
+
event = createEvents([event])[0];
|
|
71
|
+
$_events.push(event);
|
|
71
72
|
$_events = $_events;
|
|
72
|
-
return
|
|
73
|
+
return event;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
export function updateEvent(event) {
|
|
76
77
|
for (let e of $_events) {
|
|
77
78
|
if (e.id == event.id) {
|
|
78
|
-
|
|
79
|
+
event = createEvents([event])[0];
|
|
80
|
+
assign(e, event);
|
|
79
81
|
$_events = $_events;
|
|
80
|
-
|
|
82
|
+
return event;
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
|
-
return
|
|
85
|
+
return null;
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
export function removeEventById(id) {
|
package/src/lib/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {addDay, datesEqual, createDate, cloneDate, setMidnight, toLocalDate, toISOString, noTimePart, copyTime} from './date';
|
|
2
2
|
import {createElement} from './dom';
|
|
3
|
-
import {assign} from './utils';
|
|
3
|
+
import {assign, isArray} from './utils';
|
|
4
4
|
import {toViewWithLocalDates} from './view';
|
|
5
5
|
import {is_function} from 'svelte/internal';
|
|
6
6
|
|
|
@@ -9,21 +9,20 @@ export function createEvents(input) {
|
|
|
9
9
|
return input.map(event => {
|
|
10
10
|
let result = {
|
|
11
11
|
id: 'id' in event ? String(event.id) : `{generated-${eventId++}}`,
|
|
12
|
-
resourceIds:
|
|
13
|
-
? event.resourceIds.map(String)
|
|
14
|
-
: ('resourceId' in event ? [String(event.resourceId)] : []),
|
|
12
|
+
resourceIds: toArrayProp(event, 'resourceId').map(String),
|
|
15
13
|
allDay: event.allDay ?? (noTimePart(event.start) && noTimePart(event.end)),
|
|
16
14
|
start: createDate(event.start),
|
|
17
15
|
end: createDate(event.end),
|
|
18
|
-
title: event.title
|
|
19
|
-
titleHTML: event.titleHTML || '',
|
|
16
|
+
title: event.title ?? '',
|
|
20
17
|
editable: event.editable,
|
|
21
18
|
startEditable: event.startEditable,
|
|
22
19
|
durationEditable: event.durationEditable,
|
|
23
|
-
display: event.display
|
|
24
|
-
extendedProps: event.extendedProps
|
|
25
|
-
backgroundColor: event.backgroundColor
|
|
26
|
-
textColor: event.textColor
|
|
20
|
+
display: event.display ?? 'auto',
|
|
21
|
+
extendedProps: event.extendedProps ?? {},
|
|
22
|
+
backgroundColor: event.backgroundColor ?? event.color,
|
|
23
|
+
textColor: event.textColor,
|
|
24
|
+
classNames: toArrayProp(event, 'className'),
|
|
25
|
+
styles: toArrayProp(event, 'style')
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
if (result.allDay) {
|
|
@@ -43,6 +42,11 @@ export function createEvents(input) {
|
|
|
43
42
|
});
|
|
44
43
|
}
|
|
45
44
|
|
|
45
|
+
function toArrayProp(input, propName) {
|
|
46
|
+
let result = input[propName + 's'] ?? input[propName] ?? [];
|
|
47
|
+
return isArray(result) ? result : [result];
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
export function createEventSources(input) {
|
|
47
51
|
return input.map(source => ({
|
|
48
52
|
events: source.events,
|
|
@@ -82,7 +86,9 @@ export function createEventContent(chunk, displayEventEnd, eventContent, theme,
|
|
|
82
86
|
view: toViewWithLocalDates(_view)
|
|
83
87
|
})
|
|
84
88
|
: eventContent;
|
|
85
|
-
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (content === undefined) {
|
|
86
92
|
let domNodes;
|
|
87
93
|
switch (chunk.event.display) {
|
|
88
94
|
case 'background':
|
|
@@ -113,6 +119,7 @@ function createTimeElement(timeText, chunk, theme) {
|
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
export function createEventClasses(eventClassNames, event, _view) {
|
|
122
|
+
let result = event.classNames;
|
|
116
123
|
if (eventClassNames) {
|
|
117
124
|
if (is_function(eventClassNames)) {
|
|
118
125
|
eventClassNames = eventClassNames({
|
|
@@ -120,9 +127,12 @@ export function createEventClasses(eventClassNames, event, _view) {
|
|
|
120
127
|
view: toViewWithLocalDates(_view)
|
|
121
128
|
});
|
|
122
129
|
}
|
|
123
|
-
|
|
130
|
+
result = [
|
|
131
|
+
...isArray(eventClassNames) ? eventClassNames : [eventClassNames],
|
|
132
|
+
...result
|
|
133
|
+
];
|
|
124
134
|
}
|
|
125
|
-
return
|
|
135
|
+
return result;
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
export function toEventWithLocalDates(event) {
|
package/src/lib/resources.js
CHANGED
|
@@ -2,7 +2,6 @@ export function createResources(input) {
|
|
|
2
2
|
return input.map(resource => ({
|
|
3
3
|
id: String(resource.id),
|
|
4
4
|
title: resource.title || '',
|
|
5
|
-
titleHTML: resource.titleHTML || '',
|
|
6
5
|
eventBackgroundColor: resource.eventBackgroundColor,
|
|
7
6
|
eventTextColor: resource.eventTextColor
|
|
8
7
|
}));
|