@event-calendar/build 5.3.0 → 5.3.2
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 +13 -13
- package/dist/event-calendar.min.css +1 -1
- package/dist/event-calendar.min.js +2 -2
- package/dist/event-calendar.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -251,8 +251,8 @@ This bundle contains a version of the calendar that includes all plugins and is
|
|
|
251
251
|
|
|
252
252
|
The first step is to include the following lines of code in the `<head>` section of your page:
|
|
253
253
|
```html
|
|
254
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.3.
|
|
255
|
-
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.3.
|
|
254
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.3.2/dist/event-calendar.min.css">
|
|
255
|
+
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.3.2/dist/event-calendar.min.js"></script>
|
|
256
256
|
```
|
|
257
257
|
|
|
258
258
|
<details>
|
|
@@ -1546,7 +1546,7 @@ This option is used instead of the `events` option.
|
|
|
1546
1546
|
|
|
1547
1547
|
`EventSource` should be an object with one of the following sets of properties:
|
|
1548
1548
|
|
|
1549
|
-
#### 1. Fetch events
|
|
1549
|
+
#### 1. Fetch events from a URL
|
|
1550
1550
|
<table>
|
|
1551
1551
|
<tr>
|
|
1552
1552
|
<td>
|
|
@@ -2033,13 +2033,13 @@ The function is triggered during resizing for each cursor movement and takes the
|
|
|
2033
2033
|
- Type `array`, `object` or `function`
|
|
2034
2034
|
- Default `[]`
|
|
2035
2035
|
|
|
2036
|
-
|
|
2036
|
+
Defines the source of resource data displayed in resource views. It can be provided in one of three ways:
|
|
2037
2037
|
|
|
2038
2038
|
#### 1. Array of plain objects
|
|
2039
|
-
The provided plain objects will be parsed into [Resource](#resource-object) objects.
|
|
2039
|
+
If the resources are predefined and do not change, then pass them as an array of plain objects. The provided plain objects will be [parsed]((#parsing-resource-from-a-plain-object)) into [Resource](#resource-object) objects.
|
|
2040
2040
|
|
|
2041
|
-
#### 2. Fetch resources
|
|
2042
|
-
|
|
2041
|
+
#### 2. Fetch resources from a URL
|
|
2042
|
+
To make the calendar load resources from a URL, specify `resources` option as an object with the following properties:
|
|
2043
2043
|
<table>
|
|
2044
2044
|
<tr>
|
|
2045
2045
|
<td>
|
|
@@ -2056,7 +2056,7 @@ A URL from which the calendar will fetch an array of [parsable](#parsing-resourc
|
|
|
2056
2056
|
`start`
|
|
2057
2057
|
</td>
|
|
2058
2058
|
<td>
|
|
2059
|
-
Start date of the range the calendar needs
|
|
2059
|
+
Start date of the range the calendar needs resources for
|
|
2060
2060
|
</td>
|
|
2061
2061
|
</tr>
|
|
2062
2062
|
<tr>
|
|
@@ -2065,7 +2065,7 @@ Start date of the range the calendar needs events for
|
|
|
2065
2065
|
`end`
|
|
2066
2066
|
</td>
|
|
2067
2067
|
<td>
|
|
2068
|
-
End date of the range the calendar needs
|
|
2068
|
+
End date of the range the calendar needs resources for
|
|
2069
2069
|
</td>
|
|
2070
2070
|
</tr>
|
|
2071
2071
|
</table>
|
|
@@ -2094,26 +2094,26 @@ Other GET/POST data you want to send to the server. Can be a plain object or a f
|
|
|
2094
2094
|
</table>
|
|
2095
2095
|
|
|
2096
2096
|
#### 3. Execute custom function
|
|
2097
|
-
You can also
|
|
2097
|
+
You can also specify `resources` as a custom function that provides resource data.
|
|
2098
2098
|
```js
|
|
2099
2099
|
function(fetchInfo, successCallback, failureCallback) { }
|
|
2100
2100
|
```
|
|
2101
2101
|
If [refetchResourcesOnNavigate](#refetchresourcesonnavigate) is enabled, the function will be called every time the user navigates to a different date. In this case,
|
|
2102
|
-
`fetchInfo` will be an object with the following properties (
|
|
2102
|
+
`fetchInfo` will be an object with the following properties (it is an empty object otherwise):
|
|
2103
2103
|
<table>
|
|
2104
2104
|
<tr>
|
|
2105
2105
|
<td>
|
|
2106
2106
|
|
|
2107
2107
|
`start`
|
|
2108
2108
|
</td>
|
|
2109
|
-
<td>JavaScript Date object for the beginning of the range the calendar needs
|
|
2109
|
+
<td>JavaScript Date object for the beginning of the range the calendar needs resources for</td>
|
|
2110
2110
|
</tr>
|
|
2111
2111
|
<tr>
|
|
2112
2112
|
<td>
|
|
2113
2113
|
|
|
2114
2114
|
`end`
|
|
2115
2115
|
</td>
|
|
2116
|
-
<td>JavaScript Date object for the end of the range the calendar needs
|
|
2116
|
+
<td>JavaScript Date object for the end of the range the calendar needs resources for. Note: This value is exclusive</td>
|
|
2117
2117
|
</tr>
|
|
2118
2118
|
<tr>
|
|
2119
2119
|
<td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* EventCalendar v5.3.
|
|
2
|
+
* EventCalendar v5.3.2
|
|
3
3
|
* https://github.com/vkurko/calendar
|
|
4
4
|
*/
|
|
5
5
|
.ec{color-scheme:light;--ec-color-400: oklch(70.8% 0 0);--ec-color-300: oklch(87% 0 0);--ec-color-200: oklch(92.2% 0 0);--ec-color-100: oklch(97% 0 0);--ec-color-50: oklch(98.5% 0 0);--ec-bg-color: #fff;--ec-text-color: currentcolor;--ec-border-color: var(--ec-color-300);--ec-button-bg-color: var(--ec-bg-color);--ec-button-border-color: var(--ec-border-color);--ec-button-text-color: var(--ec-text-color);--ec-button-active-bg-color: var(--ec-color-200);--ec-button-active-border-color: var(--ec-color-400);--ec-button-active-text-color: var(--ec-button-text-color);--ec-today-bg-color: oklch(98.7% .026 102.212);--ec-highlight-color: oklch(98.4% .019 200.873);--ec-event-bg-color: oklch(70.7% .165 254.624);--ec-event-text-color: #fff;--ec-bg-event-color: var(--ec-color-300);--ec-bg-event-opacity: .3;--ec-event-col-gap: .375rem;--ec-now-indicator-color: oklch(63.7% .237 25.331);--ec-popup-bg-color: var(--ec-bg-color)}.ec-dark .ec{color-scheme:dark;--ec-color-400: oklch(43.9% 0 0);--ec-color-300: oklch(37.1% 0 0);--ec-color-200: oklch(26.9% 0 0);--ec-color-100: oklch(20.5% 0 0);--ec-color-50: oklch(14.5% 0 0);--ec-bg-color: var(--ec-color-100);--ec-today-bg-color: oklch(28.6% .066 53.813);--ec-highlight-color: oklch(30.2% .056 229.695);--ec-bg-event-opacity: .5}@media(prefers-color-scheme:dark){.ec-auto-dark .ec{color-scheme:dark;--ec-color-400: oklch(43.9% 0 0);--ec-color-300: oklch(37.1% 0 0);--ec-color-200: oklch(26.9% 0 0);--ec-color-100: oklch(20.5% 0 0);--ec-color-50: oklch(14.5% 0 0);--ec-bg-color: var(--ec-color-100);--ec-today-bg-color: oklch(28.6% .066 53.813);--ec-highlight-color: oklch(30.2% .056 229.695);--ec-bg-event-opacity: .5}}.ec-day{--ec-day-bg-color: var(--ec-bg-color);background-color:var(--ec-day-bg-color);border:1px solid var(--ec-border-color);border-block-start:none;border-inline-start:none}.ec-day.ec-today{--ec-day-bg-color: var(--ec-today-bg-color)}.ec-day.ec-highlight{--ec-day-bg-color: var(--ec-highlight-color)}.ec-time-grid .ec-body .ec-day{background-image:linear-gradient(to top,var(--ec-day-bg-color) 1px,transparent 1px),linear-gradient(to top,var(--ec-border-color) 1px,transparent 1px),linear-gradient(to right,var(--ec-day-bg-color) 1px,transparent 1px),linear-gradient(to top,var(--ec-border-color) 1px,transparent 1px);background-size:100% 100%,100% calc(var(--ec-slot-height) * var(--ec-slot-label-periodicity)),2px 100%,100% var(--ec-slot-height)}.ec-timeline:not(.ec-month-view) .ec-body .ec-day{--ec-last-line-color: transparent;--ec-direction: to left;background-image:linear-gradient(var(--ec-direction),var(--ec-last-line-color) 1px,transparent 1px),linear-gradient(var(--ec-direction),var(--ec-border-color) 1px,transparent 1px),linear-gradient(var(--ec-day-bg-color) 1px,transparent 1px),linear-gradient(var(--ec-direction),var(--ec-border-color) 1px,transparent 1px);background-size:100% 100%,calc(var(--ec-slot-width) * var(--ec-slot-label-periodicity)) 100%,100% 2px,var(--ec-slot-width) 100%;border-inline:none}[dir=rtl] :is(.ec-timeline:not(.ec-month-view) .ec-body .ec-day){--ec-direction: to right}.ec-timeline:not(.ec-month-view) .ec-body .ec-day.ec-no-ieb{--ec-last-line-color: var(--ec-day-bg-color)}.ec-day-grid .ec-day{display:flex;flex-direction:column;justify-content:space-between;min-block-size:5em}.ec-day-grid .ec-uniform .ec-day{min-block-size:auto}.ec-list .ec-day{border-inline:none}.ec-list .ec-day:last-child{border:none}.ec-day.ec-no-ieb{border-inline-end:none}.ec-day.ec-no-beb{border-block-end:none}.ec-day-head{display:flex;flex-direction:row-reverse;justify-content:space-between}.ec-day-grid.ec-month-view .ec-day-head{padding:.375rem}.ec-day.ec-other-month .ec-day-head time{opacity:.3}.ec-list .ec-day-head{background-color:var(--ec-day-bg-color);border-block-end:1px solid var(--ec-border-color);flex-direction:unset;margin:0 0 -1px;padding:.5em 1.5em;position:sticky;inset-block-start:0;z-index:2}.ec-day-foot{padding:.18rem;font-size:.85em}.ec-day-foot a{cursor:pointer}.ec-disabled{position:relative}.ec-disabled:after{content:"";position:absolute;inset:0;background-color:var(--ec-bg-event-color);opacity:var(--ec-bg-event-opacity)}.ec-toolbar{display:flex;justify-content:space-between;align-items:center;margin-block-end:1em}.ec-toolbar>*{display:inline-flex;flex-wrap:wrap;column-gap:.75rem;row-gap:.5rem}.ec-title{margin:0}.ec-button{background-color:var(--ec-button-bg-color);border:1px solid var(--ec-button-border-color);padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem}.ec-button:not(:disabled){color:var(--ec-button-text-color);cursor:pointer}.ec-button:not(:disabled):hover,.ec-button.ec-active{background-color:var(--ec-button-active-bg-color);border-color:var(--ec-button-active-border-color);color:var(--ec-button-active-text-color);z-index:1}.ec-button-group{display:inline-flex;vertical-align:top}.ec-button-group .ec-button:not(:first-child){border-start-start-radius:0;border-end-start-radius:0;margin-inline-start:-1px}.ec-button-group .ec-button:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.ec-icon{display:inline-block;inline-size:1em}.ec-icon.ec-prev:after,.ec-icon.ec-next:after{content:"";position:relative;inline-size:.5em;block-size:.5em;border-block-start:2px solid currentcolor;border-inline-end:2px solid currentcolor;display:inline-block}.ec-icon.ec-prev:after{inset-inline-start:3px;rotate:-135deg}[dir=rtl] .ec-icon.ec-prev:after{rotate:135deg}.ec-icon.ec-next:after{inset-inline-start:-3px;rotate:45deg}[dir=rtl] .ec-icon.ec-next:after{rotate:-45deg}.ec-sidebar{position:sticky;inset-inline-start:0;z-index:1;background-color:var(--ec-bg-color);border-inline-end:1px solid var(--ec-border-color);text-align:end;overflow:clip}.ec-header .ec-sidebar{border-block-end:1px solid var(--ec-border-color);padding-block:.375rem}.ec-time-grid .ec-sidebar{padding-inline:.75rem}.ec-time-grid .ec-body .ec-sidebar{--ec-direction: to left;background-image:linear-gradient(var(--ec-direction),transparent .375rem,var(--ec-bg-color) .375rem),linear-gradient(to top,var(--ec-bg-color) 1px,transparent 1px),linear-gradient(to top,var(--ec-border-color) 1px,transparent 1px),linear-gradient(to right,var(--ec-bg-color) 1px,transparent 1px),linear-gradient(to top,var(--ec-border-color) 1px,transparent 1px);background-size:100% 100%,100% 100%,100% calc(var(--ec-slot-height) * var(--ec-slot-label-periodicity)),2px 100%,100% var(--ec-slot-height)}[dir=rtl] :is(.ec-time-grid .ec-body .ec-sidebar){--ec-direction: to right}.ec-timeline .ec-body .ec-sidebar{grid-area:1 / 1 / -1 / 2;display:grid;grid-template-rows:subgrid}.ec-row-head{display:flex;border-block-end:1px solid var(--ec-border-color);padding:.375em .75rem;min-block-size:1.5em}.ec-row-head:last-child{border:none}.ec-expander{inline-size:1.25em;margin-inline-end:.25em;margin-block-start:-1px}.ec-expander .ec-button{line-height:normal;padding:0;aspect-ratio:1;block-size:1.25em}.ec-slot{white-space:nowrap}.ec-time-grid .ec-slot{block-size:calc(var(--ec-slot-height) * var(--ec-slot-label-periodicity));position:relative;inset-block-start:-.5lh}.ec-timeline .ec-slot{grid-column:span var(--ec-slot-label-periodicity);font-size:.95em;padding:.18rem 0;overflow:clip;text-overflow:ellipsis}.ec-slots{display:grid;grid-auto-flow:column;grid-auto-columns:var(--ec-slot-width);text-align:center;--ec-day-bg-color: var(--ec-bg-color);background-color:var(--ec-day-bg-color);border-block-end:1px solid var(--ec-border-color);--ec-last-line-color: transparent;--ec-direction: to left;background-image:linear-gradient(var(--ec-direction),var(--ec-last-line-color) 1px,transparent 1px),linear-gradient(var(--ec-direction),var(--ec-border-color) 1px,transparent 1px);background-size:100% 100%,calc(var(--ec-slot-width) * var(--ec-slot-label-periodicity)) 100%}.ec-slots.ec-today{--ec-day-bg-color: var(--ec-today-bg-color)}.ec-slots.ec-highlight{--ec-day-bg-color: var(--ec-highlight-color)}[dir=rtl] .ec-slots{--ec-direction: to right}.ec-slots:last-child{--ec-last-line-color: var(--ec-day-bg-color)}.ec-events{grid-area:1 / 2 / -1 / -1;display:grid;grid-template:subgrid / subgrid;isolation:isolate;pointer-events:none}.ec-day-grid .ec-events{grid-column-start:1}.ec-event{display:flex;position:relative;padding:2px;color:var(--ec-event-text-color);box-sizing:border-box;box-shadow:0 0 1px 0 var(--ec-border-color);background-color:var(--ec-event-bg-color);border-radius:3px;font-size:.85em;line-height:1.5;z-index:1;pointer-events:all;inline-size:calc(100% - var(--ec-event-col-gap))}.ec-time-grid .ec-event{grid-row:1}.ec-day-grid .ec-event,.ec-all-day .ec-event,.ec-timeline .ec-event{block-size:max-content;margin-block-end:var(--ec-event-col-gap)}.ec-list .ec-event{flex-direction:row;padding:.5em 1.5em;color:inherit;background-color:var(--ec-day-bg-color);border-radius:0}.ec-event.ec-preview{z-index:1000;-webkit-user-select:none;user-select:none;opacity:.8}.ec-event.ec-pointer{color:inherit;pointer-events:none;-webkit-user-select:none;user-select:none;z-index:0;box-shadow:none}.ec-bg-event{grid-row:1;position:relative;background-color:var(--ec-bg-event-color);opacity:var(--ec-bg-event-opacity)}.ec-draggable{cursor:pointer;-webkit-user-select:none;user-select:none}.ec-ghost{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none}.ec-event-body{display:flex;flex-direction:column;inline-size:100%}.ec-day-grid .ec-event-body,.ec-all-day .ec-event-body,.ec-timeline .ec-event-body{flex-direction:row}.ec-event-tag{inline-size:4px;border-radius:2px;margin-inline-end:8px}.ec-event-time{overflow:hidden;white-space:nowrap;margin:0 0 1px;flex-shrink:0;max-block-size:100%}.ec-day-grid .ec-event-time,.ec-timeline .ec-event-time{margin:0 3px 0 0;max-inline-size:100%;text-overflow:ellipsis}.ec-event-title{overflow:hidden;margin:0;font-weight:inherit}.ec-time-grid .ec-event-title{position:sticky;inset-block-start:var(--ec-header-height)}.ec-day-grid .ec-event-title,.ec-all-day .ec-event-title,.ec-timeline .ec-event-title{min-block-size:1.5em;white-space:nowrap;text-overflow:ellipsis;position:sticky;inset-inline-start:calc(var(--ec-sidebar-width) + .18em)}.ec-list .ec-event-title{font-size:1rem}.ec-resizer{position:absolute;-webkit-user-select:none;user-select:none}.ec-time-grid .ec-body .ec-resizer{inset:auto 0 0;block-size:50%;max-block-size:8px;cursor:ns-resize}.ec-time-grid .ec-body .ec-resizer.ec-start{inset:0 0 auto}.ec-day-grid .ec-resizer,.ec-all-day .ec-resizer,.ec-timeline .ec-resizer{inset:0 0 0 auto;inline-size:50%;max-inline-size:8px;cursor:ew-resize}:is(.ec-day-grid .ec-resizer,.ec-all-day .ec-resizer,.ec-timeline .ec-resizer).ec-start{inset:0 auto 0 0}.ec-dragging,.ec-dragging *{cursor:pointer!important}.ec-resizing-y,.ec-resizing-y *{cursor:ns-resize!important}.ec-resizing-x,.ec-resizing-x *{cursor:ew-resize!important}.ec-no-events{text-align:center;padding:5em 0;background-color:var(--ec-bg-color)}.ec-now-indicator{grid-row:2;position:relative;pointer-events:none;will-change:inset}.ec-time-grid .ec-now-indicator{inline-size:100%;block-size:0;border-block-start:var(--ec-now-indicator-color) solid 2px}.ec-timeline .ec-now-indicator{inline-size:0;border-inline-start:var(--ec-now-indicator-color) solid 2px}.ec-timeline .ec-now-indicator:before{inset-block-start:calc(var(--ec-header-height) - 6.5px);z-index:2}.ec-now-indicator:before{background:var(--ec-now-indicator-color);border-radius:50%;content:"";display:block;block-size:12px;inline-size:12px;margin-block-start:-7px;margin-inline-start:-7px;position:sticky;inset-inline-start:calc(var(--ec-sidebar-width) - 6.5px);z-index:1}.ec-popup{position:relative;display:flex;flex-direction:column;box-sizing:border-box;block-size:max-content;inline-size:125%;min-block-size:8em;min-inline-size:12em;padding:.375rem .75rem .75rem;background-color:var(--ec-popup-bg-color);border:1px solid var(--ec-border-color);border-radius:.25rem;box-shadow:var(--ec-color-300) 0 10px 15px -3px,var(--ec-color-300) 0 4px 6px -4px}.ec-popup .ec-day-head{flex-direction:row;padding-inline:0}.ec-popup .ec-day-head a{cursor:pointer;font-size:1.5em;line-height:.8}.ec-popup .ec-events{--ec-event-col-gap: 0;display:block;overflow-y:auto;pointer-events:auto}.ec-custom-scrollbars .ec-main::-webkit-scrollbar{background-color:transparent}.ec-custom-scrollbars .ec-main::-webkit-scrollbar-thumb{border:4px solid transparent;box-shadow:none;background-color:var(--ec-border-color);background-clip:padding-box;border-radius:8px}.ec-custom-scrollbars .ec-main::-webkit-scrollbar-thumb:hover{background-color:var(--ec-color-400)}.ec{display:flex;flex-direction:column}.ec-main{display:grid;border:1px solid var(--ec-border-color);overflow:auto}.ec-time-grid .ec-main{grid-template-columns:max-content repeat(var(--ec-grid-cols),var(--ec-col-width));grid-template-rows:repeat(2,max-content)}.ec-day-grid .ec-main{--ec-row-height: auto;grid-template-columns:repeat(var(--ec-grid-cols),minmax(0,1fr));grid-template-rows:max-content repeat(var(--ec-grid-rows),var(--ec-row-height))}.ec-day-grid .ec-main.ec-uniform{--ec-row-height: minmax(0, 1fr);overflow:hidden;flex-grow:1}.ec-timeline .ec-main{grid-template-columns:max-content repeat(var(--ec-grid-cols),min-content);grid-template-rows:max-content var(--ec-grid-rows);flex-grow:1}.ec-timeline.ec-month-view .ec-main{grid-template-columns:max-content repeat(var(--ec-grid-cols),var(--ec-col-width))}.ec-header{grid-area:1 / 1 / 2 / -1;display:grid;grid-template-columns:subgrid;position:sticky;inset-block-start:0;z-index:2}.ec-grid{grid-area:1 / 1 / -1 / -1;display:grid;grid-template-columns:subgrid}.ec-body .ec-grid{grid-template-rows:subgrid}.ec-time-grid .ec-grid,.ec-timeline .ec-grid{grid-column-start:2}.ec-all-day{grid-area:2 / 1 / auto / -1;display:grid;grid-template-columns:subgrid;min-block-size:var(--ec-slot-height)}.ec-col-group{grid-column:span var(--ec-col-group-span)}.ec-col-group,.ec-col-head{text-align:center;padding:.375rem .18em;background-color:var(--ec-bg-color);border:1px solid var(--ec-border-color);border-block-start:none;border-inline-start:none;overflow:clip;text-overflow:ellipsis}:is(.ec-col-group,.ec-col-head).ec-today{background-color:var(--ec-today-bg-color)}:is(.ec-col-group,.ec-col-head).ec-highlight{background-color:var(--ec-highlight-color)}.ec-col-group:nth-last-child(1 of.ec-col-group),.ec-col-head:nth-last-child(1 of.ec-col-head){border-inline-end:none}.ec-col-group>*,.ec-timeline .ec-col-head>*{position:sticky;inset-inline-start:calc(var(--ec-sidebar-width) + .18em)}.ec-body{grid-area:2 / 1 / -1 / -1;display:grid;grid-template:subgrid / subgrid}.ec-hidden{visibility:hidden}
|