@event-calendar/build 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/event-calendar.min.js +2 -2
- package/event-calendar.min.js.map +1 -1
- package/package.json +7 -7
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>
|