@event-calendar/core 2.1.0 → 2.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 CHANGED
@@ -26,6 +26,7 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
26
26
  - [dateClick](#dateclick)
27
27
  - [datesAboveResources](#datesaboveresources)
28
28
  - [datesSet](#datesset)
29
+ - [dayCellFormat](#daycellformat)
29
30
  - [dayHeaderFormat](#dayheaderformat)
30
31
  - [dayMaxEvents](#daymaxevents)
31
32
  - [dayPopoverFormat](#daypopoverformat)
@@ -44,9 +45,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
44
45
  - [eventDragStart](#eventdragstart)
45
46
  - [eventDragStop](#eventdragstop)
46
47
  - [eventDrop](#eventdrop)
47
- - [eventDurationEditable](#eventdurationeditable)
48
48
  </td><td>
49
49
 
50
+ - [eventDurationEditable](#eventdurationeditable)
50
51
  - [eventLongPressDelay](#eventlongpressdelay)
51
52
  - [eventMouseEnter](#eventmouseenter)
52
53
  - [eventMouseLeave](#eventmouseleave)
@@ -72,9 +73,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
72
73
  - [longPressDelay](#longpressdelay)
73
74
  - [moreLinkContent](#morelinkcontent)
74
75
  - [noEventsClick](#noeventsclick)
75
- - [noEventsContent](#noeventscontent)
76
76
  </td><td>
77
77
 
78
+ - [noEventsContent](#noeventscontent)
78
79
  - [nowIndicator](#nowindicator)
79
80
  - [pointer](#pointer)
80
81
  - [resources](#resources)
@@ -195,8 +196,8 @@ import '@event-calendar/core/index.css';
195
196
  ### Pre-built browser ready bundle
196
197
  Include the following lines of code in the `<head>` section of your page:
197
198
  ```html
198
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.1.0/event-calendar.min.css">
199
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.1.0/event-calendar.min.js"></script>
199
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.3.0/event-calendar.min.css">
200
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.3.0/event-calendar.min.js"></script>
200
201
  ```
201
202
 
202
203
  <details>
@@ -453,6 +454,29 @@ The current [View](#view-object) object
453
454
  </tr>
454
455
  </table>
455
456
 
457
+ ### dayCellFormat
458
+ - Type `object` or `function`
459
+ - Default `{day: 'numeric'}`
460
+
461
+ Defines the text that is displayed inside the day cell in the `dayGrid` view.
462
+
463
+ 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 a [Content](#content) with the formatted string:
464
+
465
+ ```js
466
+ function (date) {
467
+ // return Content with the formatted date string
468
+ }
469
+ ```
470
+ <table>
471
+ <tr>
472
+ <td>
473
+
474
+ `date`
475
+ </td>
476
+ <td>JavaScript Date object that needs to be formatted</td>
477
+ </tr>
478
+ </table>
479
+
456
480
  ### dayHeaderFormat
457
481
  - Type `object` or `function`
458
482
  - Default `{weekday: 'short', month: 'numeric', day: 'numeric'}`
@@ -1439,7 +1463,7 @@ _a view name like_ `dayGridMonth`
1439
1463
 
1440
1464
  ### height
1441
1465
  - Type `string`
1442
- - Default `'auto'`
1466
+ - Default `undefined`
1443
1467
 
1444
1468
  Defines the height of the entire calendar.
1445
1469
 
@@ -1906,7 +1930,7 @@ This should be a value that can be parsed into a [Duration](#duration-object) ob
1906
1930
 
1907
1931
  ### theme
1908
1932
  - Type `object` or `function`
1909
- - 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', highlight: 'ec-highlight', icon: 'ec-icon', line: 'ec-line', lines: 'ec-lines', 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', selecting: 'ec-selecting', sidebar: 'ec-sidebar', sidebarTitle: 'ec-sidebar-title', time: 'ec-time', title: 'ec-title', today: 'ec-today', toolbar: 'ec-toolbar', uniform: 'ec-uniform', view: '', withScroll: 'ec-with-scroll'}`
1933
+ - 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', highlight: 'ec-highlight', icon: 'ec-icon', line: 'ec-line', lines: 'ec-lines', 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', selecting: 'ec-selecting', sidebar: 'ec-sidebar', sidebarTitle: 'ec-sidebar-title', time: 'ec-time', title: 'ec-title', today: 'ec-today', toolbar: 'ec-toolbar', uniform: 'ec-uniform', view: '', weekdays: ['ec-sun', 'ec-mon', 'ec-tue', 'ec-wed', 'ec-thu', 'ec-fri', 'ec-sat'], withScroll: 'ec-with-scroll'}`
1910
1934
  > Views override the default value as follows:
1911
1935
  > - dayGridMonth `theme => ({...theme, view: 'ec-day-grid ec-month-view'})`
1912
1936
  > - listDay `theme => ({...theme, view: 'ec-list ec-day-view'})`
package/index.js CHANGED
@@ -661,7 +661,7 @@ function createOptions(plugins) {
661
661
  center: '',
662
662
  end: 'today prev,next'
663
663
  },
664
- height: 'auto',
664
+ height: undefined,
665
665
  hiddenDays: [],
666
666
  highlightedDates: [], // ec option
667
667
  lazyFetching: true,
@@ -715,6 +715,7 @@ function createOptions(plugins) {
715
715
  title: 'ec-title',
716
716
  toolbar: 'ec-toolbar',
717
717
  view: '',
718
+ weekdays: ['ec-sun', 'ec-mon', 'ec-tue', 'ec-wed', 'ec-thu', 'ec-fri', 'ec-sat'],
718
719
  withScroll: 'ec-with-scroll'
719
720
  },
720
721
  titleFormat: {
@@ -2216,7 +2217,7 @@ function create_fragment(ctx) {
2216
2217
  attr(div, "class", div_class_value);
2217
2218
  }
2218
2219
 
2219
- if (!current || dirty[0] & /*$height*/ 8) {
2220
+ if (dirty[0] & /*$height*/ 8) {
2220
2221
  set_style(div, "height", /*$height*/ ctx[3]);
2221
2222
  }
2222
2223
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "title": "Event Calendar Core package",
5
5
  "description": "Full-sized drag & drop event calendar with resource view",
6
6
  "keywords": [
@@ -131,7 +131,7 @@
131
131
 
132
132
  <div
133
133
  class="{$theme.calendar} {$theme.view}{$_scrollable ? ' ' + $theme.withScroll : ''}{$_iClass ? ' ' + $theme[$_iClass] : ''}"
134
- style="height: {$height}"
134
+ style:height={$height}
135
135
  >
136
136
  <Toolbar/>
137
137
  <svelte:component this={$_viewComponent}/>
@@ -38,7 +38,7 @@ export function createOptions(plugins) {
38
38
  center: '',
39
39
  end: 'today prev,next'
40
40
  },
41
- height: 'auto',
41
+ height: undefined,
42
42
  hiddenDays: [],
43
43
  highlightedDates: [], // ec option
44
44
  lazyFetching: true,
@@ -92,6 +92,7 @@ export function createOptions(plugins) {
92
92
  title: 'ec-title',
93
93
  toolbar: 'ec-toolbar',
94
94
  view: '',
95
+ weekdays: ['ec-sun', 'ec-mon', 'ec-tue', 'ec-wed', 'ec-thu', 'ec-fri', 'ec-sat'],
95
96
  withScroll: 'ec-with-scroll'
96
97
  },
97
98
  titleFormat: {