@event-calendar/build 1.2.0 → 1.3.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 CHANGED
@@ -193,8 +193,8 @@ import '@event-calendar/core/index.css';
193
193
  ### Pre-built browser ready bundle
194
194
  Include the following lines of code in the `<head>` section of your page:
195
195
  ```html
196
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.2.0/event-calendar.min.css">
197
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.2.0/event-calendar.min.js"></script>
196
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.3.1/event-calendar.min.css">
197
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.3.1/event-calendar.min.js"></script>
198
198
  ```
199
199
 
200
200
  <details>
@@ -282,11 +282,28 @@ Determines whether the `all-day` slot is displayed at the top of the calendar.
282
282
  When hidden with `false`, all-day events will not be displayed in `timeGrid`/`resourceTimeGrid` views.
283
283
 
284
284
  ### buttonText
285
- - Type `object`
285
+ - Type `object` or `function`
286
286
  - Default `{today: 'today', dayGridMonth: 'month', listDay: 'list', listWeek: 'list', listMonth: 'list', listYear: 'list', resourceTimeGridDay: 'day', resourceTimeGridWeek: 'week', timeGridDay: 'day', timeGridWeek: 'week'}`
287
287
 
288
288
  Text that is displayed in buttons of the header toolbar.
289
289
 
290
+ This value can be either a plain object with all necessary properties, or a callback function that receives default button texts object and should return a new one:
291
+
292
+ ```js
293
+ function (texts) {
294
+ // return new button texts object
295
+ }
296
+ ```
297
+ <table>
298
+ <tr>
299
+ <td>
300
+
301
+ `texts`
302
+ </td>
303
+ <td>An object with default button texts</td>
304
+ </tr>
305
+ </table>
306
+
290
307
  ### date
291
308
  - Type `Date` or `string`
292
309
  - Default `new Date()`
@@ -1270,11 +1287,49 @@ Determines whether resources with no events for the current range should be hidd
1270
1287
  The day that each week begins at, where Sunday is `0`, Monday is `1`, etc. Saturday is `6`.
1271
1288
 
1272
1289
  ### flexibleSlotTimeLimits
1273
- - Type `boolean`
1290
+ - Type `boolean` or `object`
1274
1291
  - Default `false`
1275
1292
 
1276
1293
  Determines whether [slotMinTime](#slotmintime) and [slotMaxTime](#slotmaxtime) should automatically expand when an event goes out of bounds.
1277
1294
 
1295
+ If set to `true`, then the decision on whether to expand the limits will be made based on the analysis of currently displayed events, but excluding background events.
1296
+
1297
+ If you want background events not to be ignored, then instead of `true` you can pass an object with the following properties:
1298
+
1299
+ <table>
1300
+ <tr>
1301
+ <td>
1302
+
1303
+ `eventFilter`
1304
+ </td>
1305
+ <td>
1306
+
1307
+ A function to determine whether a given event should be taken into account or not.
1308
+
1309
+ ```js
1310
+ function(event) {
1311
+ // return true or false
1312
+ }
1313
+ ```
1314
+ <table>
1315
+ <tr>
1316
+ <td>
1317
+
1318
+ `event`
1319
+ </td>
1320
+ <td>
1321
+
1322
+ [Event](#event-object) object to be analyzed.
1323
+
1324
+ The function must return `true` to have this event counted, or `false` to ignore it
1325
+ </td>
1326
+ </tr>
1327
+ </table>
1328
+
1329
+ </td>
1330
+ </tr>
1331
+ </table>
1332
+
1278
1333
  ### headerToolbar
1279
1334
  - Type `object`
1280
1335
  - Default `{start: 'title', center: '', end: 'today prev,next'}`
@@ -1793,7 +1848,7 @@ This should be a value that can be parsed into a [Duration](#duration-object) ob
1793
1848
 
1794
1849
  Defines the CSS classes that the Event Calendar uses to generate HTML markup.
1795
1850
 
1796
- This value can be either a plain object with all necessary properties, or a callback function that receives default theme object and should return an actual one:
1851
+ This value can be either a plain object with all necessary properties, or a callback function that receives default theme object and should return a new one:
1797
1852
 
1798
1853
  ```js
1799
1854
  function (theme) {
Binary file