@event-calendar/core 0.10.1 → 0.11.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 +60 -4
- package/index.css +1 -1
- package/index.js +4 -0
- package/package.json +2 -2
- package/src/index.scss +44 -6
- package/src/storage/options.js +4 -0
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Event Calendar [](https://www.jsdelivr.com/package/npm/@event-calendar/build) [](https://www.jsdelivr.com/package/npm/@event-calendar/build) [](https://www.paypal.me/vkurko/10usd) [](https://www.paypal.me/vkurko/1usd)
|
|
2
2
|
|
|
3
3
|
See [demo](https://vkurko.github.io/calendar/).
|
|
4
4
|
|
|
5
5
|
Full-sized drag & drop JavaScript event calendar with resource view:
|
|
6
6
|
|
|
7
|
-
* Lightweight (
|
|
7
|
+
* Lightweight (51kb [br](https://en.wikipedia.org/wiki/Brotli) compressed `modern` version)
|
|
8
8
|
* Zero-dependency (pre-built bundle)
|
|
9
9
|
* Used by [Bookly](https://wordpress.org/plugins/bookly-responsive-appointment-booking-tool/)
|
|
10
10
|
|
|
@@ -19,6 +19,8 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
|
|
|
19
19
|
<table>
|
|
20
20
|
<tr><td>
|
|
21
21
|
|
|
22
|
+
- [allDayContent](#alldaycontent)
|
|
23
|
+
- [allDaySlot](#alldayslot)
|
|
22
24
|
- [buttonText](#buttontext)
|
|
23
25
|
- [date](#date)
|
|
24
26
|
- [dateClick](#dateclick)
|
|
@@ -38,9 +40,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
|
|
|
38
40
|
- [eventContent](#eventcontent)
|
|
39
41
|
- [eventDidMount](#eventdidmount)
|
|
40
42
|
- [eventDragMinDistance](#eventdragmindistance)
|
|
41
|
-
- [eventDragStart](#eventdragstart)
|
|
42
43
|
</td><td>
|
|
43
44
|
|
|
45
|
+
- [eventDragStart](#eventdragstart)
|
|
44
46
|
- [eventDragStop](#eventdragstop)
|
|
45
47
|
- [eventDrop](#eventdrop)
|
|
46
48
|
- [eventDurationEditable](#eventdurationeditable)
|
|
@@ -212,6 +214,41 @@ In Svelte, you can simply update the original `options` object.
|
|
|
212
214
|
|
|
213
215
|
## Options
|
|
214
216
|
|
|
217
|
+
### allDayContent
|
|
218
|
+
- Type `string`, `object`or `function`
|
|
219
|
+
- Default `'all-day'`
|
|
220
|
+
|
|
221
|
+
Defines the content that is displayed as a title of the `all-day` slot.
|
|
222
|
+
|
|
223
|
+
This value can be either a string containing HTML `'<p>...</p>'`, an object containing the HTML string `{html: '<p>...</p>'}`, an object containing an array of DOM nodes `{domNodes: [node1, node2, ...]}` or a function that returns any of the above formats:
|
|
224
|
+
|
|
225
|
+
```js
|
|
226
|
+
function (arg) {
|
|
227
|
+
// return string or object
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
`arg` is an object with the following properties:
|
|
231
|
+
<table>
|
|
232
|
+
<tr>
|
|
233
|
+
<td>
|
|
234
|
+
|
|
235
|
+
`text`
|
|
236
|
+
</td>
|
|
237
|
+
<td>
|
|
238
|
+
|
|
239
|
+
The default text
|
|
240
|
+
</td>
|
|
241
|
+
</tr>
|
|
242
|
+
</table>
|
|
243
|
+
|
|
244
|
+
### allDaySlot
|
|
245
|
+
- Type `boolean`
|
|
246
|
+
- Default `true`
|
|
247
|
+
|
|
248
|
+
Determines whether the `all-day` slot is displayed at the top of the calendar.
|
|
249
|
+
|
|
250
|
+
When hidden with `false`, all-day events will not be displayed in `timeGrid`/`resourceTimeGrid` views.
|
|
251
|
+
|
|
215
252
|
### buttonText
|
|
216
253
|
- Type `object`
|
|
217
254
|
- Default `{today: 'today', dayGridMonth: 'month', listDay: 'list', listWeek: 'list', listMonth: 'list', listYear: 'list', resourceTimeGridDay: 'day', resourceTimeGridWeek: 'week', timeGridDay: 'day', timeGridWeek: 'week'}`
|
|
@@ -1492,7 +1529,7 @@ This should be a value that can be parsed into a [Duration](#duration-object) ob
|
|
|
1492
1529
|
|
|
1493
1530
|
### theme
|
|
1494
1531
|
- Type `object` or `function`
|
|
1495
|
-
- Default `{active: 'ec-active', bgEvent: 'ec-bg-event', bgEvents: 'ec-bg-events', body: 'ec-body', button: 'ec-button', buttonGroup: 'ec-button-group', calendar: 'ec', compact: 'ec-compact', content: 'ec-content', day: 'ec-day',
|
|
1532
|
+
- Default `{active: 'ec-active', allDay: 'ec-all-day', bgEvent: 'ec-bg-event', bgEvents: 'ec-bg-events', body: 'ec-body', button: 'ec-button', buttonGroup: 'ec-button-group', calendar: 'ec', compact: 'ec-compact', content: 'ec-content', day: 'ec-day', dayFoot: 'ec-day-foot', dayHead: 'ec-day-head', daySide: 'ec-day-side', days: 'ec-days', draggable: 'ec-draggable', dragging: 'ec-dragging', event: 'ec-event', eventBody: 'ec-event-body', eventTag: 'ec-event-tag', eventTime: 'ec-event-time', eventTitle: 'ec-event-title', events: 'ec-events', extra: 'ec-extra', ghost: 'ec-ghost', handle: 'ec-handle', header: 'ec-header', hiddenScroll: 'ec-hidden-scroll', hiddenTimes: 'ec-hidden-times', highlight: 'ec-highlight', icon: 'ec-icon', line: 'ec-line', lines: 'ec-lines', list: 'ec-list', month: 'ec-month', noEvents: 'ec-no-events', nowIndicator: 'ec-now-indicator', otherMonth: 'ec-other-month', pointer: 'ec-pointer', popup: 'ec-popup', preview: 'ec-preview', resizer: 'ec-resizer', resizingX: 'ec-resizing-x', resizingY: 'ec-resizing-y', resource: 'ec-resource', resourceTitle: 'ec-resource-title', sidebar: 'ec-sidebar', sidebarTitle: 'ec-sidebar-title', time: 'ec-time', title: 'ec-title', today: 'ec-today', toolbar: 'ec-toolbar', uniform: 'ec-uniform', week: 'ec-week', withScroll: 'ec-with-scroll'}`
|
|
1496
1533
|
|
|
1497
1534
|
Defines the CSS classes that the Event Calendar uses to generate HTML markup.
|
|
1498
1535
|
|
|
@@ -1691,6 +1728,15 @@ Here are all properties that exist in Event object:
|
|
|
1691
1728
|
<tr>
|
|
1692
1729
|
<td>
|
|
1693
1730
|
|
|
1731
|
+
`allDay`
|
|
1732
|
+
</td>
|
|
1733
|
+
<td>
|
|
1734
|
+
|
|
1735
|
+
Boolean (`true` or `false`). Determines if the event is shown in the `all-day` slot</td>
|
|
1736
|
+
</tr>
|
|
1737
|
+
<tr>
|
|
1738
|
+
<td>
|
|
1739
|
+
|
|
1694
1740
|
`start`
|
|
1695
1741
|
</td>
|
|
1696
1742
|
<td>JavaScript Date object holding the event’s start time</td>
|
|
@@ -1811,6 +1857,16 @@ Here are all admissible fields for the event’s input object:
|
|
|
1811
1857
|
<tr>
|
|
1812
1858
|
<td>
|
|
1813
1859
|
|
|
1860
|
+
`allDay`
|
|
1861
|
+
</td>
|
|
1862
|
+
<td>
|
|
1863
|
+
|
|
1864
|
+
`boolean` Determines if the event is shown in the all-day slot. Default `false`
|
|
1865
|
+
</td>
|
|
1866
|
+
</tr>
|
|
1867
|
+
<tr>
|
|
1868
|
+
<td>
|
|
1869
|
+
|
|
1814
1870
|
`start`
|
|
1815
1871
|
</td>
|
|
1816
1872
|
<td>
|
package/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ec-flex{display:flex}.ec-month .ec-body,.ec-days,.ec-day,.ec-day-title,.ec-resource{flex:1 1 0%;min-width:0;max-width:100%}.ec{display:flex;flex-direction:column}.ec ::-webkit-scrollbar{background:#fff}.ec ::-webkit-scrollbar-thumb{border:4px solid #fff;box-shadow:none;background:#dadce0;border-radius:8px;min-height:40px}.ec :hover::-webkit-scrollbar-thumb{background:#bdc1c6}.ec-hidden-scroll{display:none;overflow-y:scroll;visibility:hidden;flex-shrink:0}.ec-with-scroll .ec-hidden-scroll{display:block}.ec-toolbar{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;margin-bottom:1em}.ec-toolbar>*{margin-bottom:-0.5em}.ec-toolbar>*>*{margin-bottom:.5em}.ec-toolbar>*>*:not(:last-child){margin-right:.75em}.ec-title{margin:0}.ec-button{background-color:#fff;border:1px solid #ced4da;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem}.ec-button:not(:disabled){color:#212529;cursor:pointer}.ec-button:not(:disabled):hover,.ec-button.ec-active{background-color:#ececec;border-color:#b1bbc4}.ec-button-group{display:inline-flex}.ec-button-group .ec-button:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.ec-button-group .ec-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.ec-icon{display:inline-block;width:1em}.ec-icon.ec-prev:after,.ec-icon.ec-next:after{content:"";position:relative;width:.5em;height:.5em;border-top:2px solid #212529;border-right:2px solid #212529;display:inline-block}.ec-icon.ec-prev:after{transform:rotate(-135deg) translate(-2px, 2px)}.ec-icon.ec-next:after{transform:rotate(45deg) translate(-2px, 2px)}.ec-header,.ec-body,.ec-days,.ec-day{border:1px solid #dadce0}.ec-header{display:flex;flex-shrink:0}.ec-header .ec-resource{flex-direction:column}.ec-header .ec-resource .ec-days{border-top-style:solid}.ec-header .ec-days{border-bottom:none}.ec-header .ec-day{min-height:24px;line-height:24px;text-align:center;overflow:hidden;text-overflow:ellipsis}.ec-body{position:relative;overflow-x:hidden;overflow-y:auto}.ec-body:not(.ec-list){border-top:none}.ec-sidebar{flex:0 0 auto;width:auto;max-width:100%;padding:0 4px 0 8px}.ec-content{display:flex}.ec-month .ec-content{flex-direction:column;height:100%}.ec-month .ec-uniform .ec-content{overflow:hidden}.ec-list .ec-content{flex-direction:column}.ec-resource{display:flex}.ec-days{display:flex;border-style:none none solid}.ec-days:last-child{border-bottom:none}.ec-month .ec-days,.ec-resource .ec-days{flex:1 0 auto}.ec-month .ec-uniform .ec-days{flex:1 1 0%;min-height:0}.ec-day{border-style:none none none solid}.ec-day.ec-today{background-color:#fcf8e3}.ec-day.ec-highlight{background-color:#e5f7fe}.ec-month .ec-body .ec-day{min-height:5em;position:relative}.ec-month .ec-uniform .ec-day{min-height:0}.ec-month .ec-day:first-child{border-left:none}.ec-day.ec-other-month .ec-day-head{opacity:.3}.ec-list .ec-day{flex:1 0 auto;background-color:#fff;border-style:solid none;padding:8px 14px;font-weight:bold;position:-webkit-sticky;position:sticky;top:0;z-index:2}.ec-list .ec-day:first-child{border-top:none}.ec-month .ec-day-head{text-align:right;padding:4px 4px 3px}.ec-month .ec-day-foot{position:absolute;bottom:0;padding:2px;font-size:.85em}.ec-month .ec-day-foot a{cursor:pointer}.ec-list .ec-day-side{float:right}.ec-list .ec-no-events{text-align:center;padding:5em 0}.ec-events{margin:0 6px 0 0}.ec-week .ec-events,.ec-events.ec-preview{position:relative}.ec-event{display:flex;padding:2px;color:#fff;box-sizing:border-box;box-shadow:0 0 1px 0 #dadce0;background-color:#039be5;border-radius:3px;font-size:.85em;line-height:1.5;z-index:1}.ec-month .ec-event{position:relative;flex-direction:row}.ec-week .ec-event{position:absolute}.ec-list .ec-event{flex-direction:row;padding:8px 14px;color:inherit;background-color:rgba(0,0,0,0);border-radius:0}.ec-event.ec-preview{position:absolute;z-index:1000;width:100%;-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;position:absolute;z-index:0;box-shadow:none;display:none}.ec-day:hover .ec-event.ec-pointer{display:flex}.ec-event-body{display:flex;flex-direction:column;width:100%}.ec-event-tag{width:4px;border-radius:2px;margin-right:8px}.ec-event-time{overflow:hidden;white-space:nowrap;margin:0 0 1px 0;flex-shrink:0}.ec-month .ec-event-time{margin:0 3px 0 0;max-width:100%;text-overflow:ellipsis}.ec-event-title{overflow:hidden}.ec-month .ec-event-title{white-space:nowrap;text-overflow:ellipsis}.ec-week .ec-event-title{position:-webkit-sticky;position:sticky;top:0}.ec-list .ec-event-title{font-size:1rem}.ec-draggable{cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none}.ec-ghost{opacity:.5;-webkit-user-select:none;user-select:none;touch-action:none}.ec-bg-events{position:relative}.ec-bg-event{position:absolute;background-color:#dadce0;opacity:.3;width:100%}.ec-hidden-times{visibility:hidden;overflow-y:hidden;height:0}.ec-time,.ec-line{height:24px}.ec-time{position:relative;line-height:24px;top:-12px;text-align:right;white-space:nowrap}.ec-lines{width:8px}.ec-line:not(:first-child):after{content:"";position:absolute;width:100%;border-bottom:1px solid #dadce0;pointer-events:none}.ec-body:not(.ec-compact) .ec-line:nth-child(even):after{border-bottom-style:dotted}.ec-popup{position:absolute;top:0;width:110%;min-width:180px;z-index:1010;padding:8px 10px 14px;background-color:#fff;border-radius:6px;outline:1px solid rgba(0,0,0,0);box-shadow:0 1px 3px 0 rgba(60,64,67,.3),0 4px 8px 3px rgba(60,64,67,.15)}.ec-popup .ec-day-head{text-align:left;display:flex;justify-content:space-between}.ec-popup .ec-day-head a{cursor:pointer;font-size:1.5em;line-height:.8}.ec-popup .ec-events{margin:0}.ec-extra{position:relative;height:100%;overflow:hidden;margin-left:-6.5px}.ec-now-indicator{position:absolute;z-index:1005;width:100%;border-top:#ea4335 solid 2px;pointer-events:none}.ec-now-indicator:before{background:#ea4335;border-radius:50%;content:"";position:absolute;height:12px;margin-top:-7px;width:12px;pointer-events:none}.ec-resizer{position:absolute;-webkit-user-select:none;user-select:none}.ec-month .ec-resizer{top:0;right:0;bottom:0;width:50%;max-width:8px;cursor:ew-resize}.ec-week .ec-resizer{left:0;right:0;bottom:0;height:50%;max-height:8px;cursor:ns-resize}.ec-dragging{cursor:pointer !important}.ec-resizing-y{cursor:ns-resize !important}.ec-resizing-x{cursor:ew-resize !important}
|
|
1
|
+
.ec-flex{display:flex}.ec-month .ec-body,.ec-days,.ec-day,.ec-day-title,.ec-resource{flex:1 1 0%;min-width:0;max-width:100%}.ec{display:flex;flex-direction:column}.ec ::-webkit-scrollbar{background:#fff}.ec ::-webkit-scrollbar-thumb{border:4px solid #fff;box-shadow:none;background:#dadce0;border-radius:8px;min-height:40px}.ec :hover::-webkit-scrollbar-thumb{background:#bdc1c6}.ec-hidden-scroll{display:none;overflow-y:scroll;visibility:hidden;flex-shrink:0}.ec-with-scroll .ec-hidden-scroll{display:block}.ec-toolbar{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;margin-bottom:1em}.ec-toolbar>*{margin-bottom:-0.5em}.ec-toolbar>*>*{margin-bottom:.5em}.ec-toolbar>*>*:not(:last-child){margin-right:.75em}.ec-title{margin:0}.ec-button{background-color:#fff;border:1px solid #ced4da;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem}.ec-button:not(:disabled){color:#212529;cursor:pointer}.ec-button:not(:disabled):hover,.ec-button.ec-active{background-color:#ececec;border-color:#b1bbc4}.ec-button-group{display:inline-flex}.ec-button-group .ec-button:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.ec-button-group .ec-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.ec-icon{display:inline-block;width:1em}.ec-icon.ec-prev:after,.ec-icon.ec-next:after{content:"";position:relative;width:.5em;height:.5em;border-top:2px solid #212529;border-right:2px solid #212529;display:inline-block}.ec-icon.ec-prev:after{transform:rotate(-135deg) translate(-2px, 2px)}.ec-icon.ec-next:after{transform:rotate(45deg) translate(-2px, 2px)}.ec-header,.ec-all-day,.ec-body,.ec-days,.ec-day{border:1px solid #dadce0}.ec-header{display:flex;flex-shrink:0}.ec-header .ec-resource{flex-direction:column}.ec-header .ec-resource .ec-days{border-top-style:solid}.ec-header .ec-days{border-bottom:none}.ec-header .ec-day{min-height:24px;line-height:24px;text-align:center;overflow:hidden;text-overflow:ellipsis}.ec-all-day{display:flex;flex-shrink:0;border-top:none}.ec-all-day .ec-days{border-bottom:none}.ec-all-day .ec-day{padding-bottom:4px}.ec-all-day .ec-event-time{display:none}.ec-body{position:relative;overflow-x:hidden;overflow-y:auto}.ec-body:not(.ec-list){border-top:none}.ec-sidebar{flex:0 0 auto;width:auto;max-width:100%;padding:0 4px 0 8px;display:flex;flex-direction:column;justify-content:center}.ec-sidebar-title{visibility:hidden;overflow-y:hidden;height:0}.ec-all-day .ec-sidebar-title{visibility:visible;height:auto;padding:8px 0}.ec-content{display:flex}.ec-month .ec-content{flex-direction:column;height:100%}.ec-month .ec-uniform .ec-content{overflow:hidden}.ec-list .ec-content{flex-direction:column}.ec-resource{display:flex}.ec-days{display:flex;border-style:none none solid}.ec-days:last-child{border-bottom:none}.ec-month .ec-days,.ec-resource .ec-days{flex:1 0 auto}.ec-month .ec-uniform .ec-days{flex:1 1 0%;min-height:0}.ec-day{border-style:none none none solid}.ec-day.ec-today{background-color:#fcf8e3}.ec-day.ec-highlight{background-color:#e5f7fe}.ec-month .ec-body .ec-day{min-height:5em;position:relative}.ec-month .ec-uniform .ec-day{min-height:0}.ec-month .ec-day:first-child{border-left:none}.ec-day.ec-other-month .ec-day-head{opacity:.3}.ec-list .ec-day{flex:1 0 auto;background-color:#fff;border-style:solid none;padding:8px 14px;font-weight:bold;position:-webkit-sticky;position:sticky;top:0;z-index:2}.ec-list .ec-day:first-child{border-top:none}.ec-month .ec-day-head{text-align:right;padding:4px 4px 3px}.ec-month .ec-day-foot{position:absolute;bottom:0;padding:2px;font-size:.85em}.ec-month .ec-day-foot a{cursor:pointer}.ec-list .ec-day-side{float:right}.ec-list .ec-no-events{text-align:center;padding:5em 0}.ec-events{margin:0 6px 0 0}.ec-week .ec-events,.ec-events.ec-preview{position:relative}.ec-event{display:flex;padding:2px;color:#fff;box-sizing:border-box;box-shadow:0 0 1px 0 #dadce0;background-color:#039be5;border-radius:3px;font-size:.85em;line-height:1.5;z-index:1}.ec-month .ec-event,.ec-all-day .ec-event{position:relative;flex-direction:row}.ec-week .ec-body .ec-event{position:absolute}.ec-list .ec-event{flex-direction:row;padding:8px 14px;color:inherit;background-color:rgba(0,0,0,0);border-radius:0}.ec-event.ec-preview{position:absolute;z-index:1000;width:100%;-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;position:absolute;z-index:0;box-shadow:none;display:none}.ec-day:hover .ec-event.ec-pointer{display:flex}.ec-event-body{display:flex;flex-direction:column;width:100%}.ec-event-tag{width:4px;border-radius:2px;margin-right:8px}.ec-event-time{overflow:hidden;white-space:nowrap;margin:0 0 1px 0;flex-shrink:0}.ec-month .ec-event-time{margin:0 3px 0 0;max-width:100%;text-overflow:ellipsis}.ec-event-title{overflow:hidden}.ec-month .ec-event-title,.ec-all-day .ec-event-title{white-space:nowrap;text-overflow:ellipsis}.ec-week .ec-body .ec-event-title{position:-webkit-sticky;position:sticky;top:0}.ec-list .ec-event-title{font-size:1rem}.ec-draggable{cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none}.ec-ghost{opacity:.5;-webkit-user-select:none;user-select:none;touch-action:none}.ec-bg-events{position:relative}.ec-bg-event{position:absolute;background-color:#dadce0;opacity:.3;width:100%}.ec-hidden-times{visibility:hidden;overflow-y:hidden;height:0}.ec-time,.ec-line{height:24px}.ec-time{position:relative;line-height:24px;top:-12px;text-align:right;white-space:nowrap}.ec-lines{width:8px}.ec-line:not(:first-child):after{content:"";position:absolute;width:100%;border-bottom:1px solid #dadce0;pointer-events:none}.ec-body:not(.ec-compact) .ec-line:nth-child(even):after{border-bottom-style:dotted}.ec-popup{position:absolute;top:0;width:110%;min-width:180px;z-index:1010;padding:8px 10px 14px;background-color:#fff;border-radius:6px;outline:1px solid rgba(0,0,0,0);box-shadow:0 1px 3px 0 rgba(60,64,67,.3),0 4px 8px 3px rgba(60,64,67,.15)}.ec-popup .ec-day-head{text-align:left;display:flex;justify-content:space-between}.ec-popup .ec-day-head a{cursor:pointer;font-size:1.5em;line-height:.8}.ec-popup .ec-events{margin:0}.ec-extra{position:relative;height:100%;overflow:hidden;margin-left:-6.5px}.ec-now-indicator{position:absolute;z-index:1005;width:100%;border-top:#ea4335 solid 2px;pointer-events:none}.ec-now-indicator:before{background:#ea4335;border-radius:50%;content:"";position:absolute;height:12px;margin-top:-7px;width:12px;pointer-events:none}.ec-resizer{position:absolute;-webkit-user-select:none;user-select:none}.ec-month .ec-resizer,.ec-all-day .ec-resizer{top:0;right:0;bottom:0;width:50%;max-width:8px;cursor:ew-resize}.ec-week .ec-body .ec-resizer{left:0;right:0;bottom:0;height:50%;max-height:8px;cursor:ns-resize}.ec-dragging{cursor:pointer !important}.ec-resizing-y{cursor:ns-resize !important}.ec-resizing-x{cursor:ew-resize !important}
|
package/index.js
CHANGED
|
@@ -5,6 +5,8 @@ import { setMidnight, createDate, createDuration, createEvents, createEventSourc
|
|
|
5
5
|
|
|
6
6
|
function createOptions(plugins) {
|
|
7
7
|
let options = {
|
|
8
|
+
allDayContent: undefined,
|
|
9
|
+
allDaySlot: true,
|
|
8
10
|
buttonText: {
|
|
9
11
|
today: 'today',
|
|
10
12
|
},
|
|
@@ -56,6 +58,7 @@ function createOptions(plugins) {
|
|
|
56
58
|
slotMaxTime: '24:00:00',
|
|
57
59
|
slotMinTime: '00:00:00',
|
|
58
60
|
theme: {
|
|
61
|
+
allDay: 'ec-all-day',
|
|
59
62
|
active: 'ec-active',
|
|
60
63
|
bgEvent: 'ec-bg-event',
|
|
61
64
|
bgEvents: 'ec-bg-events',
|
|
@@ -85,6 +88,7 @@ function createOptions(plugins) {
|
|
|
85
88
|
nowIndicator: 'ec-now-indicator',
|
|
86
89
|
otherMonth: 'ec-other-month',
|
|
87
90
|
sidebar: 'ec-sidebar',
|
|
91
|
+
sidebarTitle: 'ec-sidebar-title',
|
|
88
92
|
today: 'ec-today',
|
|
89
93
|
time: 'ec-time',
|
|
90
94
|
title: 'ec-title',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event-calendar/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"title": "Event Calendar Core package",
|
|
5
5
|
"description": "Full-sized drag & drop event calendar with resource view",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@event-calendar/common": "~0.
|
|
37
|
+
"@event-calendar/common": "~0.11.1",
|
|
38
38
|
"svelte": "^3.47.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/src/index.scss
CHANGED
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
|
|
133
133
|
/* Header */
|
|
134
134
|
.ec-header,
|
|
135
|
+
.ec-all-day,
|
|
135
136
|
.ec-body,
|
|
136
137
|
.ec-days,
|
|
137
138
|
.ec-day {
|
|
@@ -163,6 +164,25 @@
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
/* All Day */
|
|
168
|
+
.ec-all-day {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
border-top: none;
|
|
172
|
+
|
|
173
|
+
.ec-days {
|
|
174
|
+
border-bottom: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ec-day {
|
|
178
|
+
padding-bottom: 4px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ec-event-time {
|
|
182
|
+
display: none;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
166
186
|
/* Body */
|
|
167
187
|
.ec-body {
|
|
168
188
|
position: relative;
|
|
@@ -179,6 +199,21 @@
|
|
|
179
199
|
width: auto;
|
|
180
200
|
max-width: 100%;
|
|
181
201
|
padding: 0 4px 0 8px;
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ec-sidebar-title {
|
|
208
|
+
visibility: hidden;
|
|
209
|
+
overflow-y: hidden;
|
|
210
|
+
height: 0;
|
|
211
|
+
|
|
212
|
+
.ec-all-day & {
|
|
213
|
+
visibility: visible;
|
|
214
|
+
height: auto;
|
|
215
|
+
padding: 8px 0;
|
|
216
|
+
}
|
|
182
217
|
}
|
|
183
218
|
|
|
184
219
|
.ec-content {
|
|
@@ -315,12 +350,13 @@
|
|
|
315
350
|
line-height: 1.5;
|
|
316
351
|
z-index: 1; // put it above the pointer event (for multi-day events in month view)
|
|
317
352
|
|
|
318
|
-
.ec-month
|
|
353
|
+
.ec-month &,
|
|
354
|
+
.ec-all-day & {
|
|
319
355
|
position: relative;
|
|
320
356
|
flex-direction: row;
|
|
321
357
|
}
|
|
322
358
|
|
|
323
|
-
.ec-week & {
|
|
359
|
+
.ec-week .ec-body & {
|
|
324
360
|
position: absolute;
|
|
325
361
|
}
|
|
326
362
|
|
|
@@ -382,12 +418,13 @@
|
|
|
382
418
|
.ec-event-title {
|
|
383
419
|
overflow: hidden;
|
|
384
420
|
|
|
385
|
-
.ec-month
|
|
421
|
+
.ec-month &,
|
|
422
|
+
.ec-all-day & {
|
|
386
423
|
white-space: nowrap;
|
|
387
424
|
text-overflow: ellipsis;
|
|
388
425
|
}
|
|
389
426
|
|
|
390
|
-
.ec-week & {
|
|
427
|
+
.ec-week .ec-body & {
|
|
391
428
|
position: sticky;
|
|
392
429
|
top: 0;
|
|
393
430
|
}
|
|
@@ -514,7 +551,8 @@
|
|
|
514
551
|
position: absolute;
|
|
515
552
|
user-select: none;
|
|
516
553
|
|
|
517
|
-
.ec-month
|
|
554
|
+
.ec-month &,
|
|
555
|
+
.ec-all-day & {
|
|
518
556
|
top: 0;
|
|
519
557
|
right: 0;
|
|
520
558
|
bottom: 0;
|
|
@@ -523,7 +561,7 @@
|
|
|
523
561
|
cursor: ew-resize;
|
|
524
562
|
}
|
|
525
563
|
|
|
526
|
-
.ec-week & {
|
|
564
|
+
.ec-week .ec-body & {
|
|
527
565
|
left: 0;
|
|
528
566
|
right: 0;
|
|
529
567
|
bottom: 0;
|
package/src/storage/options.js
CHANGED
|
@@ -4,6 +4,8 @@ import {is_function} from 'svelte/internal';
|
|
|
4
4
|
|
|
5
5
|
export function createOptions(plugins) {
|
|
6
6
|
let options = {
|
|
7
|
+
allDayContent: undefined,
|
|
8
|
+
allDaySlot: true,
|
|
7
9
|
buttonText: {
|
|
8
10
|
today: 'today',
|
|
9
11
|
},
|
|
@@ -55,6 +57,7 @@ export function createOptions(plugins) {
|
|
|
55
57
|
slotMaxTime: '24:00:00',
|
|
56
58
|
slotMinTime: '00:00:00',
|
|
57
59
|
theme: {
|
|
60
|
+
allDay: 'ec-all-day',
|
|
58
61
|
active: 'ec-active',
|
|
59
62
|
bgEvent: 'ec-bg-event',
|
|
60
63
|
bgEvents: 'ec-bg-events',
|
|
@@ -84,6 +87,7 @@ export function createOptions(plugins) {
|
|
|
84
87
|
nowIndicator: 'ec-now-indicator',
|
|
85
88
|
otherMonth: 'ec-other-month',
|
|
86
89
|
sidebar: 'ec-sidebar',
|
|
90
|
+
sidebarTitle: 'ec-sidebar-title',
|
|
87
91
|
today: 'ec-today',
|
|
88
92
|
time: 'ec-time',
|
|
89
93
|
title: 'ec-title',
|