@fullcalendar/list 4.0.1 → 4.4.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 +8 -0
- package/main.css +44 -27
- package/main.d.ts +16 -29
- package/main.esm.js +348 -0
- package/main.js +53 -38
- package/main.js.map +1 -0
- package/main.min.css +1 -5
- package/main.min.js +2 -16
- package/package.json +8 -6
package/README.md
ADDED
package/main.css
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
@fullcalendar/list v4.0.1
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2019 Adam Shaw
|
|
5
|
-
*/
|
|
6
1
|
/* List View
|
|
7
2
|
--------------------------------------------------------------------------------------------------*/
|
|
8
3
|
/* possibly reusable */
|
|
@@ -10,73 +5,91 @@ Docs & License: https://fullcalendar.io/
|
|
|
10
5
|
display: inline-block;
|
|
11
6
|
width: 10px;
|
|
12
7
|
height: 10px;
|
|
13
|
-
border-radius: 5px;
|
|
8
|
+
border-radius: 5px;
|
|
9
|
+
}
|
|
14
10
|
|
|
15
11
|
/* view wrapper */
|
|
16
12
|
.fc-rtl .fc-list-view {
|
|
17
13
|
direction: rtl;
|
|
18
|
-
/* unlike core views, leverage browser RTL */
|
|
14
|
+
/* unlike core views, leverage browser RTL */
|
|
15
|
+
}
|
|
19
16
|
|
|
20
17
|
.fc-list-view {
|
|
21
18
|
border-width: 1px;
|
|
22
|
-
border-style: solid;
|
|
19
|
+
border-style: solid;
|
|
20
|
+
}
|
|
23
21
|
|
|
24
22
|
/* table resets */
|
|
25
23
|
.fc .fc-list-table {
|
|
26
24
|
table-layout: auto;
|
|
27
|
-
/* for shrinkwrapping cell content */
|
|
25
|
+
/* for shrinkwrapping cell content */
|
|
26
|
+
}
|
|
28
27
|
|
|
29
28
|
.fc-list-table td {
|
|
30
29
|
border-width: 1px 0 0;
|
|
31
|
-
padding: 8px 14px;
|
|
30
|
+
padding: 8px 14px;
|
|
31
|
+
}
|
|
32
32
|
|
|
33
33
|
.fc-list-table tr:first-child td {
|
|
34
|
-
border-top-width: 0;
|
|
34
|
+
border-top-width: 0;
|
|
35
|
+
}
|
|
35
36
|
|
|
36
37
|
/* day headings with the list */
|
|
37
38
|
.fc-list-heading {
|
|
38
|
-
border-bottom-width: 1px;
|
|
39
|
+
border-bottom-width: 1px;
|
|
40
|
+
}
|
|
39
41
|
|
|
40
42
|
.fc-list-heading td {
|
|
41
|
-
font-weight: bold;
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
.fc-ltr .fc-list-heading-main {
|
|
44
|
-
float: left;
|
|
47
|
+
float: left;
|
|
48
|
+
}
|
|
45
49
|
|
|
46
50
|
.fc-ltr .fc-list-heading-alt {
|
|
47
|
-
float: right;
|
|
51
|
+
float: right;
|
|
52
|
+
}
|
|
48
53
|
|
|
49
54
|
.fc-rtl .fc-list-heading-main {
|
|
50
|
-
float: right;
|
|
55
|
+
float: right;
|
|
56
|
+
}
|
|
51
57
|
|
|
52
58
|
.fc-rtl .fc-list-heading-alt {
|
|
53
|
-
float: left;
|
|
59
|
+
float: left;
|
|
60
|
+
}
|
|
54
61
|
|
|
55
62
|
/* event list items */
|
|
56
63
|
.fc-list-item.fc-has-url {
|
|
57
64
|
cursor: pointer;
|
|
58
|
-
/* whole row will be clickable */
|
|
65
|
+
/* whole row will be clickable */
|
|
66
|
+
}
|
|
59
67
|
|
|
60
68
|
.fc-list-item-marker,
|
|
61
69
|
.fc-list-item-time {
|
|
62
70
|
white-space: nowrap;
|
|
63
|
-
width: 1px;
|
|
71
|
+
width: 1px;
|
|
72
|
+
}
|
|
64
73
|
|
|
65
74
|
/* make the dot closer to the event title */
|
|
66
75
|
.fc-ltr .fc-list-item-marker {
|
|
67
|
-
padding-right: 0;
|
|
76
|
+
padding-right: 0;
|
|
77
|
+
}
|
|
68
78
|
|
|
69
79
|
.fc-rtl .fc-list-item-marker {
|
|
70
|
-
padding-left: 0;
|
|
80
|
+
padding-left: 0;
|
|
81
|
+
}
|
|
71
82
|
|
|
72
83
|
.fc-list-item-title a {
|
|
73
84
|
/* every event title cell has an <a> tag */
|
|
74
85
|
text-decoration: none;
|
|
75
|
-
color: inherit;
|
|
86
|
+
color: inherit;
|
|
87
|
+
}
|
|
76
88
|
|
|
77
89
|
.fc-list-item-title a[href]:hover {
|
|
78
90
|
/* hover effect only on titles with hrefs */
|
|
79
|
-
text-decoration: underline;
|
|
91
|
+
text-decoration: underline;
|
|
92
|
+
}
|
|
80
93
|
|
|
81
94
|
/* message when no events */
|
|
82
95
|
.fc-list-empty-wrap2 {
|
|
@@ -84,18 +97,22 @@ Docs & License: https://fullcalendar.io/
|
|
|
84
97
|
top: 0;
|
|
85
98
|
left: 0;
|
|
86
99
|
right: 0;
|
|
87
|
-
bottom: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
}
|
|
88
102
|
|
|
89
103
|
.fc-list-empty-wrap1 {
|
|
90
104
|
width: 100%;
|
|
91
105
|
height: 100%;
|
|
92
|
-
display: table;
|
|
106
|
+
display: table;
|
|
107
|
+
}
|
|
93
108
|
|
|
94
109
|
.fc-list-empty {
|
|
95
110
|
display: table-cell;
|
|
96
111
|
vertical-align: middle;
|
|
97
|
-
text-align: center;
|
|
112
|
+
text-align: center;
|
|
113
|
+
}
|
|
98
114
|
|
|
99
115
|
.fc-unthemed .fc-list-empty {
|
|
100
116
|
/* theme will provide own background */
|
|
101
|
-
background-color: #eee;
|
|
117
|
+
background-color: #eee;
|
|
118
|
+
}
|
package/main.d.ts
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
renderSegHtml(seg: Seg): string;
|
|
11
|
-
computeEventTimeFormat(): {
|
|
12
|
-
hour: string;
|
|
13
|
-
minute: string;
|
|
14
|
-
meridiem: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
1
|
+
// Generated by dts-bundle v0.7.3-fork.1
|
|
2
|
+
// Dependencies for this module:
|
|
3
|
+
// ../../../../../@fullcalendar/core
|
|
4
|
+
|
|
5
|
+
declare module '@fullcalendar/list' {
|
|
6
|
+
import ListView from '@fullcalendar/list/ListView';
|
|
7
|
+
export { ListView };
|
|
8
|
+
const _default: import("@fullcalendar/core").PluginDef;
|
|
9
|
+
export default _default;
|
|
17
10
|
}
|
|
18
11
|
|
|
19
|
-
declare module
|
|
20
|
-
import { View, ViewProps, ScrollComponent, DateMarker, DateRange,
|
|
12
|
+
declare module '@fullcalendar/list/ListView' {
|
|
13
|
+
import { View, ViewProps, ScrollComponent, DateMarker, DateRange, ComponentContext, EventUiHash, EventRenderRange, EventStore, Seg, ViewSpec } from '@fullcalendar/core';
|
|
21
14
|
export { ListView as default, ListView };
|
|
22
15
|
class ListView extends View {
|
|
23
16
|
scroller: ScrollComponent;
|
|
24
17
|
contentEl: HTMLElement;
|
|
25
18
|
dayDates: DateMarker[];
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
constructor(context: ComponentContext, viewSpec: ViewSpec, dateProfileGenerator: DateProfileGenerator, parentEl: HTMLElement);
|
|
30
|
-
render(props: ViewProps): void;
|
|
19
|
+
constructor(viewSpec: ViewSpec, parentEl: HTMLElement);
|
|
20
|
+
firstContext(context: ComponentContext): void;
|
|
21
|
+
render(props: ViewProps, context: ComponentContext): void;
|
|
31
22
|
destroy(): void;
|
|
23
|
+
_renderSkeleton(context: ComponentContext): void;
|
|
24
|
+
_unrenderSkeleton(): void;
|
|
32
25
|
updateSize(isResize: any, viewHeight: any, isAuto: any): void;
|
|
33
26
|
computeScrollerHeight(viewHeight: any): number;
|
|
34
27
|
_eventStoreToSegs(eventStore: EventStore, eventUiBases: EventUiHash, dayRanges: DateRange[]): Seg[];
|
|
@@ -41,9 +34,3 @@ declare module "@fullcalendar/list/ListView" {
|
|
|
41
34
|
}
|
|
42
35
|
}
|
|
43
36
|
|
|
44
|
-
declare module "@fullcalendar/list" {
|
|
45
|
-
import ListView from "@fullcalendar/list/ListView";
|
|
46
|
-
export { ListView };
|
|
47
|
-
const _default_8: import("@fullcalendar/core/plugin-system").PluginDef;
|
|
48
|
-
export default _default_8;
|
|
49
|
-
}
|
package/main.esm.js
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
FullCalendar List View Plugin v4.4.0
|
|
3
|
+
Docs & License: https://fullcalendar.io/
|
|
4
|
+
(c) 2019 Adam Shaw
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { getAllDayHtml, isMultiDayRange, htmlEscape, FgEventRenderer, memoize, memoizeRendering, ScrollComponent, subtractInnerElHeight, sliceEventStore, intersectRanges, htmlToElement, createFormatter, createElement, buildGotoAnchorHtml, View, startOfDay, addDays, createPlugin } from '@fullcalendar/core';
|
|
8
|
+
|
|
9
|
+
/*! *****************************************************************************
|
|
10
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
12
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
13
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
|
|
15
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
17
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
18
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
19
|
+
|
|
20
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
21
|
+
and limitations under the License.
|
|
22
|
+
***************************************************************************** */
|
|
23
|
+
/* global Reflect, Promise */
|
|
24
|
+
|
|
25
|
+
var extendStatics = function(d, b) {
|
|
26
|
+
extendStatics = Object.setPrototypeOf ||
|
|
27
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
28
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
29
|
+
return extendStatics(d, b);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function __extends(d, b) {
|
|
33
|
+
extendStatics(d, b);
|
|
34
|
+
function __() { this.constructor = d; }
|
|
35
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var ListEventRenderer = /** @class */ (function (_super) {
|
|
39
|
+
__extends(ListEventRenderer, _super);
|
|
40
|
+
function ListEventRenderer(listView) {
|
|
41
|
+
var _this = _super.call(this) || this;
|
|
42
|
+
_this.listView = listView;
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
ListEventRenderer.prototype.attachSegs = function (segs) {
|
|
46
|
+
if (!segs.length) {
|
|
47
|
+
this.listView.renderEmptyMessage();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.listView.renderSegList(segs);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
ListEventRenderer.prototype.detachSegs = function () {
|
|
54
|
+
};
|
|
55
|
+
// generates the HTML for a single event row
|
|
56
|
+
ListEventRenderer.prototype.renderSegHtml = function (seg) {
|
|
57
|
+
var _a = this.context, theme = _a.theme, options = _a.options;
|
|
58
|
+
var eventRange = seg.eventRange;
|
|
59
|
+
var eventDef = eventRange.def;
|
|
60
|
+
var eventInstance = eventRange.instance;
|
|
61
|
+
var eventUi = eventRange.ui;
|
|
62
|
+
var url = eventDef.url;
|
|
63
|
+
var classes = ['fc-list-item'].concat(eventUi.classNames);
|
|
64
|
+
var bgColor = eventUi.backgroundColor;
|
|
65
|
+
var timeHtml;
|
|
66
|
+
if (eventDef.allDay) {
|
|
67
|
+
timeHtml = getAllDayHtml(options);
|
|
68
|
+
}
|
|
69
|
+
else if (isMultiDayRange(eventRange.range)) {
|
|
70
|
+
if (seg.isStart) {
|
|
71
|
+
timeHtml = htmlEscape(this._getTimeText(eventInstance.range.start, seg.end, false // allDay
|
|
72
|
+
));
|
|
73
|
+
}
|
|
74
|
+
else if (seg.isEnd) {
|
|
75
|
+
timeHtml = htmlEscape(this._getTimeText(seg.start, eventInstance.range.end, false // allDay
|
|
76
|
+
));
|
|
77
|
+
}
|
|
78
|
+
else { // inner segment that lasts the whole day
|
|
79
|
+
timeHtml = getAllDayHtml(options);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
// Display the normal time text for the *event's* times
|
|
84
|
+
timeHtml = htmlEscape(this.getTimeText(eventRange));
|
|
85
|
+
}
|
|
86
|
+
if (url) {
|
|
87
|
+
classes.push('fc-has-url');
|
|
88
|
+
}
|
|
89
|
+
return '<tr class="' + classes.join(' ') + '">' +
|
|
90
|
+
(this.displayEventTime ?
|
|
91
|
+
'<td class="fc-list-item-time ' + theme.getClass('widgetContent') + '">' +
|
|
92
|
+
(timeHtml || '') +
|
|
93
|
+
'</td>' :
|
|
94
|
+
'') +
|
|
95
|
+
'<td class="fc-list-item-marker ' + theme.getClass('widgetContent') + '">' +
|
|
96
|
+
'<span class="fc-event-dot"' +
|
|
97
|
+
(bgColor ?
|
|
98
|
+
' style="background-color:' + bgColor + '"' :
|
|
99
|
+
'') +
|
|
100
|
+
'></span>' +
|
|
101
|
+
'</td>' +
|
|
102
|
+
'<td class="fc-list-item-title ' + theme.getClass('widgetContent') + '">' +
|
|
103
|
+
'<a' + (url ? ' href="' + htmlEscape(url) + '"' : '') + '>' +
|
|
104
|
+
htmlEscape(eventDef.title || '') +
|
|
105
|
+
'</a>' +
|
|
106
|
+
'</td>' +
|
|
107
|
+
'</tr>';
|
|
108
|
+
};
|
|
109
|
+
// like "4:00am"
|
|
110
|
+
ListEventRenderer.prototype.computeEventTimeFormat = function () {
|
|
111
|
+
return {
|
|
112
|
+
hour: 'numeric',
|
|
113
|
+
minute: '2-digit',
|
|
114
|
+
meridiem: 'short'
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
return ListEventRenderer;
|
|
118
|
+
}(FgEventRenderer));
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
Responsible for the scroller, and forwarding event-related actions into the "grid".
|
|
122
|
+
*/
|
|
123
|
+
var ListView = /** @class */ (function (_super) {
|
|
124
|
+
__extends(ListView, _super);
|
|
125
|
+
function ListView(viewSpec, parentEl) {
|
|
126
|
+
var _this = _super.call(this, viewSpec, parentEl) || this;
|
|
127
|
+
_this.computeDateVars = memoize(computeDateVars);
|
|
128
|
+
_this.eventStoreToSegs = memoize(_this._eventStoreToSegs);
|
|
129
|
+
_this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);
|
|
130
|
+
var eventRenderer = _this.eventRenderer = new ListEventRenderer(_this);
|
|
131
|
+
_this.renderContent = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [_this.renderSkeleton]);
|
|
132
|
+
return _this;
|
|
133
|
+
}
|
|
134
|
+
ListView.prototype.firstContext = function (context) {
|
|
135
|
+
context.calendar.registerInteractiveComponent(this, {
|
|
136
|
+
el: this.el
|
|
137
|
+
// TODO: make aware that it doesn't do Hits
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
ListView.prototype.render = function (props, context) {
|
|
141
|
+
_super.prototype.render.call(this, props, context);
|
|
142
|
+
var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;
|
|
143
|
+
this.dayDates = dayDates;
|
|
144
|
+
this.renderSkeleton(context);
|
|
145
|
+
this.renderContent(context, this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
|
|
146
|
+
};
|
|
147
|
+
ListView.prototype.destroy = function () {
|
|
148
|
+
_super.prototype.destroy.call(this);
|
|
149
|
+
this.renderSkeleton.unrender();
|
|
150
|
+
this.renderContent.unrender();
|
|
151
|
+
this.context.calendar.unregisterInteractiveComponent(this);
|
|
152
|
+
};
|
|
153
|
+
ListView.prototype._renderSkeleton = function (context) {
|
|
154
|
+
var theme = context.theme;
|
|
155
|
+
this.el.classList.add('fc-list-view');
|
|
156
|
+
var listViewClassNames = (theme.getClass('listView') || '').split(' '); // wish we didn't have to do this
|
|
157
|
+
for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {
|
|
158
|
+
var listViewClassName = listViewClassNames_1[_i];
|
|
159
|
+
if (listViewClassName) { // in case input was empty string
|
|
160
|
+
this.el.classList.add(listViewClassName);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
this.scroller = new ScrollComponent('hidden', // overflow x
|
|
164
|
+
'auto' // overflow y
|
|
165
|
+
);
|
|
166
|
+
this.el.appendChild(this.scroller.el);
|
|
167
|
+
this.contentEl = this.scroller.el; // shortcut
|
|
168
|
+
};
|
|
169
|
+
ListView.prototype._unrenderSkeleton = function () {
|
|
170
|
+
// TODO: remove classNames
|
|
171
|
+
this.scroller.destroy(); // will remove the Grid too
|
|
172
|
+
};
|
|
173
|
+
ListView.prototype.updateSize = function (isResize, viewHeight, isAuto) {
|
|
174
|
+
_super.prototype.updateSize.call(this, isResize, viewHeight, isAuto);
|
|
175
|
+
this.eventRenderer.computeSizes(isResize);
|
|
176
|
+
this.eventRenderer.assignSizes(isResize);
|
|
177
|
+
this.scroller.clear(); // sets height to 'auto' and clears overflow
|
|
178
|
+
if (!isAuto) {
|
|
179
|
+
this.scroller.setHeight(this.computeScrollerHeight(viewHeight));
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
ListView.prototype.computeScrollerHeight = function (viewHeight) {
|
|
183
|
+
return viewHeight -
|
|
184
|
+
subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
|
|
185
|
+
};
|
|
186
|
+
ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
|
|
187
|
+
return this.eventRangesToSegs(sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.nextDayThreshold).fg, dayRanges);
|
|
188
|
+
};
|
|
189
|
+
ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
|
|
190
|
+
var segs = [];
|
|
191
|
+
for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {
|
|
192
|
+
var eventRange = eventRanges_1[_i];
|
|
193
|
+
segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges));
|
|
194
|
+
}
|
|
195
|
+
return segs;
|
|
196
|
+
};
|
|
197
|
+
ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
|
|
198
|
+
var _a = this.context, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
|
|
199
|
+
var range = eventRange.range;
|
|
200
|
+
var allDay = eventRange.def.allDay;
|
|
201
|
+
var dayIndex;
|
|
202
|
+
var segRange;
|
|
203
|
+
var seg;
|
|
204
|
+
var segs = [];
|
|
205
|
+
for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex++) {
|
|
206
|
+
segRange = intersectRanges(range, dayRanges[dayIndex]);
|
|
207
|
+
if (segRange) {
|
|
208
|
+
seg = {
|
|
209
|
+
component: this,
|
|
210
|
+
eventRange: eventRange,
|
|
211
|
+
start: segRange.start,
|
|
212
|
+
end: segRange.end,
|
|
213
|
+
isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),
|
|
214
|
+
isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),
|
|
215
|
+
dayIndex: dayIndex
|
|
216
|
+
};
|
|
217
|
+
segs.push(seg);
|
|
218
|
+
// detect when range won't go fully into the next day,
|
|
219
|
+
// and mutate the latest seg to the be the end.
|
|
220
|
+
if (!seg.isEnd && !allDay &&
|
|
221
|
+
dayIndex + 1 < dayRanges.length &&
|
|
222
|
+
range.end <
|
|
223
|
+
dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) {
|
|
224
|
+
seg.end = range.end;
|
|
225
|
+
seg.isEnd = true;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return segs;
|
|
231
|
+
};
|
|
232
|
+
ListView.prototype.renderEmptyMessage = function () {
|
|
233
|
+
this.contentEl.innerHTML =
|
|
234
|
+
'<div class="fc-list-empty-wrap2">' + // TODO: try less wraps
|
|
235
|
+
'<div class="fc-list-empty-wrap1">' +
|
|
236
|
+
'<div class="fc-list-empty">' +
|
|
237
|
+
htmlEscape(this.context.options.noEventsMessage) +
|
|
238
|
+
'</div>' +
|
|
239
|
+
'</div>' +
|
|
240
|
+
'</div>';
|
|
241
|
+
};
|
|
242
|
+
// called by ListEventRenderer
|
|
243
|
+
ListView.prototype.renderSegList = function (allSegs) {
|
|
244
|
+
var theme = this.context.theme;
|
|
245
|
+
var segsByDay = this.groupSegsByDay(allSegs); // sparse array
|
|
246
|
+
var dayIndex;
|
|
247
|
+
var daySegs;
|
|
248
|
+
var i;
|
|
249
|
+
var tableEl = htmlToElement('<table class="fc-list-table ' + theme.getClass('tableList') + '"><tbody></tbody></table>');
|
|
250
|
+
var tbodyEl = tableEl.querySelector('tbody');
|
|
251
|
+
for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {
|
|
252
|
+
daySegs = segsByDay[dayIndex];
|
|
253
|
+
if (daySegs) { // sparse array, so might be undefined
|
|
254
|
+
// append a day header
|
|
255
|
+
tbodyEl.appendChild(this.buildDayHeaderRow(this.dayDates[dayIndex]));
|
|
256
|
+
daySegs = this.eventRenderer.sortEventSegs(daySegs);
|
|
257
|
+
for (i = 0; i < daySegs.length; i++) {
|
|
258
|
+
tbodyEl.appendChild(daySegs[i].el); // append event row
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
this.contentEl.innerHTML = '';
|
|
263
|
+
this.contentEl.appendChild(tableEl);
|
|
264
|
+
};
|
|
265
|
+
// Returns a sparse array of arrays, segs grouped by their dayIndex
|
|
266
|
+
ListView.prototype.groupSegsByDay = function (segs) {
|
|
267
|
+
var segsByDay = []; // sparse array
|
|
268
|
+
var i;
|
|
269
|
+
var seg;
|
|
270
|
+
for (i = 0; i < segs.length; i++) {
|
|
271
|
+
seg = segs[i];
|
|
272
|
+
(segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))
|
|
273
|
+
.push(seg);
|
|
274
|
+
}
|
|
275
|
+
return segsByDay;
|
|
276
|
+
};
|
|
277
|
+
// generates the HTML for the day headers that live amongst the event rows
|
|
278
|
+
ListView.prototype.buildDayHeaderRow = function (dayDate) {
|
|
279
|
+
var _a = this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options;
|
|
280
|
+
var mainFormat = createFormatter(options.listDayFormat); // TODO: cache
|
|
281
|
+
var altFormat = createFormatter(options.listDayAltFormat); // TODO: cache
|
|
282
|
+
return createElement('tr', {
|
|
283
|
+
className: 'fc-list-heading',
|
|
284
|
+
'data-date': dateEnv.formatIso(dayDate, { omitTime: true })
|
|
285
|
+
}, '<td class="' + (theme.getClass('tableListHeading') ||
|
|
286
|
+
theme.getClass('widgetHeader')) + '" colspan="3">' +
|
|
287
|
+
(mainFormat ?
|
|
288
|
+
buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-main' }, htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
|
|
289
|
+
) :
|
|
290
|
+
'') +
|
|
291
|
+
(altFormat ?
|
|
292
|
+
buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-alt' }, htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
|
|
293
|
+
) :
|
|
294
|
+
'') +
|
|
295
|
+
'</td>');
|
|
296
|
+
};
|
|
297
|
+
return ListView;
|
|
298
|
+
}(View));
|
|
299
|
+
ListView.prototype.fgSegSelector = '.fc-list-item'; // which elements accept event actions
|
|
300
|
+
function computeDateVars(dateProfile) {
|
|
301
|
+
var dayStart = startOfDay(dateProfile.renderRange.start);
|
|
302
|
+
var viewEnd = dateProfile.renderRange.end;
|
|
303
|
+
var dayDates = [];
|
|
304
|
+
var dayRanges = [];
|
|
305
|
+
while (dayStart < viewEnd) {
|
|
306
|
+
dayDates.push(dayStart);
|
|
307
|
+
dayRanges.push({
|
|
308
|
+
start: dayStart,
|
|
309
|
+
end: addDays(dayStart, 1)
|
|
310
|
+
});
|
|
311
|
+
dayStart = addDays(dayStart, 1);
|
|
312
|
+
}
|
|
313
|
+
return { dayDates: dayDates, dayRanges: dayRanges };
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
var main = createPlugin({
|
|
317
|
+
views: {
|
|
318
|
+
list: {
|
|
319
|
+
class: ListView,
|
|
320
|
+
buttonTextKey: 'list',
|
|
321
|
+
listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' } // like "January 1, 2016"
|
|
322
|
+
},
|
|
323
|
+
listDay: {
|
|
324
|
+
type: 'list',
|
|
325
|
+
duration: { days: 1 },
|
|
326
|
+
listDayFormat: { weekday: 'long' } // day-of-week is all we need. full date is probably in header
|
|
327
|
+
},
|
|
328
|
+
listWeek: {
|
|
329
|
+
type: 'list',
|
|
330
|
+
duration: { weeks: 1 },
|
|
331
|
+
listDayFormat: { weekday: 'long' },
|
|
332
|
+
listDayAltFormat: { month: 'long', day: 'numeric', year: 'numeric' }
|
|
333
|
+
},
|
|
334
|
+
listMonth: {
|
|
335
|
+
type: 'list',
|
|
336
|
+
duration: { month: 1 },
|
|
337
|
+
listDayAltFormat: { weekday: 'long' } // day-of-week is nice-to-have
|
|
338
|
+
},
|
|
339
|
+
listYear: {
|
|
340
|
+
type: 'list',
|
|
341
|
+
duration: { year: 1 },
|
|
342
|
+
listDayAltFormat: { weekday: 'long' } // day-of-week is nice-to-have
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
export default main;
|
|
348
|
+
export { ListView };
|
package/main.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
|
|
2
|
+
FullCalendar List View Plugin v4.4.0
|
|
3
3
|
Docs & License: https://fullcalendar.io/
|
|
4
4
|
(c) 2019 Adam Shaw
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
(function (global, factory) {
|
|
7
8
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/core')) :
|
|
8
9
|
typeof define === 'function' && define.amd ? define(['exports', '@fullcalendar/core'], factory) :
|
|
@@ -41,7 +42,7 @@ Docs & License: https://fullcalendar.io/
|
|
|
41
42
|
var ListEventRenderer = /** @class */ (function (_super) {
|
|
42
43
|
__extends(ListEventRenderer, _super);
|
|
43
44
|
function ListEventRenderer(listView) {
|
|
44
|
-
var _this = _super.call(this
|
|
45
|
+
var _this = _super.call(this) || this;
|
|
45
46
|
_this.listView = listView;
|
|
46
47
|
return _this;
|
|
47
48
|
}
|
|
@@ -57,7 +58,7 @@ Docs & License: https://fullcalendar.io/
|
|
|
57
58
|
};
|
|
58
59
|
// generates the HTML for a single event row
|
|
59
60
|
ListEventRenderer.prototype.renderSegHtml = function (seg) {
|
|
60
|
-
var _a = this.context,
|
|
61
|
+
var _a = this.context, theme = _a.theme, options = _a.options;
|
|
61
62
|
var eventRange = seg.eventRange;
|
|
62
63
|
var eventDef = eventRange.def;
|
|
63
64
|
var eventInstance = eventRange.instance;
|
|
@@ -67,7 +68,7 @@ Docs & License: https://fullcalendar.io/
|
|
|
67
68
|
var bgColor = eventUi.backgroundColor;
|
|
68
69
|
var timeHtml;
|
|
69
70
|
if (eventDef.allDay) {
|
|
70
|
-
timeHtml = core.getAllDayHtml(
|
|
71
|
+
timeHtml = core.getAllDayHtml(options);
|
|
71
72
|
}
|
|
72
73
|
else if (core.isMultiDayRange(eventRange.range)) {
|
|
73
74
|
if (seg.isStart) {
|
|
@@ -79,7 +80,7 @@ Docs & License: https://fullcalendar.io/
|
|
|
79
80
|
));
|
|
80
81
|
}
|
|
81
82
|
else { // inner segment that lasts the whole day
|
|
82
|
-
timeHtml = core.getAllDayHtml(
|
|
83
|
+
timeHtml = core.getAllDayHtml(options);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
else {
|
|
@@ -125,40 +126,53 @@ Docs & License: https://fullcalendar.io/
|
|
|
125
126
|
*/
|
|
126
127
|
var ListView = /** @class */ (function (_super) {
|
|
127
128
|
__extends(ListView, _super);
|
|
128
|
-
function ListView(
|
|
129
|
-
var _this = _super.call(this,
|
|
129
|
+
function ListView(viewSpec, parentEl) {
|
|
130
|
+
var _this = _super.call(this, viewSpec, parentEl) || this;
|
|
130
131
|
_this.computeDateVars = core.memoize(computeDateVars);
|
|
131
132
|
_this.eventStoreToSegs = core.memoize(_this._eventStoreToSegs);
|
|
133
|
+
_this.renderSkeleton = core.memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);
|
|
132
134
|
var eventRenderer = _this.eventRenderer = new ListEventRenderer(_this);
|
|
133
|
-
_this.renderContent = core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer));
|
|
134
|
-
_this
|
|
135
|
-
|
|
135
|
+
_this.renderContent = core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [_this.renderSkeleton]);
|
|
136
|
+
return _this;
|
|
137
|
+
}
|
|
138
|
+
ListView.prototype.firstContext = function (context) {
|
|
139
|
+
context.calendar.registerInteractiveComponent(this, {
|
|
140
|
+
el: this.el
|
|
141
|
+
// TODO: make aware that it doesn't do Hits
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
ListView.prototype.render = function (props, context) {
|
|
145
|
+
_super.prototype.render.call(this, props, context);
|
|
146
|
+
var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;
|
|
147
|
+
this.dayDates = dayDates;
|
|
148
|
+
this.renderSkeleton(context);
|
|
149
|
+
this.renderContent(context, this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
|
|
150
|
+
};
|
|
151
|
+
ListView.prototype.destroy = function () {
|
|
152
|
+
_super.prototype.destroy.call(this);
|
|
153
|
+
this.renderSkeleton.unrender();
|
|
154
|
+
this.renderContent.unrender();
|
|
155
|
+
this.context.calendar.unregisterInteractiveComponent(this);
|
|
156
|
+
};
|
|
157
|
+
ListView.prototype._renderSkeleton = function (context) {
|
|
158
|
+
var theme = context.theme;
|
|
159
|
+
this.el.classList.add('fc-list-view');
|
|
160
|
+
var listViewClassNames = (theme.getClass('listView') || '').split(' '); // wish we didn't have to do this
|
|
136
161
|
for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {
|
|
137
162
|
var listViewClassName = listViewClassNames_1[_i];
|
|
138
163
|
if (listViewClassName) { // in case input was empty string
|
|
139
|
-
|
|
164
|
+
this.el.classList.add(listViewClassName);
|
|
140
165
|
}
|
|
141
166
|
}
|
|
142
|
-
|
|
167
|
+
this.scroller = new core.ScrollComponent('hidden', // overflow x
|
|
143
168
|
'auto' // overflow y
|
|
144
169
|
);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
context.calendar.registerInteractiveComponent(_this, {
|
|
148
|
-
el: _this.el
|
|
149
|
-
// TODO: make aware that it doesn't do Hits
|
|
150
|
-
});
|
|
151
|
-
return _this;
|
|
152
|
-
}
|
|
153
|
-
ListView.prototype.render = function (props) {
|
|
154
|
-
var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;
|
|
155
|
-
this.dayDates = dayDates;
|
|
156
|
-
this.renderContent(this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
|
|
170
|
+
this.el.appendChild(this.scroller.el);
|
|
171
|
+
this.contentEl = this.scroller.el; // shortcut
|
|
157
172
|
};
|
|
158
|
-
ListView.prototype.
|
|
159
|
-
|
|
173
|
+
ListView.prototype._unrenderSkeleton = function () {
|
|
174
|
+
// TODO: remove classNames
|
|
160
175
|
this.scroller.destroy(); // will remove the Grid too
|
|
161
|
-
this.calendar.unregisterInteractiveComponent(this);
|
|
162
176
|
};
|
|
163
177
|
ListView.prototype.updateSize = function (isResize, viewHeight, isAuto) {
|
|
164
178
|
_super.prototype.updateSize.call(this, isResize, viewHeight, isAuto);
|
|
@@ -174,7 +188,7 @@ Docs & License: https://fullcalendar.io/
|
|
|
174
188
|
core.subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
|
|
175
189
|
};
|
|
176
190
|
ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
|
|
177
|
-
return this.eventRangesToSegs(core.sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.nextDayThreshold).fg, dayRanges);
|
|
191
|
+
return this.eventRangesToSegs(core.sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.nextDayThreshold).fg, dayRanges);
|
|
178
192
|
};
|
|
179
193
|
ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
|
|
180
194
|
var segs = [];
|
|
@@ -185,7 +199,7 @@ Docs & License: https://fullcalendar.io/
|
|
|
185
199
|
return segs;
|
|
186
200
|
};
|
|
187
201
|
ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
|
|
188
|
-
var _a = this, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
|
|
202
|
+
var _a = this.context, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
|
|
189
203
|
var range = eventRange.range;
|
|
190
204
|
var allDay = eventRange.def.allDay;
|
|
191
205
|
var dayIndex;
|
|
@@ -224,18 +238,19 @@ Docs & License: https://fullcalendar.io/
|
|
|
224
238
|
'<div class="fc-list-empty-wrap2">' + // TODO: try less wraps
|
|
225
239
|
'<div class="fc-list-empty-wrap1">' +
|
|
226
240
|
'<div class="fc-list-empty">' +
|
|
227
|
-
core.htmlEscape(this.
|
|
241
|
+
core.htmlEscape(this.context.options.noEventsMessage) +
|
|
228
242
|
'</div>' +
|
|
229
243
|
'</div>' +
|
|
230
244
|
'</div>';
|
|
231
245
|
};
|
|
232
246
|
// called by ListEventRenderer
|
|
233
247
|
ListView.prototype.renderSegList = function (allSegs) {
|
|
248
|
+
var theme = this.context.theme;
|
|
234
249
|
var segsByDay = this.groupSegsByDay(allSegs); // sparse array
|
|
235
250
|
var dayIndex;
|
|
236
251
|
var daySegs;
|
|
237
252
|
var i;
|
|
238
|
-
var tableEl = core.htmlToElement('<table class="fc-list-table ' +
|
|
253
|
+
var tableEl = core.htmlToElement('<table class="fc-list-table ' + theme.getClass('tableList') + '"><tbody></tbody></table>');
|
|
239
254
|
var tbodyEl = tableEl.querySelector('tbody');
|
|
240
255
|
for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {
|
|
241
256
|
daySegs = segsByDay[dayIndex];
|
|
@@ -265,20 +280,20 @@ Docs & License: https://fullcalendar.io/
|
|
|
265
280
|
};
|
|
266
281
|
// generates the HTML for the day headers that live amongst the event rows
|
|
267
282
|
ListView.prototype.buildDayHeaderRow = function (dayDate) {
|
|
268
|
-
var
|
|
269
|
-
var mainFormat = core.createFormatter(
|
|
270
|
-
var altFormat = core.createFormatter(
|
|
283
|
+
var _a = this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options;
|
|
284
|
+
var mainFormat = core.createFormatter(options.listDayFormat); // TODO: cache
|
|
285
|
+
var altFormat = core.createFormatter(options.listDayAltFormat); // TODO: cache
|
|
271
286
|
return core.createElement('tr', {
|
|
272
287
|
className: 'fc-list-heading',
|
|
273
288
|
'data-date': dateEnv.formatIso(dayDate, { omitTime: true })
|
|
274
|
-
}, '<td class="' + (
|
|
275
|
-
|
|
289
|
+
}, '<td class="' + (theme.getClass('tableListHeading') ||
|
|
290
|
+
theme.getClass('widgetHeader')) + '" colspan="3">' +
|
|
276
291
|
(mainFormat ?
|
|
277
|
-
core.buildGotoAnchorHtml(
|
|
292
|
+
core.buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-main' }, core.htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
|
|
278
293
|
) :
|
|
279
294
|
'') +
|
|
280
295
|
(altFormat ?
|
|
281
|
-
core.buildGotoAnchorHtml(
|
|
296
|
+
core.buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-alt' }, core.htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
|
|
282
297
|
) :
|
|
283
298
|
'') +
|
|
284
299
|
'</td>');
|
package/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../../../tmp/tsc-output/packages/list/src/ListEventRenderer.js","../../../tmp/tsc-output/packages/list/src/ListView.js","../../../tmp/tsc-output/packages/list/src/main.js"],"sourcesContent":["import * as tslib_1 from \"tslib\";\nimport { htmlEscape, FgEventRenderer, isMultiDayRange, getAllDayHtml } from '@fullcalendar/core';\nvar ListEventRenderer = /** @class */ (function (_super) {\n tslib_1.__extends(ListEventRenderer, _super);\n function ListEventRenderer(listView) {\n var _this = _super.call(this) || this;\n _this.listView = listView;\n return _this;\n }\n ListEventRenderer.prototype.attachSegs = function (segs) {\n if (!segs.length) {\n this.listView.renderEmptyMessage();\n }\n else {\n this.listView.renderSegList(segs);\n }\n };\n ListEventRenderer.prototype.detachSegs = function () {\n };\n // generates the HTML for a single event row\n ListEventRenderer.prototype.renderSegHtml = function (seg) {\n var _a = this.context, theme = _a.theme, options = _a.options;\n var eventRange = seg.eventRange;\n var eventDef = eventRange.def;\n var eventInstance = eventRange.instance;\n var eventUi = eventRange.ui;\n var url = eventDef.url;\n var classes = ['fc-list-item'].concat(eventUi.classNames);\n var bgColor = eventUi.backgroundColor;\n var timeHtml;\n if (eventDef.allDay) {\n timeHtml = getAllDayHtml(options);\n }\n else if (isMultiDayRange(eventRange.range)) {\n if (seg.isStart) {\n timeHtml = htmlEscape(this._getTimeText(eventInstance.range.start, seg.end, false // allDay\n ));\n }\n else if (seg.isEnd) {\n timeHtml = htmlEscape(this._getTimeText(seg.start, eventInstance.range.end, false // allDay\n ));\n }\n else { // inner segment that lasts the whole day\n timeHtml = getAllDayHtml(options);\n }\n }\n else {\n // Display the normal time text for the *event's* times\n timeHtml = htmlEscape(this.getTimeText(eventRange));\n }\n if (url) {\n classes.push('fc-has-url');\n }\n return '<tr class=\"' + classes.join(' ') + '\">' +\n (this.displayEventTime ?\n '<td class=\"fc-list-item-time ' + theme.getClass('widgetContent') + '\">' +\n (timeHtml || '') +\n '</td>' :\n '') +\n '<td class=\"fc-list-item-marker ' + theme.getClass('widgetContent') + '\">' +\n '<span class=\"fc-event-dot\"' +\n (bgColor ?\n ' style=\"background-color:' + bgColor + '\"' :\n '') +\n '></span>' +\n '</td>' +\n '<td class=\"fc-list-item-title ' + theme.getClass('widgetContent') + '\">' +\n '<a' + (url ? ' href=\"' + htmlEscape(url) + '\"' : '') + '>' +\n htmlEscape(eventDef.title || '') +\n '</a>' +\n '</td>' +\n '</tr>';\n };\n // like \"4:00am\"\n ListEventRenderer.prototype.computeEventTimeFormat = function () {\n return {\n hour: 'numeric',\n minute: '2-digit',\n meridiem: 'short'\n };\n };\n return ListEventRenderer;\n}(FgEventRenderer));\nexport default ListEventRenderer;\n","import * as tslib_1 from \"tslib\";\nimport { htmlToElement, createElement, htmlEscape, subtractInnerElHeight, View, ScrollComponent, addDays, startOfDay, createFormatter, intersectRanges, buildGotoAnchorHtml, sliceEventStore, memoize, memoizeRendering } from '@fullcalendar/core';\nimport ListEventRenderer from './ListEventRenderer';\n/*\nResponsible for the scroller, and forwarding event-related actions into the \"grid\".\n*/\nvar ListView = /** @class */ (function (_super) {\n tslib_1.__extends(ListView, _super);\n function ListView(viewSpec, parentEl) {\n var _this = _super.call(this, viewSpec, parentEl) || this;\n _this.computeDateVars = memoize(computeDateVars);\n _this.eventStoreToSegs = memoize(_this._eventStoreToSegs);\n _this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);\n var eventRenderer = _this.eventRenderer = new ListEventRenderer(_this);\n _this.renderContent = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [_this.renderSkeleton]);\n return _this;\n }\n ListView.prototype.firstContext = function (context) {\n context.calendar.registerInteractiveComponent(this, {\n el: this.el\n // TODO: make aware that it doesn't do Hits\n });\n };\n ListView.prototype.render = function (props, context) {\n _super.prototype.render.call(this, props, context);\n var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;\n this.dayDates = dayDates;\n this.renderSkeleton(context);\n this.renderContent(context, this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));\n };\n ListView.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderSkeleton.unrender();\n this.renderContent.unrender();\n this.context.calendar.unregisterInteractiveComponent(this);\n };\n ListView.prototype._renderSkeleton = function (context) {\n var theme = context.theme;\n this.el.classList.add('fc-list-view');\n var listViewClassNames = (theme.getClass('listView') || '').split(' '); // wish we didn't have to do this\n for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {\n var listViewClassName = listViewClassNames_1[_i];\n if (listViewClassName) { // in case input was empty string\n this.el.classList.add(listViewClassName);\n }\n }\n this.scroller = new ScrollComponent('hidden', // overflow x\n 'auto' // overflow y\n );\n this.el.appendChild(this.scroller.el);\n this.contentEl = this.scroller.el; // shortcut\n };\n ListView.prototype._unrenderSkeleton = function () {\n // TODO: remove classNames\n this.scroller.destroy(); // will remove the Grid too\n };\n ListView.prototype.updateSize = function (isResize, viewHeight, isAuto) {\n _super.prototype.updateSize.call(this, isResize, viewHeight, isAuto);\n this.eventRenderer.computeSizes(isResize);\n this.eventRenderer.assignSizes(isResize);\n this.scroller.clear(); // sets height to 'auto' and clears overflow\n if (!isAuto) {\n this.scroller.setHeight(this.computeScrollerHeight(viewHeight));\n }\n };\n ListView.prototype.computeScrollerHeight = function (viewHeight) {\n return viewHeight -\n subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\n };\n ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {\n return this.eventRangesToSegs(sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.nextDayThreshold).fg, dayRanges);\n };\n ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {\n var segs = [];\n for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {\n var eventRange = eventRanges_1[_i];\n segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges));\n }\n return segs;\n };\n ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {\n var _a = this.context, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;\n var range = eventRange.range;\n var allDay = eventRange.def.allDay;\n var dayIndex;\n var segRange;\n var seg;\n var segs = [];\n for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex++) {\n segRange = intersectRanges(range, dayRanges[dayIndex]);\n if (segRange) {\n seg = {\n component: this,\n eventRange: eventRange,\n start: segRange.start,\n end: segRange.end,\n isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),\n isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),\n dayIndex: dayIndex\n };\n segs.push(seg);\n // detect when range won't go fully into the next day,\n // and mutate the latest seg to the be the end.\n if (!seg.isEnd && !allDay &&\n dayIndex + 1 < dayRanges.length &&\n range.end <\n dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) {\n seg.end = range.end;\n seg.isEnd = true;\n break;\n }\n }\n }\n return segs;\n };\n ListView.prototype.renderEmptyMessage = function () {\n this.contentEl.innerHTML =\n '<div class=\"fc-list-empty-wrap2\">' + // TODO: try less wraps\n '<div class=\"fc-list-empty-wrap1\">' +\n '<div class=\"fc-list-empty\">' +\n htmlEscape(this.context.options.noEventsMessage) +\n '</div>' +\n '</div>' +\n '</div>';\n };\n // called by ListEventRenderer\n ListView.prototype.renderSegList = function (allSegs) {\n var theme = this.context.theme;\n var segsByDay = this.groupSegsByDay(allSegs); // sparse array\n var dayIndex;\n var daySegs;\n var i;\n var tableEl = htmlToElement('<table class=\"fc-list-table ' + theme.getClass('tableList') + '\"><tbody></tbody></table>');\n var tbodyEl = tableEl.querySelector('tbody');\n for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {\n daySegs = segsByDay[dayIndex];\n if (daySegs) { // sparse array, so might be undefined\n // append a day header\n tbodyEl.appendChild(this.buildDayHeaderRow(this.dayDates[dayIndex]));\n daySegs = this.eventRenderer.sortEventSegs(daySegs);\n for (i = 0; i < daySegs.length; i++) {\n tbodyEl.appendChild(daySegs[i].el); // append event row\n }\n }\n }\n this.contentEl.innerHTML = '';\n this.contentEl.appendChild(tableEl);\n };\n // Returns a sparse array of arrays, segs grouped by their dayIndex\n ListView.prototype.groupSegsByDay = function (segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n };\n // generates the HTML for the day headers that live amongst the event rows\n ListView.prototype.buildDayHeaderRow = function (dayDate) {\n var _a = this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options;\n var mainFormat = createFormatter(options.listDayFormat); // TODO: cache\n var altFormat = createFormatter(options.listDayAltFormat); // TODO: cache\n return createElement('tr', {\n className: 'fc-list-heading',\n 'data-date': dateEnv.formatIso(dayDate, { omitTime: true })\n }, '<td class=\"' + (theme.getClass('tableListHeading') ||\n theme.getClass('widgetHeader')) + '\" colspan=\"3\">' +\n (mainFormat ?\n buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-main' }, htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML\n ) :\n '') +\n (altFormat ?\n buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-alt' }, htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML\n ) :\n '') +\n '</td>');\n };\n return ListView;\n}(View));\nexport default ListView;\nListView.prototype.fgSegSelector = '.fc-list-item'; // which elements accept event actions\nfunction computeDateVars(dateProfile) {\n var dayStart = startOfDay(dateProfile.renderRange.start);\n var viewEnd = dateProfile.renderRange.end;\n var dayDates = [];\n var dayRanges = [];\n while (dayStart < viewEnd) {\n dayDates.push(dayStart);\n dayRanges.push({\n start: dayStart,\n end: addDays(dayStart, 1)\n });\n dayStart = addDays(dayStart, 1);\n }\n return { dayDates: dayDates, dayRanges: dayRanges };\n}\n","import { createPlugin } from '@fullcalendar/core';\nimport ListView from './ListView';\nexport { ListView };\nexport default createPlugin({\n views: {\n list: {\n class: ListView,\n buttonTextKey: 'list',\n listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' } // like \"January 1, 2016\"\n },\n listDay: {\n type: 'list',\n duration: { days: 1 },\n listDayFormat: { weekday: 'long' } // day-of-week is all we need. full date is probably in header\n },\n listWeek: {\n type: 'list',\n duration: { weeks: 1 },\n listDayFormat: { weekday: 'long' },\n listDayAltFormat: { month: 'long', day: 'numeric', year: 'numeric' }\n },\n listMonth: {\n type: 'list',\n duration: { month: 1 },\n listDayAltFormat: { weekday: 'long' } // day-of-week is nice-to-have\n },\n listYear: {\n type: 'list',\n duration: { year: 1 },\n listDayAltFormat: { weekday: 'long' } // day-of-week is nice-to-have\n }\n }\n});\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;AAEA,IAAI,iBAAiB,KAAkB,UAAU,MAAM,EAAE;AACzD,IAAIA,SAAiB,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACzC,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,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AE,EAAE,IAAI,EAAE,CAAC,EAAE;AACjC,YAAY,gBAAgB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;AACjD,SAAS;AACT,KAAK;AACL,CAAC,CAAC,CAAC;;;;;"}
|
package/main.min.css
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
@fullcalendar/list v4.0.1
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2019 Adam Shaw
|
|
5
|
-
*/.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}
|
|
1
|
+
.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}
|
package/main.min.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
|
|
2
|
+
FullCalendar List View Plugin v4.4.0
|
|
3
3
|
Docs & License: https://fullcalendar.io/
|
|
4
4
|
(c) 2019 Adam Shaw
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],t):(e=e||self
|
|
7
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
9
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
10
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
13
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
14
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
15
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
16
|
-
|
|
17
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
18
|
-
and limitations under the License.
|
|
19
|
-
***************************************************************************** */
|
|
20
|
-
var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},a=function(e){function r(t){var n=e.call(this,t.context)||this;return n.listView=t,n}return n(r,e),r.prototype.attachSegs=function(e){e.length?this.listView.renderSegList(e):this.listView.renderEmptyMessage()},r.prototype.detachSegs=function(){},r.prototype.renderSegHtml=function(e){var n,r=this.context,s=r.view,a=r.theme,i=e.eventRange,o=i.def,l=i.instance,d=i.ui,c=o.url,p=["fc-list-item"].concat(d.classNames),h=d.backgroundColor;return n=o.allDay?t.getAllDayHtml(s):t.isMultiDayRange(i.range)?e.isStart?t.htmlEscape(this._getTimeText(l.range.start,e.end,!1)):e.isEnd?t.htmlEscape(this._getTimeText(e.start,l.range.end,!1)):t.getAllDayHtml(s):t.htmlEscape(this.getTimeText(i)),c&&p.push("fc-has-url"),'<tr class="'+p.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+a.getClass("widgetContent")+'">'+(n||"")+"</td>":"")+'<td class="fc-list-item-marker '+a.getClass("widgetContent")+'"><span class="fc-event-dot"'+(h?' style="background-color:'+h+'"':"")+'></span></td><td class="fc-list-item-title '+a.getClass("widgetContent")+'"><a'+(c?' href="'+t.htmlEscape(c)+'"':"")+">"+t.htmlEscape(o.title||"")+"</a></td></tr>"},r.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},r}(t.FgEventRenderer),i=function(e){function s(n,s,i,o){var l=e.call(this,n,s,i,o)||this;l.computeDateVars=t.memoize(r),l.eventStoreToSegs=t.memoize(l._eventStoreToSegs);var d=l.eventRenderer=new a(l);l.renderContent=t.memoizeRendering(d.renderSegs.bind(d),d.unrender.bind(d)),l.el.classList.add("fc-list-view");for(var c=(l.theme.getClass("listView")||"").split(" "),p=0,h=c;p<h.length;p++){var u=h[p];u&&l.el.classList.add(u)}return l.scroller=new t.ScrollComponent("hidden","auto"),l.el.appendChild(l.scroller.el),l.contentEl=l.scroller.el,n.calendar.registerInteractiveComponent(l,{el:l.el}),l}return n(s,e),s.prototype.render=function(e){var t=this.computeDateVars(e.dateProfile),n=t.dayDates,r=t.dayRanges;this.dayDates=n,this.renderContent(this.eventStoreToSegs(e.eventStore,e.eventUiBases,r))},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.scroller.destroy(),this.calendar.unregisterInteractiveComponent(this)},s.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.eventRenderer.computeSizes(t),this.eventRenderer.assignSizes(t),this.scroller.clear(),r||this.scroller.setHeight(this.computeScrollerHeight(n))},s.prototype.computeScrollerHeight=function(e){return e-t.subtractInnerElHeight(this.el,this.scroller.el)},s.prototype._eventStoreToSegs=function(e,n,r){return this.eventRangesToSegs(t.sliceEventStore(e,n,this.props.dateProfile.activeRange,this.nextDayThreshold).fg,r)},s.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,s=e;r<s.length;r++){var a=s[r];n.push.apply(n,this.eventRangeToSegs(a,t))}return n},s.prototype.eventRangeToSegs=function(e,n){var r,s,a,i=this,o=i.dateEnv,l=i.nextDayThreshold,d=e.range,c=e.def.allDay,p=[];for(r=0;r<n.length;r++)if((s=t.intersectRanges(d,n[r]))&&(a={component:this,eventRange:e,start:s.start,end:s.end,isStart:e.isStart&&s.start.valueOf()===d.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===d.end.valueOf(),dayIndex:r},p.push(a),!a.isEnd&&!c&&r+1<n.length&&d.end<o.add(n[r+1].start,l))){a.end=d.end,a.isEnd=!0;break}return p},s.prototype.renderEmptyMessage=function(){this.contentEl.innerHTML='<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+t.htmlEscape(this.opt("noEventsMessage"))+"</div></div></div>"},s.prototype.renderSegList=function(e){var n,r,s,a=this.groupSegsByDay(e),i=t.htmlToElement('<table class="fc-list-table '+this.calendar.theme.getClass("tableList")+'"><tbody></tbody></table>'),o=i.querySelector("tbody");for(n=0;n<a.length;n++)if(r=a[n])for(o.appendChild(this.buildDayHeaderRow(this.dayDates[n])),r=this.eventRenderer.sortEventSegs(r),s=0;s<r.length;s++)o.appendChild(r[s].el);this.contentEl.innerHTML="",this.contentEl.appendChild(i)},s.prototype.groupSegsByDay=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r},s.prototype.buildDayHeaderRow=function(e){var n=this.dateEnv,r=t.createFormatter(this.opt("listDayFormat")),s=t.createFormatter(this.opt("listDayAltFormat"));return t.createElement("tr",{className:"fc-list-heading","data-date":n.formatIso(e,{omitTime:!0})},'<td class="'+(this.calendar.theme.getClass("tableListHeading")||this.calendar.theme.getClass("widgetHeader"))+'" colspan="3">'+(r?t.buildGotoAnchorHtml(this,e,{class:"fc-list-heading-main"},t.htmlEscape(n.format(e,r))):"")+(s?t.buildGotoAnchorHtml(this,e,{class:"fc-list-heading-alt"},t.htmlEscape(n.format(e,s))):"")+"</td>")},s}(t.View);i.prototype.fgSegSelector=".fc-list-item";var o=t.createPlugin({views:{list:{class:i,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDayAltFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDayAltFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDayAltFormat:{weekday:"long"}}}});e.ListView=i,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],t):t((e=e||self).FullCalendarList={},e.FullCalendar)}(this,function(e,t){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function r(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(e){function n(t){var n=e.call(this)||this;return n.listView=t,n}return r(n,e),n.prototype.attachSegs=function(e){e.length?this.listView.renderSegList(e):this.listView.renderEmptyMessage()},n.prototype.detachSegs=function(){},n.prototype.renderSegHtml=function(e){var n,r=this.context,s=r.theme,o=r.options,i=e.eventRange,a=i.def,l=i.instance,d=i.ui,c=a.url,p=["fc-list-item"].concat(d.classNames),h=d.backgroundColor;return n=a.allDay?t.getAllDayHtml(o):t.isMultiDayRange(i.range)?e.isStart?t.htmlEscape(this._getTimeText(l.range.start,e.end,!1)):e.isEnd?t.htmlEscape(this._getTimeText(e.start,l.range.end,!1)):t.getAllDayHtml(o):t.htmlEscape(this.getTimeText(i)),c&&p.push("fc-has-url"),'<tr class="'+p.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+s.getClass("widgetContent")+'">'+(n||"")+"</td>":"")+'<td class="fc-list-item-marker '+s.getClass("widgetContent")+'"><span class="fc-event-dot"'+(h?' style="background-color:'+h+'"':"")+'></span></td><td class="fc-list-item-title '+s.getClass("widgetContent")+'"><a'+(c?' href="'+t.htmlEscape(c)+'"':"")+">"+t.htmlEscape(a.title||"")+"</a></td></tr>"},n.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},n}(t.FgEventRenderer),o=function(e){function n(n,r){var o=e.call(this,n,r)||this;o.computeDateVars=t.memoize(i),o.eventStoreToSegs=t.memoize(o._eventStoreToSegs),o.renderSkeleton=t.memoizeRendering(o._renderSkeleton,o._unrenderSkeleton);var a=o.eventRenderer=new s(o);return o.renderContent=t.memoizeRendering(a.renderSegs.bind(a),a.unrender.bind(a),[o.renderSkeleton]),o}return r(n,e),n.prototype.firstContext=function(e){e.calendar.registerInteractiveComponent(this,{el:this.el})},n.prototype.render=function(t,n){e.prototype.render.call(this,t,n);var r=this.computeDateVars(t.dateProfile),s=r.dayDates,o=r.dayRanges;this.dayDates=s,this.renderSkeleton(n),this.renderContent(n,this.eventStoreToSegs(t.eventStore,t.eventUiBases,o))},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSkeleton.unrender(),this.renderContent.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},n.prototype._renderSkeleton=function(e){var n=e.theme;this.el.classList.add("fc-list-view");for(var r=0,s=(n.getClass("listView")||"").split(" ");r<s.length;r++){var o=s[r];o&&this.el.classList.add(o)}this.scroller=new t.ScrollComponent("hidden","auto"),this.el.appendChild(this.scroller.el),this.contentEl=this.scroller.el},n.prototype._unrenderSkeleton=function(){this.scroller.destroy()},n.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.eventRenderer.computeSizes(t),this.eventRenderer.assignSizes(t),this.scroller.clear(),r||this.scroller.setHeight(this.computeScrollerHeight(n))},n.prototype.computeScrollerHeight=function(e){return e-t.subtractInnerElHeight(this.el,this.scroller.el)},n.prototype._eventStoreToSegs=function(e,n,r){return this.eventRangesToSegs(t.sliceEventStore(e,n,this.props.dateProfile.activeRange,this.context.nextDayThreshold).fg,r)},n.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,s=e;r<s.length;r++){var o=s[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},n.prototype.eventRangeToSegs=function(e,n){var r,s,o,i=this.context,a=i.dateEnv,l=i.nextDayThreshold,d=e.range,c=e.def.allDay,p=[];for(r=0;r<n.length;r++)if((s=t.intersectRanges(d,n[r]))&&(o={component:this,eventRange:e,start:s.start,end:s.end,isStart:e.isStart&&s.start.valueOf()===d.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===d.end.valueOf(),dayIndex:r},p.push(o),!o.isEnd&&!c&&r+1<n.length&&d.end<a.add(n[r+1].start,l))){o.end=d.end,o.isEnd=!0;break}return p},n.prototype.renderEmptyMessage=function(){this.contentEl.innerHTML='<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+t.htmlEscape(this.context.options.noEventsMessage)+"</div></div></div>"},n.prototype.renderSegList=function(e){var n,r,s,o=this.context.theme,i=this.groupSegsByDay(e),a=t.htmlToElement('<table class="fc-list-table '+o.getClass("tableList")+'"><tbody></tbody></table>'),l=a.querySelector("tbody");for(n=0;n<i.length;n++)if(r=i[n])for(l.appendChild(this.buildDayHeaderRow(this.dayDates[n])),r=this.eventRenderer.sortEventSegs(r),s=0;s<r.length;s++)l.appendChild(r[s].el);this.contentEl.innerHTML="",this.contentEl.appendChild(a)},n.prototype.groupSegsByDay=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r},n.prototype.buildDayHeaderRow=function(e){var n=this.context,r=n.theme,s=n.dateEnv,o=n.options,i=t.createFormatter(o.listDayFormat),a=t.createFormatter(o.listDayAltFormat);return t.createElement("tr",{className:"fc-list-heading","data-date":s.formatIso(e,{omitTime:!0})},'<td class="'+(r.getClass("tableListHeading")||r.getClass("widgetHeader"))+'" colspan="3">'+(i?t.buildGotoAnchorHtml(o,s,e,{class:"fc-list-heading-main"},t.htmlEscape(s.format(e,i))):"")+(a?t.buildGotoAnchorHtml(o,s,e,{class:"fc-list-heading-alt"},t.htmlEscape(s.format(e,a))):"")+"</td>")},n}(t.View);function i(e){for(var n=t.startOfDay(e.renderRange.start),r=e.renderRange.end,s=[],o=[];n<r;)s.push(n),o.push({start:n,end:t.addDays(n,1)}),n=t.addDays(n,1);return{dayDates:s,dayRanges:o}}o.prototype.fgSegSelector=".fc-list-item";var a=t.createPlugin({views:{list:{class:o,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDayAltFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDayAltFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDayAltFormat:{weekday:"long"}}}});e.ListView=o,e.default=a,Object.defineProperty(e,"__esModule",{value:!0})});
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullcalendar/list",
|
|
3
|
+
"version": "4.4.0",
|
|
3
4
|
"title": "FullCalendar List View Plugin",
|
|
4
|
-
"description": "
|
|
5
|
+
"description": "View your events as a bulleted list",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"calendar",
|
|
7
8
|
"event",
|
|
8
9
|
"full-sized"
|
|
9
10
|
],
|
|
10
11
|
"homepage": "https://fullcalendar.io/",
|
|
12
|
+
"docs": "https://fullcalendar.io/docs/list-view",
|
|
11
13
|
"bugs": "https://fullcalendar.io/reporting-bugs",
|
|
12
14
|
"repository": {
|
|
13
15
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/fullcalendar/fullcalendar.git"
|
|
16
|
+
"url": "https://github.com/fullcalendar/fullcalendar.git",
|
|
17
|
+
"homepage": "https://github.com/fullcalendar/fullcalendar"
|
|
15
18
|
},
|
|
16
19
|
"license": "MIT",
|
|
17
20
|
"author": {
|
|
@@ -20,12 +23,11 @@
|
|
|
20
23
|
"url": "http://arshaw.com/"
|
|
21
24
|
},
|
|
22
25
|
"copyright": "2019 Adam Shaw",
|
|
23
|
-
"version": "4.0.1",
|
|
24
|
-
"releaseDate": "2019-03-18",
|
|
25
26
|
"peerDependencies": {
|
|
26
|
-
"@fullcalendar/core": "
|
|
27
|
+
"@fullcalendar/core": "~4.4.0"
|
|
27
28
|
},
|
|
28
29
|
"main": "main.js",
|
|
30
|
+
"module": "main.esm.js",
|
|
29
31
|
"unpkg": "main.min.js",
|
|
30
32
|
"types": "main.d.ts"
|
|
31
|
-
}
|
|
33
|
+
}
|