@event-calendar/build 0.13.4 → 0.14.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/README.md +151 -31
- package/event-calendar-modern.min.js +2 -2
- package/event-calendar-modern.min.js.map +1 -1
- package/event-calendar.min.js +3 -3
- package/event-calendar.min.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -43,9 +43,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
|
|
|
43
43
|
- [eventDragStart](#eventdragstart)
|
|
44
44
|
- [eventDragStop](#eventdragstop)
|
|
45
45
|
- [eventDrop](#eventdrop)
|
|
46
|
+
- [eventDurationEditable](#eventdurationeditable)
|
|
46
47
|
</td><td>
|
|
47
48
|
|
|
48
|
-
- [eventDurationEditable](#eventdurationeditable)
|
|
49
49
|
- [eventLongPressDelay](#eventlongpressdelay)
|
|
50
50
|
- [eventMouseEnter](#eventmouseenter)
|
|
51
51
|
- [eventMouseLeave](#eventmouseleave)
|
|
@@ -69,14 +69,16 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
|
|
|
69
69
|
- [locale](#locale)
|
|
70
70
|
- [longPressDelay](#longpressdelay)
|
|
71
71
|
- [monthMode](#monthmode)
|
|
72
|
-
</td><td>
|
|
73
|
-
|
|
74
72
|
- [moreLinkContent](#morelinkcontent)
|
|
75
73
|
- [noEventsClick](#noeventsclick)
|
|
74
|
+
</td><td>
|
|
75
|
+
|
|
76
76
|
- [noEventsContent](#noeventscontent)
|
|
77
77
|
- [nowIndicator](#nowindicator)
|
|
78
78
|
- [pointer](#pointer)
|
|
79
79
|
- [resources](#resources)
|
|
80
|
+
- [resourceLabelContent](#resourcelabelcontent)
|
|
81
|
+
- [resourceLabelDidMount](#resourcelabeldidmount)
|
|
80
82
|
- [select](#select)
|
|
81
83
|
- [selectable](#selectable)
|
|
82
84
|
- [selectBackgroundColor](#selectbackgroundcolor)
|
|
@@ -182,6 +184,10 @@ let ec = new Calendar({
|
|
|
182
184
|
}
|
|
183
185
|
});
|
|
184
186
|
```
|
|
187
|
+
The CSS is located at `@event-calendar/core/index.css`. If your build tool supports CSS processing, you can import it like this:
|
|
188
|
+
```js
|
|
189
|
+
import '@event-calendar/core/index.css';
|
|
190
|
+
```
|
|
185
191
|
|
|
186
192
|
### Pre-built browser ready bundle
|
|
187
193
|
Include the following lines of code in the `<head>` section of your page:
|
|
@@ -234,7 +240,7 @@ In Svelte, you can simply update the original `options` object.
|
|
|
234
240
|
|
|
235
241
|
Defines the content that is displayed as a title of the `all-day` slot.
|
|
236
242
|
|
|
237
|
-
This value can be either a string containing
|
|
243
|
+
This value can be either a string containing text `'...'`, an object containing the HTML string `{html: '<p>...</p>'}`, an object containing an array of DOM nodes `{domNodes: [node1, node2, ...]}` or a function that returns any of the above formats:
|
|
238
244
|
|
|
239
245
|
```js
|
|
240
246
|
function (arg) {
|
|
@@ -284,9 +290,9 @@ This value can be either a JavaScript Date object, or an ISO8601 date string lik
|
|
|
284
290
|
Callback function that is triggered when the user clicks on a date or a time.
|
|
285
291
|
|
|
286
292
|
```js
|
|
287
|
-
function (
|
|
293
|
+
function (info) {}
|
|
288
294
|
```
|
|
289
|
-
`
|
|
295
|
+
`info` is an object with the following properties:
|
|
290
296
|
<table>
|
|
291
297
|
<tr>
|
|
292
298
|
<td>
|
|
@@ -305,6 +311,15 @@ function (dateClickInfo) {}
|
|
|
305
311
|
<tr>
|
|
306
312
|
<td>
|
|
307
313
|
|
|
314
|
+
`allDay`
|
|
315
|
+
</td>
|
|
316
|
+
<td>
|
|
317
|
+
|
|
318
|
+
`true` or `false`. Determines if the click has occurred in the `all-day` slot. Clicks in month and list views are treated as all-day too</td>
|
|
319
|
+
</tr>
|
|
320
|
+
<tr>
|
|
321
|
+
<td>
|
|
322
|
+
|
|
308
323
|
`dayEl`
|
|
309
324
|
</td>
|
|
310
325
|
<td>HTML element that represents the whole-day that was clicked on</td>
|
|
@@ -502,9 +517,9 @@ You can use any of the CSS color formats such `'#f00'`, `'#ff0000'`, `'rgb(255,0
|
|
|
502
517
|
Callback function that is triggered when the user clicks an event.
|
|
503
518
|
|
|
504
519
|
```js
|
|
505
|
-
function (
|
|
520
|
+
function (info) { }
|
|
506
521
|
```
|
|
507
|
-
`
|
|
522
|
+
`info` is an object with the following properties:
|
|
508
523
|
<table>
|
|
509
524
|
<tr>
|
|
510
525
|
<td>
|
|
@@ -554,14 +569,14 @@ This is currently an alias for the `eventBackgroundColor`.
|
|
|
554
569
|
|
|
555
570
|
Defines the content that is rendered inside an event’s element.
|
|
556
571
|
|
|
557
|
-
This value can be either a string containing
|
|
572
|
+
This value can be either a string containing text `'...'`, an object containing the HTML string `{html: '<p>...</p>'}`, an object containing an array of DOM nodes `{domNodes: [node1, node2, ...]}` or a function that returns any of the above formats:
|
|
558
573
|
|
|
559
574
|
```js
|
|
560
|
-
function (
|
|
575
|
+
function (info) {
|
|
561
576
|
// return string or object
|
|
562
577
|
}
|
|
563
578
|
```
|
|
564
|
-
`
|
|
579
|
+
`info` is an object with the following properties:
|
|
565
580
|
<table>
|
|
566
581
|
<tr>
|
|
567
582
|
<td>
|
|
@@ -599,9 +614,9 @@ The current [View](#view-object) object
|
|
|
599
614
|
Callback function that is triggered right after the element has been added to the DOM. If the event data changes, this is not called again.
|
|
600
615
|
|
|
601
616
|
```js
|
|
602
|
-
function (
|
|
617
|
+
function (info) { }
|
|
603
618
|
```
|
|
604
|
-
`
|
|
619
|
+
`info` is an object with the following properties:
|
|
605
620
|
<table>
|
|
606
621
|
<tr>
|
|
607
622
|
<td>
|
|
@@ -840,9 +855,9 @@ If not specified, it falls back to [longPressDelay](#longpressdelay).
|
|
|
840
855
|
Callback function that is triggered when the user hovers over an event with the cursor (mouse pointer).
|
|
841
856
|
|
|
842
857
|
```js
|
|
843
|
-
function (
|
|
858
|
+
function (info) { }
|
|
844
859
|
```
|
|
845
|
-
`
|
|
860
|
+
`info` is an object with the following properties:
|
|
846
861
|
<table>
|
|
847
862
|
<tr>
|
|
848
863
|
<td>
|
|
@@ -887,9 +902,9 @@ The current [View](#view-object) object
|
|
|
887
902
|
Callback function that is triggered when the cursor (mouse pointer) is moved out of an event.
|
|
888
903
|
|
|
889
904
|
```js
|
|
890
|
-
function (
|
|
905
|
+
function (info) { }
|
|
891
906
|
```
|
|
892
|
-
`
|
|
907
|
+
`info` is an object with the following properties:
|
|
893
908
|
<table>
|
|
894
909
|
<tr>
|
|
895
910
|
<td>
|
|
@@ -1400,7 +1415,7 @@ Tells the calendar that visible dates should start from the [firstDay](#firstday
|
|
|
1400
1415
|
|
|
1401
1416
|
Defines the text that is displayed instead of the default `+2 more` created by the [dayMaxEvents](#daymaxevents) option.
|
|
1402
1417
|
|
|
1403
|
-
This value can be either a string containing
|
|
1418
|
+
This value can be either a string containing text `'...'`, an object containing the HTML string `{html: '<p>...</p>'}`, an object containing an array of DOM nodes `{domNodes: [node1, node2, ...]}` or a function that returns any of the above formats:
|
|
1404
1419
|
|
|
1405
1420
|
```js
|
|
1406
1421
|
function (arg) {
|
|
@@ -1435,9 +1450,9 @@ The default text like `+2 more`
|
|
|
1435
1450
|
Callback function that is triggered when the user clicks _No events_ area in list view.
|
|
1436
1451
|
|
|
1437
1452
|
```js
|
|
1438
|
-
function (
|
|
1453
|
+
function (info) { }
|
|
1439
1454
|
```
|
|
1440
|
-
`
|
|
1455
|
+
`info` is an object with the following properties:
|
|
1441
1456
|
<table>
|
|
1442
1457
|
<tr>
|
|
1443
1458
|
<td>
|
|
@@ -1464,7 +1479,7 @@ The current [View](#view-object) object
|
|
|
1464
1479
|
|
|
1465
1480
|
Defines the text that is displayed in list view when there are no events to display.
|
|
1466
1481
|
|
|
1467
|
-
This value can be either a string containing
|
|
1482
|
+
This value can be either a string containing text `'...'`, an object containing the HTML string `{html: '<p>...</p>'}`, an object containing an array of DOM nodes `{domNodes: [node1, node2, ...]}` or a function that returns any of the above formats:
|
|
1468
1483
|
|
|
1469
1484
|
```js
|
|
1470
1485
|
function () {
|
|
@@ -1490,6 +1505,77 @@ Enables mouse cursor pointer in `timeGrid`/`resourceTimeGrid` views.
|
|
|
1490
1505
|
|
|
1491
1506
|
Array of plain objects that will be parsed into [Resource](#resource-object) objects for displaying in the resource view.
|
|
1492
1507
|
|
|
1508
|
+
### resourceLabelContent
|
|
1509
|
+
- Type `string`, `object`or `function`
|
|
1510
|
+
- Default `undefined`
|
|
1511
|
+
|
|
1512
|
+
Defines the content that is rendered inside an element with a resource title.
|
|
1513
|
+
|
|
1514
|
+
This value can be either a string containing text `'...'`, an object containing the HTML string `{html: '<p>...</p>'}`, an object containing an array of DOM nodes `{domNodes: [node1, node2, ...]}` or a function that returns any of the above formats:
|
|
1515
|
+
|
|
1516
|
+
```js
|
|
1517
|
+
function (info) {
|
|
1518
|
+
// return string or object
|
|
1519
|
+
}
|
|
1520
|
+
```
|
|
1521
|
+
`info` is an object with the following properties:
|
|
1522
|
+
<table>
|
|
1523
|
+
<tr>
|
|
1524
|
+
<td>
|
|
1525
|
+
|
|
1526
|
+
`resource`
|
|
1527
|
+
</td>
|
|
1528
|
+
<td>
|
|
1529
|
+
|
|
1530
|
+
The associated [Resource](#resource-object) object
|
|
1531
|
+
</td>
|
|
1532
|
+
</tr>
|
|
1533
|
+
<tr>
|
|
1534
|
+
<td>
|
|
1535
|
+
|
|
1536
|
+
`date`
|
|
1537
|
+
</td>
|
|
1538
|
+
<td>If it is a column that is within a specific date, this will be a Date object</td>
|
|
1539
|
+
</tr>
|
|
1540
|
+
</table>
|
|
1541
|
+
|
|
1542
|
+
### resourceLabelDidMount
|
|
1543
|
+
- Type `function`
|
|
1544
|
+
- Default `undefined`
|
|
1545
|
+
|
|
1546
|
+
Callback function that is triggered right after the element has been added to the DOM. If the resource data changes, this is not called again.
|
|
1547
|
+
|
|
1548
|
+
```js
|
|
1549
|
+
function (info) { }
|
|
1550
|
+
```
|
|
1551
|
+
`info` is an object with the following properties:
|
|
1552
|
+
<table>
|
|
1553
|
+
<tr>
|
|
1554
|
+
<td>
|
|
1555
|
+
|
|
1556
|
+
`el`
|
|
1557
|
+
</td>
|
|
1558
|
+
<td>The HTML element for the label</td>
|
|
1559
|
+
</tr>
|
|
1560
|
+
<tr>
|
|
1561
|
+
<td>
|
|
1562
|
+
|
|
1563
|
+
`resource`
|
|
1564
|
+
</td>
|
|
1565
|
+
<td>
|
|
1566
|
+
|
|
1567
|
+
The associated [Resource](#resource-object) object
|
|
1568
|
+
</td>
|
|
1569
|
+
</tr>
|
|
1570
|
+
<tr>
|
|
1571
|
+
<td>
|
|
1572
|
+
|
|
1573
|
+
`date`
|
|
1574
|
+
</td>
|
|
1575
|
+
<td>If it is a column that is within a specific date, this will be a Date object</td>
|
|
1576
|
+
</tr>
|
|
1577
|
+
</table>
|
|
1578
|
+
|
|
1493
1579
|
### select
|
|
1494
1580
|
- Type `function`
|
|
1495
1581
|
- Default `undefined`
|
|
@@ -1497,9 +1583,9 @@ Array of plain objects that will be parsed into [Resource](#resource-object) obj
|
|
|
1497
1583
|
Callback function that is triggered when a date/time selection is made.
|
|
1498
1584
|
|
|
1499
1585
|
```js
|
|
1500
|
-
function (
|
|
1586
|
+
function (info) { }
|
|
1501
1587
|
```
|
|
1502
|
-
`
|
|
1588
|
+
`info` is an object with the following properties:
|
|
1503
1589
|
<table>
|
|
1504
1590
|
<tr>
|
|
1505
1591
|
<td>
|
|
@@ -1536,7 +1622,7 @@ function (selectInfo) { }
|
|
|
1536
1622
|
</td>
|
|
1537
1623
|
<td>
|
|
1538
1624
|
|
|
1539
|
-
|
|
1625
|
+
`true` or `false`. Determines if the selection has occurred in the `all-day` slot</td>
|
|
1540
1626
|
</tr>
|
|
1541
1627
|
<tr>
|
|
1542
1628
|
<td>
|
|
@@ -1591,7 +1677,7 @@ If not specified, it falls back to [longPressDelay](#longpressdelay).
|
|
|
1591
1677
|
|
|
1592
1678
|
### selectMinDistance
|
|
1593
1679
|
- Type `integer`
|
|
1594
|
-
- Default `
|
|
1680
|
+
- Default `5`
|
|
1595
1681
|
|
|
1596
1682
|
Defines how many pixels the user’s mouse must move before the selection begins.
|
|
1597
1683
|
|
|
@@ -1779,9 +1865,9 @@ The view that is displayed in the calendar. Can be `'dayGridMonth'`, `'listDay'`
|
|
|
1779
1865
|
Callback function that is triggered right after the view has been added to the DOM.
|
|
1780
1866
|
|
|
1781
1867
|
```js
|
|
1782
|
-
function (
|
|
1868
|
+
function (info) { }
|
|
1783
1869
|
```
|
|
1784
|
-
`
|
|
1870
|
+
`info` is an object with the following properties:
|
|
1785
1871
|
<table>
|
|
1786
1872
|
<tr>
|
|
1787
1873
|
<td>
|
|
@@ -1927,7 +2013,7 @@ Here are all properties that exist in Event object:
|
|
|
1927
2013
|
</td>
|
|
1928
2014
|
<td>
|
|
1929
2015
|
|
|
1930
|
-
|
|
2016
|
+
`true` or `false`. Determines if the event is shown in the `all-day` slot</td>
|
|
1931
2017
|
</tr>
|
|
1932
2018
|
<tr>
|
|
1933
2019
|
<td>
|
|
@@ -1953,11 +2039,18 @@ Boolean (`true` or `false`). Determines if the event is shown in the `all-day` s
|
|
|
1953
2039
|
<tr>
|
|
1954
2040
|
<td>
|
|
1955
2041
|
|
|
2042
|
+
`titleHTML`
|
|
2043
|
+
</td>
|
|
2044
|
+
<td>The HTML version of the title</td>
|
|
2045
|
+
</tr>
|
|
2046
|
+
<tr>
|
|
2047
|
+
<td>
|
|
2048
|
+
|
|
1956
2049
|
`editable`
|
|
1957
2050
|
</td>
|
|
1958
2051
|
<td>
|
|
1959
2052
|
|
|
1960
|
-
|
|
2053
|
+
`true`, `false` or `undefined`. The value overriding the [editable](#editable) setting for this specific event
|
|
1961
2054
|
</td>
|
|
1962
2055
|
</tr>
|
|
1963
2056
|
<tr>
|
|
@@ -1967,7 +2060,7 @@ Boolean (`true` or `false`) or `undefined`. The value overriding the [editable](
|
|
|
1967
2060
|
</td>
|
|
1968
2061
|
<td>
|
|
1969
2062
|
|
|
1970
|
-
|
|
2063
|
+
`true`, `false` or `undefined`. The value overriding the [eventStartEditable](#eventstarteditable) setting for this specific event
|
|
1971
2064
|
</td>
|
|
1972
2065
|
</tr>
|
|
1973
2066
|
<tr>
|
|
@@ -1977,7 +2070,7 @@ Boolean (`true` or `false`) or `undefined`. The value overriding the [eventStart
|
|
|
1977
2070
|
</td>
|
|
1978
2071
|
<td>
|
|
1979
2072
|
|
|
1980
|
-
|
|
2073
|
+
`true`, `false` or `undefined`. The value overriding the [eventDurationEditable](#eventdurationeditable) setting for this specific event
|
|
1981
2074
|
</td>
|
|
1982
2075
|
</tr>
|
|
1983
2076
|
<tr>
|
|
@@ -2092,6 +2185,16 @@ Here are all admissible fields for the event’s input object:
|
|
|
2092
2185
|
<tr>
|
|
2093
2186
|
<td>
|
|
2094
2187
|
|
|
2188
|
+
`titleHTML`
|
|
2189
|
+
</td>
|
|
2190
|
+
<td>
|
|
2191
|
+
|
|
2192
|
+
`string` The HTML version of the title to be displayed instead of the text version. Default `''`
|
|
2193
|
+
</td>
|
|
2194
|
+
</tr>
|
|
2195
|
+
<tr>
|
|
2196
|
+
<td>
|
|
2197
|
+
|
|
2095
2198
|
`editable`
|
|
2096
2199
|
</td>
|
|
2097
2200
|
<td>
|
|
@@ -2220,6 +2323,13 @@ Here are all properties that exist in Resource object:
|
|
|
2220
2323
|
</td>
|
|
2221
2324
|
<td>The title of the resource</td>
|
|
2222
2325
|
</tr>
|
|
2326
|
+
<tr>
|
|
2327
|
+
<td>
|
|
2328
|
+
|
|
2329
|
+
`titleHTML`
|
|
2330
|
+
</td>
|
|
2331
|
+
<td>The HTML version of the title</td>
|
|
2332
|
+
</tr>
|
|
2223
2333
|
</table>
|
|
2224
2334
|
|
|
2225
2335
|
### Parsing resource from a plain object
|
|
@@ -2247,6 +2357,16 @@ Here are all admissible fields for the resource’s input object:
|
|
|
2247
2357
|
`string` Text that will be displayed on the resource when it is rendered. Default `''`
|
|
2248
2358
|
</td>
|
|
2249
2359
|
</tr>
|
|
2360
|
+
<tr>
|
|
2361
|
+
<td>
|
|
2362
|
+
|
|
2363
|
+
`titleHTML`
|
|
2364
|
+
</td>
|
|
2365
|
+
<td>
|
|
2366
|
+
|
|
2367
|
+
`string` The HTML version of the title to be displayed instead of the text version. Default `''`
|
|
2368
|
+
</td>
|
|
2369
|
+
</tr>
|
|
2250
2370
|
</table>
|
|
2251
2371
|
|
|
2252
2372
|
## View object
|