@event-calendar/core 4.5.2 → 4.7.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
@@ -4,7 +4,7 @@ See [demo](https://vkurko.github.io/calendar/) and [changelog](CHANGELOG.md).
4
4
 
5
5
  Full-sized drag & drop JavaScript event calendar with resource & timeline views:
6
6
 
7
- * Lightweight (33kb [br](https://en.wikipedia.org/wiki/Brotli) compressed)
7
+ * Lightweight (37kb [br](https://en.wikipedia.org/wiki/Brotli) compressed)
8
8
  * 100% human-coded
9
9
  * Zero-dependency (standalone bundle)
10
10
  * Used on over 70,000 websites with [Bookly](https://wordpress.org/plugins/bookly-responsive-appointment-booking-tool/)
@@ -66,13 +66,14 @@ Inspired by [FullCalendar](https://fullcalendar.io/), it implements similar opti
66
66
  - [eventDragStart](#eventdragstart)
67
67
  - [eventDragStop](#eventdragstop)
68
68
  - [eventDrop](#eventdrop)
69
+ - [eventDurationEditable](#eventdurationeditable)
69
70
  </td><td>
70
71
 
71
- - [eventDurationEditable](#eventdurationeditable)
72
72
  - [eventFilter](#eventfilter)
73
73
  - [eventLongPressDelay](#eventlongpressdelay)
74
74
  - [eventMouseEnter](#eventmouseenter)
75
75
  - [eventMouseLeave](#eventmouseleave)
76
+ - [eventOrder](#eventorder)
76
77
  - [eventResizableFromStart](#eventresizablefromstart)
77
78
  - [eventResize](#eventresize)
78
79
  - [eventResizeStart](#eventresizestart)
@@ -243,8 +244,8 @@ This bundle contains a version of the calendar that includes all plugins and is
243
244
 
244
245
  The first step is to include the following lines of code in the `<head>` section of your page:
245
246
  ```html
246
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.5.2/dist/event-calendar.min.css">
247
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.5.2/dist/event-calendar.min.js"></script>
247
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.7.0/dist/event-calendar.min.css">
248
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.7.0/dist/event-calendar.min.js"></script>
248
249
  ```
249
250
 
250
251
  <details>
@@ -369,7 +370,7 @@ function (text) {
369
370
  </table>
370
371
 
371
372
  ### customButtons
372
- - Type `object`
373
+ - Type `object` or `function`
373
374
  - Default `{}`
374
375
 
375
376
  Defines custom buttons that can be used in the [headerToolbar](#headertoolbar).
@@ -429,6 +430,23 @@ If `true`, the button will appear pressed/active
429
430
  </tr>
430
431
  </table>
431
432
 
433
+ This option can also be set as a callback function that receives default custom button object and should return a new one:
434
+
435
+ ```js
436
+ function (customButtons) {
437
+ // return new custom buttons object
438
+ }
439
+ ```
440
+ <table>
441
+ <tr>
442
+ <td>
443
+
444
+ `customButtons`
445
+ </td>
446
+ <td>An object with default custom buttons</td>
447
+ </tr>
448
+ </table>
449
+
432
450
  ### date
433
451
  - Type `Date` or `string`
434
452
  - Default `new Date()`
@@ -1286,6 +1304,51 @@ The current [View](#view-object) object
1286
1304
  </tr>
1287
1305
  </table>
1288
1306
 
1307
+ ### eventOrder
1308
+ - Type `function`
1309
+ - Default `undefined`
1310
+
1311
+ A function that determines the order in which events that visually intersect in the current view are displayed.
1312
+
1313
+ When `eventOrder` is not specified, events are ordered by start time with all-day events appearing first.
1314
+
1315
+ ```js
1316
+ function (a, b) {
1317
+ // Return a negative value if 'a' should come before 'b'
1318
+ // Return a positive value if 'a' should come after 'b'
1319
+ // Return zero if 'a' and 'b' are equal
1320
+ }
1321
+ ```
1322
+
1323
+ `a` and `b` are objects (so called `event chunks`) with the following properties:
1324
+
1325
+ <table>
1326
+ <tr>
1327
+ <td>
1328
+
1329
+ `start`
1330
+ </td>
1331
+ <td>JavaScript Date object holding the event chunk’s start time</td>
1332
+ </tr>
1333
+ <tr>
1334
+ <td>
1335
+
1336
+ `end`
1337
+ </td>
1338
+ <td>JavaScript Date object holding the event chunk’s end time</td>
1339
+ </tr>
1340
+ <tr>
1341
+ <td>
1342
+
1343
+ `event`
1344
+ </td>
1345
+ <td>
1346
+
1347
+ The [Event](#event-object) object associated with this chunk
1348
+ </td>
1349
+ </tr>
1350
+ </table>
1351
+
1289
1352
  ### eventResizableFromStart
1290
1353
  - Type `boolean`
1291
1354
  - Default `false`
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v4.5.2
2
+ * EventCalendar v4.7.0
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  .ec {