@fullcalendar/list 5.11.3 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.txt → LICENSE.md} +0 -0
- package/index.cjs +59 -0
- package/index.d.ts +27 -0
- package/index.global.js +332 -0
- package/index.global.min.js +6 -0
- package/index.js +55 -0
- package/internal-common.d.ts +27 -0
- package/internal.cjs +268 -0
- package/internal.d.ts +4 -0
- package/internal.js +264 -0
- package/package.json +38 -16
- package/main.cjs.js +0 -320
- package/main.css +0 -140
- package/main.d.ts +0 -47
- package/main.global.js +0 -365
- package/main.global.min.js +0 -6
- package/main.js +0 -318
- package/main.js.map +0 -1
- package/main.min.css +0 -1
package/main.global.js
DELETED
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
FullCalendar v5.11.3
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2022 Adam Shaw
|
|
5
|
-
*/
|
|
6
|
-
var FullCalendarList = (function (exports, common) {
|
|
7
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
/*! *****************************************************************************
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
|
|
12
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
-
purpose with or without fee is hereby granted.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
29
|
-
return extendStatics(d, b);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
function __extends(d, b) {
|
|
33
|
-
if (typeof b !== "function" && b !== null)
|
|
34
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
35
|
-
extendStatics(d, b);
|
|
36
|
-
function __() { this.constructor = d; }
|
|
37
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
var __assign = function() {
|
|
41
|
-
__assign = Object.assign || function __assign(t) {
|
|
42
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
43
|
-
s = arguments[i];
|
|
44
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
45
|
-
}
|
|
46
|
-
return t;
|
|
47
|
-
};
|
|
48
|
-
return __assign.apply(this, arguments);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
var ListViewHeaderRow = /** @class */ (function (_super) {
|
|
52
|
-
__extends(ListViewHeaderRow, _super);
|
|
53
|
-
function ListViewHeaderRow() {
|
|
54
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
-
_this.state = {
|
|
56
|
-
textId: common.getUniqueDomId(),
|
|
57
|
-
};
|
|
58
|
-
return _this;
|
|
59
|
-
}
|
|
60
|
-
ListViewHeaderRow.prototype.render = function () {
|
|
61
|
-
var _a = this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options, viewApi = _a.viewApi;
|
|
62
|
-
var _b = this.props, cellId = _b.cellId, dayDate = _b.dayDate, todayRange = _b.todayRange;
|
|
63
|
-
var textId = this.state.textId;
|
|
64
|
-
var dayMeta = common.getDateMeta(dayDate, todayRange);
|
|
65
|
-
// will ever be falsy?
|
|
66
|
-
var text = options.listDayFormat ? dateEnv.format(dayDate, options.listDayFormat) : '';
|
|
67
|
-
// will ever be falsy? also, BAD NAME "alt"
|
|
68
|
-
var sideText = options.listDaySideFormat ? dateEnv.format(dayDate, options.listDaySideFormat) : '';
|
|
69
|
-
var hookProps = __assign({ date: dateEnv.toDate(dayDate), view: viewApi, textId: textId,
|
|
70
|
-
text: text,
|
|
71
|
-
sideText: sideText, navLinkAttrs: common.buildNavLinkAttrs(this.context, dayDate), sideNavLinkAttrs: common.buildNavLinkAttrs(this.context, dayDate, 'day', false) }, dayMeta);
|
|
72
|
-
var classNames = ['fc-list-day'].concat(common.getDayClassNames(dayMeta, theme));
|
|
73
|
-
// TODO: make a reusable HOC for dayHeader (used in daygrid/timegrid too)
|
|
74
|
-
return (common.createElement(common.RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInnerContent, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (common.createElement("tr", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-date": common.formatDayString(dayDate) },
|
|
75
|
-
common.createElement("th", { scope: "colgroup", colSpan: 3, id: cellId, "aria-labelledby": textId },
|
|
76
|
-
common.createElement("div", { className: 'fc-list-day-cushion ' + theme.getClass('tableCellShaded'), ref: innerElRef }, innerContent)))); }));
|
|
77
|
-
};
|
|
78
|
-
return ListViewHeaderRow;
|
|
79
|
-
}(common.BaseComponent));
|
|
80
|
-
function renderInnerContent(props) {
|
|
81
|
-
return (common.createElement(common.Fragment, null,
|
|
82
|
-
props.text && (common.createElement("a", __assign({ id: props.textId, className: "fc-list-day-text" }, props.navLinkAttrs), props.text)),
|
|
83
|
-
props.sideText && ( /* not keyboard tabbable */common.createElement("a", __assign({ "aria-hidden": true, className: "fc-list-day-side-text" }, props.sideNavLinkAttrs), props.sideText))));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
var DEFAULT_TIME_FORMAT = common.createFormatter({
|
|
87
|
-
hour: 'numeric',
|
|
88
|
-
minute: '2-digit',
|
|
89
|
-
meridiem: 'short',
|
|
90
|
-
});
|
|
91
|
-
var ListViewEventRow = /** @class */ (function (_super) {
|
|
92
|
-
__extends(ListViewEventRow, _super);
|
|
93
|
-
function ListViewEventRow() {
|
|
94
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
95
|
-
}
|
|
96
|
-
ListViewEventRow.prototype.render = function () {
|
|
97
|
-
var _a = this, props = _a.props, context = _a.context;
|
|
98
|
-
var seg = props.seg, timeHeaderId = props.timeHeaderId, eventHeaderId = props.eventHeaderId, dateHeaderId = props.dateHeaderId;
|
|
99
|
-
var timeFormat = context.options.eventTimeFormat || DEFAULT_TIME_FORMAT;
|
|
100
|
-
return (common.createElement(common.EventRoot, { seg: seg, timeText: "" // BAD. because of all-day content
|
|
101
|
-
, disableDragging: true, disableResizing: true, defaultContent: function () { return renderEventInnerContent(seg, context); } /* weird */, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, isSelected: props.isSelected, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (common.createElement("tr", { className: ['fc-list-event', hookProps.event.url ? 'fc-event-forced-url' : ''].concat(classNames).join(' '), ref: rootElRef },
|
|
102
|
-
buildTimeContent(seg, timeFormat, context, timeHeaderId, dateHeaderId),
|
|
103
|
-
common.createElement("td", { "aria-hidden": true, className: "fc-list-event-graphic" },
|
|
104
|
-
common.createElement("span", { className: "fc-list-event-dot", style: { borderColor: hookProps.borderColor || hookProps.backgroundColor } })),
|
|
105
|
-
common.createElement("td", { ref: innerElRef, headers: eventHeaderId + " " + dateHeaderId, className: "fc-list-event-title" }, innerContent))); }));
|
|
106
|
-
};
|
|
107
|
-
return ListViewEventRow;
|
|
108
|
-
}(common.BaseComponent));
|
|
109
|
-
function renderEventInnerContent(seg, context) {
|
|
110
|
-
var interactiveAttrs = common.getSegAnchorAttrs(seg, context);
|
|
111
|
-
return (common.createElement("a", __assign({}, interactiveAttrs), seg.eventRange.def.title));
|
|
112
|
-
}
|
|
113
|
-
function buildTimeContent(seg, timeFormat, context, timeHeaderId, dateHeaderId) {
|
|
114
|
-
var options = context.options;
|
|
115
|
-
if (options.displayEventTime !== false) {
|
|
116
|
-
var eventDef = seg.eventRange.def;
|
|
117
|
-
var eventInstance = seg.eventRange.instance;
|
|
118
|
-
var doAllDay = false;
|
|
119
|
-
var timeText = void 0;
|
|
120
|
-
if (eventDef.allDay) {
|
|
121
|
-
doAllDay = true;
|
|
122
|
-
}
|
|
123
|
-
else if (common.isMultiDayRange(seg.eventRange.range)) { // TODO: use (!isStart || !isEnd) instead?
|
|
124
|
-
if (seg.isStart) {
|
|
125
|
-
timeText = common.buildSegTimeText(seg, timeFormat, context, null, null, eventInstance.range.start, seg.end);
|
|
126
|
-
}
|
|
127
|
-
else if (seg.isEnd) {
|
|
128
|
-
timeText = common.buildSegTimeText(seg, timeFormat, context, null, null, seg.start, eventInstance.range.end);
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
doAllDay = true;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
timeText = common.buildSegTimeText(seg, timeFormat, context);
|
|
136
|
-
}
|
|
137
|
-
if (doAllDay) {
|
|
138
|
-
var hookProps = {
|
|
139
|
-
text: context.options.allDayText,
|
|
140
|
-
view: context.viewApi,
|
|
141
|
-
};
|
|
142
|
-
return (common.createElement(common.RenderHook, { hookProps: hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (common.createElement("td", { ref: rootElRef, headers: timeHeaderId + " " + dateHeaderId, className: ['fc-list-event-time'].concat(classNames).join(' ') }, innerContent)); }));
|
|
143
|
-
}
|
|
144
|
-
return (common.createElement("td", { className: "fc-list-event-time" }, timeText));
|
|
145
|
-
}
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
function renderAllDayInner(hookProps) {
|
|
149
|
-
return hookProps.text;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/*
|
|
153
|
-
Responsible for the scroller, and forwarding event-related actions into the "grid".
|
|
154
|
-
*/
|
|
155
|
-
var ListView = /** @class */ (function (_super) {
|
|
156
|
-
__extends(ListView, _super);
|
|
157
|
-
function ListView() {
|
|
158
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
159
|
-
_this.computeDateVars = common.memoize(computeDateVars);
|
|
160
|
-
_this.eventStoreToSegs = common.memoize(_this._eventStoreToSegs);
|
|
161
|
-
_this.state = {
|
|
162
|
-
timeHeaderId: common.getUniqueDomId(),
|
|
163
|
-
eventHeaderId: common.getUniqueDomId(),
|
|
164
|
-
dateHeaderIdRoot: common.getUniqueDomId(),
|
|
165
|
-
};
|
|
166
|
-
_this.setRootEl = function (rootEl) {
|
|
167
|
-
if (rootEl) {
|
|
168
|
-
_this.context.registerInteractiveComponent(_this, {
|
|
169
|
-
el: rootEl,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
_this.context.unregisterInteractiveComponent(_this);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
return _this;
|
|
177
|
-
}
|
|
178
|
-
ListView.prototype.render = function () {
|
|
179
|
-
var _this = this;
|
|
180
|
-
var _a = this, props = _a.props, context = _a.context;
|
|
181
|
-
var extraClassNames = [
|
|
182
|
-
'fc-list',
|
|
183
|
-
context.theme.getClass('table'),
|
|
184
|
-
context.options.stickyHeaderDates !== false ? 'fc-list-sticky' : '',
|
|
185
|
-
];
|
|
186
|
-
var _b = this.computeDateVars(props.dateProfile), dayDates = _b.dayDates, dayRanges = _b.dayRanges;
|
|
187
|
-
var eventSegs = this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges);
|
|
188
|
-
return (common.createElement(common.ViewRoot, { viewSpec: context.viewSpec, elRef: this.setRootEl }, function (rootElRef, classNames) { return (common.createElement("div", { ref: rootElRef, className: extraClassNames.concat(classNames).join(' ') },
|
|
189
|
-
common.createElement(common.Scroller, { liquid: !props.isHeightAuto, overflowX: props.isHeightAuto ? 'visible' : 'hidden', overflowY: props.isHeightAuto ? 'visible' : 'auto' }, eventSegs.length > 0 ?
|
|
190
|
-
_this.renderSegList(eventSegs, dayDates) :
|
|
191
|
-
_this.renderEmptyMessage()))); }));
|
|
192
|
-
};
|
|
193
|
-
ListView.prototype.renderEmptyMessage = function () {
|
|
194
|
-
var _a = this.context, options = _a.options, viewApi = _a.viewApi;
|
|
195
|
-
var hookProps = {
|
|
196
|
-
text: options.noEventsText,
|
|
197
|
-
view: viewApi,
|
|
198
|
-
};
|
|
199
|
-
return (common.createElement(common.RenderHook, { hookProps: hookProps, classNames: options.noEventsClassNames, content: options.noEventsContent, defaultContent: renderNoEventsInner, didMount: options.noEventsDidMount, willUnmount: options.noEventsWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (common.createElement("div", { className: ['fc-list-empty'].concat(classNames).join(' '), ref: rootElRef },
|
|
200
|
-
common.createElement("div", { className: "fc-list-empty-cushion", ref: innerElRef }, innerContent))); }));
|
|
201
|
-
};
|
|
202
|
-
ListView.prototype.renderSegList = function (allSegs, dayDates) {
|
|
203
|
-
var _a = this.context, theme = _a.theme, options = _a.options;
|
|
204
|
-
var _b = this.state, timeHeaderId = _b.timeHeaderId, eventHeaderId = _b.eventHeaderId, dateHeaderIdRoot = _b.dateHeaderIdRoot;
|
|
205
|
-
var segsByDay = groupSegsByDay(allSegs); // sparse array
|
|
206
|
-
return (common.createElement(common.NowTimer, { unit: "day" }, function (nowDate, todayRange) {
|
|
207
|
-
var innerNodes = [];
|
|
208
|
-
for (var dayIndex = 0; dayIndex < segsByDay.length; dayIndex += 1) {
|
|
209
|
-
var daySegs = segsByDay[dayIndex];
|
|
210
|
-
if (daySegs) { // sparse array, so might be undefined
|
|
211
|
-
var dayStr = common.formatDayString(dayDates[dayIndex]);
|
|
212
|
-
var dateHeaderId = dateHeaderIdRoot + '-' + dayStr;
|
|
213
|
-
// append a day header
|
|
214
|
-
innerNodes.push(common.createElement(ListViewHeaderRow, { key: dayStr, cellId: dateHeaderId, dayDate: dayDates[dayIndex], todayRange: todayRange }));
|
|
215
|
-
daySegs = common.sortEventSegs(daySegs, options.eventOrder);
|
|
216
|
-
for (var _i = 0, daySegs_1 = daySegs; _i < daySegs_1.length; _i++) {
|
|
217
|
-
var seg = daySegs_1[_i];
|
|
218
|
-
innerNodes.push(common.createElement(ListViewEventRow, __assign({ key: dayStr + ':' + seg.eventRange.instance.instanceId /* are multiple segs for an instanceId */, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, timeHeaderId: timeHeaderId, eventHeaderId: eventHeaderId, dateHeaderId: dateHeaderId }, common.getSegMeta(seg, todayRange, nowDate))));
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return (common.createElement("table", { className: 'fc-list-table ' + theme.getClass('table') },
|
|
223
|
-
common.createElement("thead", null,
|
|
224
|
-
common.createElement("tr", null,
|
|
225
|
-
common.createElement("th", { scope: "col", id: timeHeaderId }, options.timeHint),
|
|
226
|
-
common.createElement("th", { scope: "col", "aria-hidden": true }),
|
|
227
|
-
common.createElement("th", { scope: "col", id: eventHeaderId }, options.eventHint))),
|
|
228
|
-
common.createElement("tbody", null, innerNodes)));
|
|
229
|
-
}));
|
|
230
|
-
};
|
|
231
|
-
ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
|
|
232
|
-
return this.eventRangesToSegs(common.sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.options.nextDayThreshold).fg, dayRanges);
|
|
233
|
-
};
|
|
234
|
-
ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
|
|
235
|
-
var segs = [];
|
|
236
|
-
for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {
|
|
237
|
-
var eventRange = eventRanges_1[_i];
|
|
238
|
-
segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges));
|
|
239
|
-
}
|
|
240
|
-
return segs;
|
|
241
|
-
};
|
|
242
|
-
ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
|
|
243
|
-
var dateEnv = this.context.dateEnv;
|
|
244
|
-
var nextDayThreshold = this.context.options.nextDayThreshold;
|
|
245
|
-
var range = eventRange.range;
|
|
246
|
-
var allDay = eventRange.def.allDay;
|
|
247
|
-
var dayIndex;
|
|
248
|
-
var segRange;
|
|
249
|
-
var seg;
|
|
250
|
-
var segs = [];
|
|
251
|
-
for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex += 1) {
|
|
252
|
-
segRange = common.intersectRanges(range, dayRanges[dayIndex]);
|
|
253
|
-
if (segRange) {
|
|
254
|
-
seg = {
|
|
255
|
-
component: this,
|
|
256
|
-
eventRange: eventRange,
|
|
257
|
-
start: segRange.start,
|
|
258
|
-
end: segRange.end,
|
|
259
|
-
isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),
|
|
260
|
-
isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),
|
|
261
|
-
dayIndex: dayIndex,
|
|
262
|
-
};
|
|
263
|
-
segs.push(seg);
|
|
264
|
-
// detect when range won't go fully into the next day,
|
|
265
|
-
// and mutate the latest seg to the be the end.
|
|
266
|
-
if (!seg.isEnd && !allDay &&
|
|
267
|
-
dayIndex + 1 < dayRanges.length &&
|
|
268
|
-
range.end <
|
|
269
|
-
dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) {
|
|
270
|
-
seg.end = range.end;
|
|
271
|
-
seg.isEnd = true;
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return segs;
|
|
277
|
-
};
|
|
278
|
-
return ListView;
|
|
279
|
-
}(common.DateComponent));
|
|
280
|
-
function renderNoEventsInner(hookProps) {
|
|
281
|
-
return hookProps.text;
|
|
282
|
-
}
|
|
283
|
-
function computeDateVars(dateProfile) {
|
|
284
|
-
var dayStart = common.startOfDay(dateProfile.renderRange.start);
|
|
285
|
-
var viewEnd = dateProfile.renderRange.end;
|
|
286
|
-
var dayDates = [];
|
|
287
|
-
var dayRanges = [];
|
|
288
|
-
while (dayStart < viewEnd) {
|
|
289
|
-
dayDates.push(dayStart);
|
|
290
|
-
dayRanges.push({
|
|
291
|
-
start: dayStart,
|
|
292
|
-
end: common.addDays(dayStart, 1),
|
|
293
|
-
});
|
|
294
|
-
dayStart = common.addDays(dayStart, 1);
|
|
295
|
-
}
|
|
296
|
-
return { dayDates: dayDates, dayRanges: dayRanges };
|
|
297
|
-
}
|
|
298
|
-
// Returns a sparse array of arrays, segs grouped by their dayIndex
|
|
299
|
-
function groupSegsByDay(segs) {
|
|
300
|
-
var segsByDay = []; // sparse array
|
|
301
|
-
var i;
|
|
302
|
-
var seg;
|
|
303
|
-
for (i = 0; i < segs.length; i += 1) {
|
|
304
|
-
seg = segs[i];
|
|
305
|
-
(segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))
|
|
306
|
-
.push(seg);
|
|
307
|
-
}
|
|
308
|
-
return segsByDay;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
var OPTION_REFINERS = {
|
|
312
|
-
listDayFormat: createFalsableFormatter,
|
|
313
|
-
listDaySideFormat: createFalsableFormatter,
|
|
314
|
-
noEventsClassNames: common.identity,
|
|
315
|
-
noEventsContent: common.identity,
|
|
316
|
-
noEventsDidMount: common.identity,
|
|
317
|
-
noEventsWillUnmount: common.identity,
|
|
318
|
-
// noEventsText is defined in base options
|
|
319
|
-
};
|
|
320
|
-
function createFalsableFormatter(input) {
|
|
321
|
-
return input === false ? null : common.createFormatter(input);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
var plugin = common.createPlugin({
|
|
325
|
-
optionRefiners: OPTION_REFINERS,
|
|
326
|
-
views: {
|
|
327
|
-
list: {
|
|
328
|
-
component: ListView,
|
|
329
|
-
buttonTextKey: 'list',
|
|
330
|
-
listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' }, // like "January 1, 2016"
|
|
331
|
-
},
|
|
332
|
-
listDay: {
|
|
333
|
-
type: 'list',
|
|
334
|
-
duration: { days: 1 },
|
|
335
|
-
listDayFormat: { weekday: 'long' }, // day-of-week is all we need. full date is probably in headerToolbar
|
|
336
|
-
},
|
|
337
|
-
listWeek: {
|
|
338
|
-
type: 'list',
|
|
339
|
-
duration: { weeks: 1 },
|
|
340
|
-
listDayFormat: { weekday: 'long' },
|
|
341
|
-
listDaySideFormat: { month: 'long', day: 'numeric', year: 'numeric' },
|
|
342
|
-
},
|
|
343
|
-
listMonth: {
|
|
344
|
-
type: 'list',
|
|
345
|
-
duration: { month: 1 },
|
|
346
|
-
listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have
|
|
347
|
-
},
|
|
348
|
-
listYear: {
|
|
349
|
-
type: 'list',
|
|
350
|
-
duration: { year: 1 },
|
|
351
|
-
listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
common.globalPlugins.push(plugin);
|
|
357
|
-
|
|
358
|
-
exports.ListView = ListView;
|
|
359
|
-
exports.default = plugin;
|
|
360
|
-
|
|
361
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
362
|
-
|
|
363
|
-
return exports;
|
|
364
|
-
|
|
365
|
-
}({}, FullCalendar));
|
package/main.global.min.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
FullCalendar v5.11.3
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2022 Adam Shaw
|
|
5
|
-
*/
|
|
6
|
-
var FullCalendarList=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},i=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={textId:t.getUniqueDomId()},n}return a(n,e),n.prototype.render=function(){var e=this.context,n=e.theme,a=e.dateEnv,i=e.options,s=e.viewApi,l=this.props,d=l.cellId,c=l.dayDate,u=l.todayRange,m=this.state.textId,v=t.getDateMeta(c,u),y=i.listDayFormat?a.format(c,i.listDayFormat):"",f=i.listDaySideFormat?a.format(c,i.listDaySideFormat):"",g=r({date:a.toDate(c),view:s,textId:m,text:y,sideText:f,navLinkAttrs:t.buildNavLinkAttrs(this.context,c),sideNavLinkAttrs:t.buildNavLinkAttrs(this.context,c,"day",!1)},v),p=["fc-list-day"].concat(t.getDayClassNames(v,n));return t.createElement(t.RenderHook,{hookProps:g,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:o,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(e,a,r,i){return t.createElement("tr",{ref:e,className:p.concat(a).join(" "),"data-date":t.formatDayString(c)},t.createElement("th",{scope:"colgroup",colSpan:3,id:d,"aria-labelledby":m},t.createElement("div",{className:"fc-list-day-cushion "+n.getClass("tableCellShaded"),ref:r},i)))}))},n}(t.BaseComponent);function o(e){return t.createElement(t.Fragment,null,e.text&&t.createElement("a",r({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&t.createElement("a",r({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}var s=t.createFormatter({hour:"numeric",minute:"2-digit",meridiem:"short"}),l=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return a(n,e),n.prototype.render=function(){var e=this.props,n=this.context,a=e.seg,i=e.timeHeaderId,o=e.eventHeaderId,l=e.dateHeaderId,c=n.options.eventTimeFormat||s;return t.createElement(t.EventRoot,{seg:a,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:function(){return function(e,n){var a=t.getSegAnchorAttrs(e,n);return t.createElement("a",r({},a),e.eventRange.def.title)}(a,n)},isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,r,s,u,m){return t.createElement("tr",{className:["fc-list-event",m.event.url?"fc-event-forced-url":""].concat(r).join(" "),ref:e},function(e,n,a,r,i){var o=a.options;if(!1!==o.displayEventTime){var s=e.eventRange.def,l=e.eventRange.instance,c=!1,u=void 0;if(s.allDay?c=!0:t.isMultiDayRange(e.eventRange.range)?e.isStart?u=t.buildSegTimeText(e,n,a,null,null,l.range.start,e.end):e.isEnd?u=t.buildSegTimeText(e,n,a,null,null,e.start,l.range.end):c=!0:u=t.buildSegTimeText(e,n,a),c){var m={text:a.options.allDayText,view:a.viewApi};return t.createElement(t.RenderHook,{hookProps:m,classNames:o.allDayClassNames,content:o.allDayContent,defaultContent:d,didMount:o.allDayDidMount,willUnmount:o.allDayWillUnmount},(function(e,n,a,o){return t.createElement("td",{ref:e,headers:r+" "+i,className:["fc-list-event-time"].concat(n).join(" ")},o)}))}return t.createElement("td",{className:"fc-list-event-time"},u)}return null}(a,c,n,i,l),t.createElement("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},t.createElement("span",{className:"fc-list-event-dot",style:{borderColor:m.borderColor||m.backgroundColor}})),t.createElement("td",{ref:s,headers:o+" "+l,className:"fc-list-event-title"},u))}))},n}(t.BaseComponent);function d(e){return e.text}var c=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.computeDateVars=t.memoize(m),n.eventStoreToSegs=t.memoize(n._eventStoreToSegs),n.state={timeHeaderId:t.getUniqueDomId(),eventHeaderId:t.getUniqueDomId(),dateHeaderIdRoot:t.getUniqueDomId()},n.setRootEl=function(e){e?n.context.registerInteractiveComponent(n,{el:e}):n.context.unregisterInteractiveComponent(n)},n}return a(n,e),n.prototype.render=function(){var e=this,n=this.props,a=this.context,r=["fc-list",a.theme.getClass("table"),!1!==a.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(n.dateProfile),o=i.dayDates,s=i.dayRanges,l=this.eventStoreToSegs(n.eventStore,n.eventUiBases,s);return t.createElement(t.ViewRoot,{viewSpec:a.viewSpec,elRef:this.setRootEl},(function(a,i){return t.createElement("div",{ref:a,className:r.concat(i).join(" ")},t.createElement(t.Scroller,{liquid:!n.isHeightAuto,overflowX:n.isHeightAuto?"visible":"hidden",overflowY:n.isHeightAuto?"visible":"auto"},l.length>0?e.renderSegList(l,o):e.renderEmptyMessage()))}))},n.prototype.renderEmptyMessage=function(){var e=this.context,n=e.options,a=e.viewApi,r={text:n.noEventsText,view:a};return t.createElement(t.RenderHook,{hookProps:r,classNames:n.noEventsClassNames,content:n.noEventsContent,defaultContent:u,didMount:n.noEventsDidMount,willUnmount:n.noEventsWillUnmount},(function(e,n,a,r){return t.createElement("div",{className:["fc-list-empty"].concat(n).join(" "),ref:e},t.createElement("div",{className:"fc-list-empty-cushion",ref:a},r))}))},n.prototype.renderSegList=function(e,n){var a=this.context,o=a.theme,s=a.options,d=this.state,c=d.timeHeaderId,u=d.eventHeaderId,m=d.dateHeaderIdRoot,v=function(e){var t,n,a=[];for(t=0;t<e.length;t+=1)(a[(n=e[t]).dayIndex]||(a[n.dayIndex]=[])).push(n);return a}(e);return t.createElement(t.NowTimer,{unit:"day"},(function(e,a){for(var d=[],y=0;y<v.length;y+=1){var f=v[y];if(f){var g=t.formatDayString(n[y]),p=m+"-"+g;d.push(t.createElement(i,{key:g,cellId:p,dayDate:n[y],todayRange:a}));for(var h=0,E=f=t.sortEventSegs(f,s.eventOrder);h<E.length;h++){var D=E[h];d.push(t.createElement(l,r({key:g+":"+D.eventRange.instance.instanceId,seg:D,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:c,eventHeaderId:u,dateHeaderId:p},t.getSegMeta(D,a,e))))}}}return t.createElement("table",{className:"fc-list-table "+o.getClass("table")},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",{scope:"col",id:c},s.timeHint),t.createElement("th",{scope:"col","aria-hidden":!0}),t.createElement("th",{scope:"col",id:u},s.eventHint))),t.createElement("tbody",null,d))}))},n.prototype._eventStoreToSegs=function(e,n,a){return this.eventRangesToSegs(t.sliceEventStore(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,a)},n.prototype.eventRangesToSegs=function(e,t){for(var n=[],a=0,r=e;a<r.length;a++){var i=r[a];n.push.apply(n,this.eventRangeToSegs(i,t))}return n},n.prototype.eventRangeToSegs=function(e,n){var a,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,l=e.range,d=e.def.allDay,c=[];for(a=0;a<n.length;a+=1)if((r=t.intersectRanges(l,n[a]))&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===l.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===l.end.valueOf(),dayIndex:a},c.push(i),!i.isEnd&&!d&&a+1<n.length&&l.end<o.add(n[a+1].start,s))){i.end=l.end,i.isEnd=!0;break}return c},n}(t.DateComponent);function u(e){return e.text}function m(e){for(var n=t.startOfDay(e.renderRange.start),a=e.renderRange.end,r=[],i=[];n<a;)r.push(n),i.push({start:n,end:t.addDays(n,1)}),n=t.addDays(n,1);return{dayDates:r,dayRanges:i}}var v={listDayFormat:y,listDaySideFormat:y,noEventsClassNames:t.identity,noEventsContent:t.identity,noEventsDidMount:t.identity,noEventsWillUnmount:t.identity};function y(e){return!1===e?null:t.createFormatter(e)}var f=t.createPlugin({optionRefiners:v,views:{list:{component:c,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"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});return t.globalPlugins.push(f),e.ListView=c,e.default=f,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar);
|