@event-calendar/time-grid
Advanced tools
Comparing version 2.4.1 to 2.5.0
{ | ||
"name": "@event-calendar/time-grid", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"title": "Event Calendar TimeGrid plugin", | ||
@@ -29,5 +29,5 @@ "description": "Full-sized drag & drop event calendar with resource view", | ||
"dependencies": { | ||
"@event-calendar/core": "~2.4.1", | ||
"svelte": "^4.1.1" | ||
"@event-calendar/core": "~2.5.0", | ||
"svelte": "^4.2.8" | ||
} | ||
} |
@@ -200,4 +200,4 @@ # Event Calendar [![](https://data.jsdelivr.com/v1/package/npm/@event-calendar/build/badge)](https://www.jsdelivr.com/package/npm/@event-calendar/build) [![npm](https://img.shields.io/npm/dm/@event-calendar/core?color=red&label=npm&style=flat-square)](https://www.npmjs.com/package/@event-calendar/core) | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.5.0/event-calendar.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.5.0/event-calendar.min.js"></script> | ||
``` | ||
@@ -482,2 +482,27 @@ | ||
### dayHeaderAriaLabelFormat | ||
- Type `object` or `function` | ||
- Default `{dateStyle: 'long'}` | ||
> Views override the default value as follows: | ||
> - dayGridMonth `{weekday: 'long'}` | ||
Defines the text that is used inside the `aria-label` attribute in calendar column headings. | ||
This value can be either an object with options for the native JavaScript [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) object, or a callback function that returns formatted string: | ||
```js | ||
function (date) { | ||
// return formatted date string | ||
} | ||
``` | ||
<table> | ||
<tr> | ||
<td> | ||
`date` | ||
</td> | ||
<td>JavaScript Date object that needs to be formatted</td> | ||
</tr> | ||
</table> | ||
### dayHeaderFormat | ||
@@ -2227,9 +2252,2 @@ - Type `object` or `function` | ||
<details> | ||
<summary>Note</summary> | ||
> In the `'listDay'`, `'listWeek'`, `'listMonth'` and `'listYear'` views, the events are rendered outside the day container, so the method will return `null` for the coordinates that are inside the events. | ||
</details> | ||
### destroy() | ||
@@ -2306,3 +2324,3 @@ - Return value `undefined` | ||
The text appearing on the event. See [Content](#content)</td> | ||
`Content` The text appearing on the event. See [Content](#content)</td> | ||
</tr> | ||
@@ -2597,10 +2615,6 @@ <tr> | ||
</td> | ||
<td>The title of the resource</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
`titleHTML` | ||
The title of the resource. See [Content](#content). | ||
</td> | ||
<td>The HTML version of the title</td> | ||
</tr> | ||
@@ -2645,3 +2659,3 @@ <tr> | ||
`string` Text that will be displayed on the resource when it is rendered. Default `''` | ||
`Content` Text that will be displayed on the resource when it is rendered. See [Content](#content). Default `''` | ||
</td> | ||
@@ -2652,12 +2666,2 @@ </tr> | ||
`titleHTML` | ||
</td> | ||
<td> | ||
`string` The HTML version of the title to be displayed instead of the text version. Default `''` | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
`eventBackgroundColor` | ||
@@ -2664,0 +2668,0 @@ </td> |
@@ -9,4 +9,7 @@ import {derived} from 'svelte/store'; | ||
createDuration, | ||
min as minFn, max as maxFn, | ||
bgEvent, setMidnight | ||
min as minFn, | ||
max as maxFn, | ||
bgEvent, | ||
setMidnight, | ||
toISOString | ||
} from '@event-calendar/core'; | ||
@@ -18,3 +21,3 @@ | ||
([$_slotTimeLimits, $_intlSlotLabel, $slotDuration]) => { | ||
let compact = $slotDuration.seconds >= 3600; | ||
let large = $slotDuration.seconds >= 3600; | ||
let times = []; | ||
@@ -27,3 +30,6 @@ let date = setMidnight(createDate()); | ||
while (date < end) { | ||
times.push(times.length && (i || compact) ? $_intlSlotLabel.format(date) : ''); | ||
times.push([ | ||
toISOString(date), | ||
times.length && (i || large) ? $_intlSlotLabel.format(date) : '' | ||
]); | ||
addDuration(date, $slotDuration); | ||
@@ -30,0 +36,0 @@ i = 1 - i; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
179850
3122
2749
+ Added@event-calendar/core@2.5.1(transitive)
- Removed@event-calendar/core@2.4.1(transitive)
Updated@event-calendar/core@~2.5.0
Updatedsvelte@^4.2.8