@event-calendar/build 1.2.0 → 1.3.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 +58 -5
- package/event-calendar.min.js +2 -2
- package/event-calendar.min.js.map +1 -1
- package/package.json +6 -6
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.
|
|
197
|
-
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.
|
|
196
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.3.0/event-calendar.min.css">
|
|
197
|
+
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.3.0/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,47 @@ 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. The function must return `true` to have this event counted, or `false` to ignore it
|
|
1323
|
+
</td>
|
|
1324
|
+
</tr>
|
|
1325
|
+
</table>
|
|
1326
|
+
|
|
1327
|
+
</td>
|
|
1328
|
+
</tr>
|
|
1329
|
+
</table>
|
|
1330
|
+
|
|
1278
1331
|
### headerToolbar
|
|
1279
1332
|
- Type `object`
|
|
1280
1333
|
- Default `{start: 'title', center: '', end: 'today prev,next'}`
|
|
@@ -1793,7 +1846,7 @@ This should be a value that can be parsed into a [Duration](#duration-object) ob
|
|
|
1793
1846
|
|
|
1794
1847
|
Defines the CSS classes that the Event Calendar uses to generate HTML markup.
|
|
1795
1848
|
|
|
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
|
|
1849
|
+
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
1850
|
|
|
1798
1851
|
```js
|
|
1799
1852
|
function (theme) {
|