@event-calendar/build 3.3.0 → 3.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
@@ -61,6 +61,7 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
61
61
  - [eventStartEditable](#eventstarteditable)
62
62
  - [eventTextColor](#eventtextcolor)
63
63
  - [eventTimeFormat](#eventtimeformat)
64
+ - [filterEventsWithResources](#filtereventswithresources)
64
65
  - [filterResourcesWithEvents](#filterresourceswithevents)
65
66
  - [firstDay](#firstday)
66
67
  - [flexibleSlotTimeLimits](#flexibleslottimelimits)
@@ -204,8 +205,8 @@ import '@event-calendar/core/index.css';
204
205
  ### Pre-built browser ready bundle
205
206
  Include the following lines of code in the `<head>` section of your page:
206
207
  ```html
207
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.3.0/event-calendar.min.css">
208
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.3.0/event-calendar.min.js"></script>
208
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.5.0/event-calendar.min.css">
209
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.5.0/event-calendar.min.js"></script>
209
210
  ```
210
211
 
211
212
  <details>
@@ -668,7 +669,7 @@ Determines whether the events on the calendar can be dragged and resized (both a
668
669
  If you don't need both, use the more specific [eventStartEditable](#eventstarteditable) and [eventDurationEditable](#eventdurationeditable) instead.
669
670
 
670
671
  ### events
671
- - Type `Array`
672
+ - Type `array`
672
673
  - Default `[]`
673
674
 
674
675
  Array of plain objects that will be parsed into [Event](#event-object) objects and displayed on the calendar.
@@ -804,11 +805,11 @@ This is currently an alias for the `eventBackgroundColor`.
804
805
 
805
806
  Defines the content that is rendered inside an event’s element.
806
807
 
807
- This value can be either a [Content](#content) or a function that returns content:
808
+ This value can be either a [Content](#content) or a function that returns content or `undefined`:
808
809
 
809
810
  ```js
810
811
  function (info) {
811
- // return Content
812
+ // return Content or undefined
812
813
  }
813
814
  ```
814
815
  `info` is an object with the following properties:
@@ -842,6 +843,8 @@ The current [View](#view-object) object
842
843
  </tr>
843
844
  </table>
844
845
 
846
+ In case the function returns `undefined`, the event will be rendered in the default way.
847
+
845
848
  ### eventDidMount
846
849
  - Type `function`
847
850
  - Default `undefined`
@@ -1504,6 +1507,12 @@ Sets the default text color for events on the calendar.
1504
1507
 
1505
1508
  You can use any of the CSS color formats such `'#f00'`, `'#ff0000'`, `'rgb(255,0,0)'`, or `'red'`.
1506
1509
 
1510
+ ### filterEventsWithResources
1511
+ - Type `boolean`
1512
+ - Default `false`
1513
+
1514
+ Determines whether events that do not belong to the current array of [resources](#resources) should be hidden in `dayGrid`/`timeGrid`/`list` views.
1515
+
1507
1516
  ### filterResourcesWithEvents
1508
1517
  - Type `boolean`
1509
1518
  - Default `false`
@@ -1614,13 +1623,13 @@ Defines the height of the entire calendar.
1614
1623
  This should be a valid CSS value like `'100%'` or `'600px'`.
1615
1624
 
1616
1625
  ### hiddenDays
1617
- - Type `Array`
1626
+ - Type `array`
1618
1627
  - Default `[]`
1619
1628
 
1620
1629
  Exclude certain days-of-the-week from being displayed, where Sunday is `0`, Monday is `1`, etc. Saturday is `6`.
1621
1630
 
1622
1631
  ### highlightedDates
1623
- - Type `Array`
1632
+ - Type `array`
1624
1633
  - Default `[]`
1625
1634
 
1626
1635
  Array of dates that need to be highlighted in the calendar.
@@ -1811,7 +1820,7 @@ Enables a marker indicating the current time in `timeGrid`/`resourceTimeGrid` vi
1811
1820
  Enables mouse cursor pointer in `timeGrid`/`resourceTimeGrid` and other views.
1812
1821
 
1813
1822
  ### resources
1814
- - Type `Array`
1823
+ - Type `array`
1815
1824
  - Default `[]`
1816
1825
 
1817
1826
  Array of plain objects that will be parsed into [Resource](#resource-object) objects for displaying in the resource view.
@@ -2076,13 +2085,13 @@ This should be a value that can be parsed into a [Duration](#duration-object) ob
2076
2085
 
2077
2086
  ### slotWidth
2078
2087
  - Type `integer`
2079
- - Default `52`
2088
+ - Default `72`
2080
2089
 
2081
2090
  Defines the time slot width in pixels in `ResourceTimeline` views. When changing the setting, you must additionally override the following CSS styles:
2082
2091
 
2083
2092
  ```css
2084
2093
  .ec-timeline .ec-time, .ec-timeline .ec-line {
2085
- width: 52px; /* override this value */
2094
+ width: 72px; /* override this value */
2086
2095
  }
2087
2096
  ```
2088
2097
 
@@ -2531,48 +2540,48 @@ The [eventTextColor](#eventtextcolor) override for this specific event
2531
2540
  <tr>
2532
2541
  <td>
2533
2542
 
2534
- `extendedProps`
2543
+ `classNames`
2535
2544
  </td>
2536
2545
  <td>
2537
2546
 
2538
- A plain object holding miscellaneous properties specified during parsing in the explicitly given `extendedProps` field
2547
+ An array of additional CSS classes for this specific event
2539
2548
  </td>
2540
2549
  </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
2550
  <tr>
2549
2551
  <td>
2550
2552
 
2551
- `id`
2553
+ `styles`
2552
2554
  </td>
2553
2555
  <td>
2554
2556
 
2555
- `string` or `integer` A unique identifier of the event. Default `auto-generated value`
2557
+ An array of additional inline styling declarations for this specific event
2556
2558
  </td>
2557
2559
  </tr>
2558
2560
  <tr>
2559
2561
  <td>
2560
2562
 
2561
- `resourceId`
2563
+ `extendedProps`
2562
2564
  </td>
2563
2565
  <td>
2564
2566
 
2565
- `string` or `integer` An ID of a resource that the event is associated with. This field is not used if `resourceIds` is provided. Default `undefined`
2567
+ A plain object holding miscellaneous properties specified during parsing in the explicitly given `extendedProps` field
2566
2568
  </td>
2567
2569
  </tr>
2570
+ </table>
2571
+
2572
+ ### Parsing event from a plain object
2573
+ 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.
2574
+
2575
+ Here are all admissible fields for the event’s input object:
2576
+ <table>
2568
2577
  <tr>
2569
2578
  <td>
2570
2579
 
2571
- `resourceIds`
2580
+ `id`
2572
2581
  </td>
2573
2582
  <td>
2574
2583
 
2575
- `Array` An array of resource IDs that the event is associated with. This field is used instead of `resourceId`. Default `[]`
2584
+ `string` or `integer` A unique identifier of the event. Default `auto-generated value`
2576
2585
  </td>
2577
2586
  </tr>
2578
2587
  <tr>
@@ -2638,6 +2647,26 @@ Here are all admissible fields for the event’s input object:
2638
2647
  <tr>
2639
2648
  <td>
2640
2649
 
2650
+ `durationEditable`
2651
+ </td>
2652
+ <td>
2653
+
2654
+ `boolean` Overrides the master [eventDurationEditable](#eventdurationeditable) option for this single event. Default `undefined`
2655
+ </td>
2656
+ </tr>
2657
+ <tr>
2658
+ <td>
2659
+
2660
+ `resourceIds` or `resourceId`
2661
+ </td>
2662
+ <td>
2663
+
2664
+ `string`, `integer` or `array` An ID of a resource or an array of resource IDs that the event is associated with. Default `[]`
2665
+ </td>
2666
+ </tr>
2667
+ <tr>
2668
+ <td>
2669
+
2641
2670
  `display`
2642
2671
  </td>
2643
2672
  <td>
@@ -2678,6 +2707,26 @@ Here are all admissible fields for the event’s input object:
2678
2707
  <tr>
2679
2708
  <td>
2680
2709
 
2710
+ `classNames` or `className`
2711
+ </td>
2712
+ <td>
2713
+
2714
+ `string` or `array` Sets additional CSS classes for this single event. See [eventClassNames](#eventclassnames). Default `[]`
2715
+ </td>
2716
+ </tr>
2717
+ <tr>
2718
+ <td>
2719
+
2720
+ `styles` or `style`
2721
+ </td>
2722
+ <td>
2723
+
2724
+ `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 `[]`
2725
+ </td>
2726
+ </tr>
2727
+ <tr>
2728
+ <td>
2729
+
2681
2730
  `extendedProps`
2682
2731
  </td>
2683
2732
  <td>
@@ -2773,6 +2822,16 @@ The title of the resource. See [Content](#content)
2773
2822
  </td>
2774
2823
  <td>Default text color for this resource's events</td>
2775
2824
  </tr>
2825
+ <tr>
2826
+ <td>
2827
+
2828
+ `extendedProps`
2829
+ </td>
2830
+ <td>
2831
+
2832
+ A plain object holding miscellaneous properties specified during parsing in the explicitly given `extendedProps` field
2833
+ </td>
2834
+ </tr>
2776
2835
  </table>
2777
2836
 
2778
2837
  ### Parsing resource from a plain object
@@ -2820,6 +2879,16 @@ Here are all admissible fields for the resource’s input object:
2820
2879
  `string` Sets the default text color for this resource's events just like the calendar-wide [eventTextColor](#eventtextcolor) option. Default `undefined`
2821
2880
  </td>
2822
2881
  </tr>
2882
+ <tr>
2883
+ <td>
2884
+
2885
+ `extendedProps`
2886
+ </td>
2887
+ <td>
2888
+
2889
+ `object` A plain object with any miscellaneous properties. It will be directly transferred to the `extendedProps` property of the Resource object. Default `{}`
2890
+ </td>
2891
+ </tr>
2823
2892
  </table>
2824
2893
 
2825
2894
  ## View object