@fullcalendar/list 4.3.0 → 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/main.css CHANGED
@@ -115,4 +115,4 @@
115
115
  .fc-unthemed .fc-list-empty {
116
116
  /* theme will provide own background */
117
117
  background-color: #eee;
118
- }
118
+ }
package/main.d.ts CHANGED
@@ -10,15 +10,18 @@ declare module '@fullcalendar/list' {
10
10
  }
11
11
 
12
12
  declare module '@fullcalendar/list/ListView' {
13
- import { View, ViewProps, ScrollComponent, DateMarker, DateRange, DateProfileGenerator, ComponentContext, ViewSpec, EventUiHash, EventRenderRange, EventStore, Seg } from '@fullcalendar/core';
13
+ import { View, ViewProps, ScrollComponent, DateMarker, DateRange, ComponentContext, EventUiHash, EventRenderRange, EventStore, Seg, ViewSpec } from '@fullcalendar/core';
14
14
  export { ListView as default, ListView };
15
15
  class ListView extends View {
16
16
  scroller: ScrollComponent;
17
17
  contentEl: HTMLElement;
18
18
  dayDates: DateMarker[];
19
- constructor(context: ComponentContext, viewSpec: ViewSpec, dateProfileGenerator: DateProfileGenerator, parentEl: HTMLElement);
20
- render(props: ViewProps): void;
19
+ constructor(viewSpec: ViewSpec, parentEl: HTMLElement);
20
+ firstContext(context: ComponentContext): void;
21
+ render(props: ViewProps, context: ComponentContext): void;
21
22
  destroy(): void;
23
+ _renderSkeleton(context: ComponentContext): void;
24
+ _unrenderSkeleton(): void;
22
25
  updateSize(isResize: any, viewHeight: any, isAuto: any): void;
23
26
  computeScrollerHeight(viewHeight: any): number;
24
27
  _eventStoreToSegs(eventStore: EventStore, eventUiBases: EventUiHash, dayRanges: DateRange[]): Seg[];
package/main.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar List View Plugin v4.3.0
2
+ FullCalendar List View Plugin v4.4.0
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2019 Adam Shaw
5
5
  */
@@ -38,7 +38,7 @@ function __extends(d, b) {
38
38
  var ListEventRenderer = /** @class */ (function (_super) {
39
39
  __extends(ListEventRenderer, _super);
40
40
  function ListEventRenderer(listView) {
41
- var _this = _super.call(this, listView.context) || this;
41
+ var _this = _super.call(this) || this;
42
42
  _this.listView = listView;
43
43
  return _this;
44
44
  }
@@ -54,7 +54,7 @@ var ListEventRenderer = /** @class */ (function (_super) {
54
54
  };
55
55
  // generates the HTML for a single event row
56
56
  ListEventRenderer.prototype.renderSegHtml = function (seg) {
57
- var _a = this.context, view = _a.view, theme = _a.theme;
57
+ var _a = this.context, theme = _a.theme, options = _a.options;
58
58
  var eventRange = seg.eventRange;
59
59
  var eventDef = eventRange.def;
60
60
  var eventInstance = eventRange.instance;
@@ -64,7 +64,7 @@ var ListEventRenderer = /** @class */ (function (_super) {
64
64
  var bgColor = eventUi.backgroundColor;
65
65
  var timeHtml;
66
66
  if (eventDef.allDay) {
67
- timeHtml = getAllDayHtml(view);
67
+ timeHtml = getAllDayHtml(options);
68
68
  }
69
69
  else if (isMultiDayRange(eventRange.range)) {
70
70
  if (seg.isStart) {
@@ -76,7 +76,7 @@ var ListEventRenderer = /** @class */ (function (_super) {
76
76
  ));
77
77
  }
78
78
  else { // inner segment that lasts the whole day
79
- timeHtml = getAllDayHtml(view);
79
+ timeHtml = getAllDayHtml(options);
80
80
  }
81
81
  }
82
82
  else {
@@ -122,41 +122,53 @@ Responsible for the scroller, and forwarding event-related actions into the "gri
122
122
  */
123
123
  var ListView = /** @class */ (function (_super) {
124
124
  __extends(ListView, _super);
125
- function ListView(context, viewSpec, dateProfileGenerator, parentEl) {
126
- var _this = _super.call(this, context, viewSpec, dateProfileGenerator, parentEl) || this;
125
+ function ListView(viewSpec, parentEl) {
126
+ var _this = _super.call(this, viewSpec, parentEl) || this;
127
127
  _this.computeDateVars = memoize(computeDateVars);
128
128
  _this.eventStoreToSegs = memoize(_this._eventStoreToSegs);
129
+ _this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);
129
130
  var eventRenderer = _this.eventRenderer = new ListEventRenderer(_this);
130
- _this.renderContent = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer));
131
- _this.el.classList.add('fc-list-view');
132
- var listViewClassNames = (_this.theme.getClass('listView') || '').split(' '); // wish we didn't have to do this
133
- for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {
134
- var listViewClassName = listViewClassNames_1[_i];
135
- if (listViewClassName) { // in case input was empty string
136
- _this.el.classList.add(listViewClassName);
137
- }
138
- }
139
- _this.scroller = new ScrollComponent('hidden', // overflow x
140
- 'auto' // overflow y
141
- );
142
- _this.el.appendChild(_this.scroller.el);
143
- _this.contentEl = _this.scroller.el; // shortcut
144
- context.calendar.registerInteractiveComponent(_this, {
145
- el: _this.el
146
- // TODO: make aware that it doesn't do Hits
147
- });
131
+ _this.renderContent = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [_this.renderSkeleton]);
148
132
  return _this;
149
133
  }
150
- ListView.prototype.render = function (props) {
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);
151
142
  var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;
152
143
  this.dayDates = dayDates;
153
- this.renderContent(this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
144
+ this.renderSkeleton(context);
145
+ this.renderContent(context, this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
154
146
  };
155
147
  ListView.prototype.destroy = function () {
156
148
  _super.prototype.destroy.call(this);
149
+ this.renderSkeleton.unrender();
157
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
158
171
  this.scroller.destroy(); // will remove the Grid too
159
- this.calendar.unregisterInteractiveComponent(this);
160
172
  };
161
173
  ListView.prototype.updateSize = function (isResize, viewHeight, isAuto) {
162
174
  _super.prototype.updateSize.call(this, isResize, viewHeight, isAuto);
@@ -172,7 +184,7 @@ var ListView = /** @class */ (function (_super) {
172
184
  subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
173
185
  };
174
186
  ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
175
- return this.eventRangesToSegs(sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.nextDayThreshold).fg, dayRanges);
187
+ return this.eventRangesToSegs(sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.nextDayThreshold).fg, dayRanges);
176
188
  };
177
189
  ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
178
190
  var segs = [];
@@ -183,7 +195,7 @@ var ListView = /** @class */ (function (_super) {
183
195
  return segs;
184
196
  };
185
197
  ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
186
- var _a = this, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
198
+ var _a = this.context, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
187
199
  var range = eventRange.range;
188
200
  var allDay = eventRange.def.allDay;
189
201
  var dayIndex;
@@ -222,18 +234,19 @@ var ListView = /** @class */ (function (_super) {
222
234
  '<div class="fc-list-empty-wrap2">' + // TODO: try less wraps
223
235
  '<div class="fc-list-empty-wrap1">' +
224
236
  '<div class="fc-list-empty">' +
225
- htmlEscape(this.opt('noEventsMessage')) +
237
+ htmlEscape(this.context.options.noEventsMessage) +
226
238
  '</div>' +
227
239
  '</div>' +
228
240
  '</div>';
229
241
  };
230
242
  // called by ListEventRenderer
231
243
  ListView.prototype.renderSegList = function (allSegs) {
244
+ var theme = this.context.theme;
232
245
  var segsByDay = this.groupSegsByDay(allSegs); // sparse array
233
246
  var dayIndex;
234
247
  var daySegs;
235
248
  var i;
236
- var tableEl = htmlToElement('<table class="fc-list-table ' + this.calendar.theme.getClass('tableList') + '"><tbody></tbody></table>');
249
+ var tableEl = htmlToElement('<table class="fc-list-table ' + theme.getClass('tableList') + '"><tbody></tbody></table>');
237
250
  var tbodyEl = tableEl.querySelector('tbody');
238
251
  for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {
239
252
  daySegs = segsByDay[dayIndex];
@@ -263,20 +276,20 @@ var ListView = /** @class */ (function (_super) {
263
276
  };
264
277
  // generates the HTML for the day headers that live amongst the event rows
265
278
  ListView.prototype.buildDayHeaderRow = function (dayDate) {
266
- var dateEnv = this.dateEnv;
267
- var mainFormat = createFormatter(this.opt('listDayFormat')); // TODO: cache
268
- var altFormat = createFormatter(this.opt('listDayAltFormat')); // TODO: cache
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
269
282
  return createElement('tr', {
270
283
  className: 'fc-list-heading',
271
284
  'data-date': dateEnv.formatIso(dayDate, { omitTime: true })
272
- }, '<td class="' + (this.calendar.theme.getClass('tableListHeading') ||
273
- this.calendar.theme.getClass('widgetHeader')) + '" colspan="3">' +
285
+ }, '<td class="' + (theme.getClass('tableListHeading') ||
286
+ theme.getClass('widgetHeader')) + '" colspan="3">' +
274
287
  (mainFormat ?
275
- buildGotoAnchorHtml(this, dayDate, { 'class': 'fc-list-heading-main' }, htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
288
+ buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-main' }, htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
276
289
  ) :
277
290
  '') +
278
291
  (altFormat ?
279
- buildGotoAnchorHtml(this, dayDate, { 'class': 'fc-list-heading-alt' }, htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
292
+ buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-alt' }, htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
280
293
  ) :
281
294
  '') +
282
295
  '</td>');
package/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar List View Plugin v4.3.0
2
+ FullCalendar List View Plugin v4.4.0
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2019 Adam Shaw
5
5
  */
@@ -42,7 +42,7 @@ Docs & License: https://fullcalendar.io/
42
42
  var ListEventRenderer = /** @class */ (function (_super) {
43
43
  __extends(ListEventRenderer, _super);
44
44
  function ListEventRenderer(listView) {
45
- var _this = _super.call(this, listView.context) || this;
45
+ var _this = _super.call(this) || this;
46
46
  _this.listView = listView;
47
47
  return _this;
48
48
  }
@@ -58,7 +58,7 @@ Docs & License: https://fullcalendar.io/
58
58
  };
59
59
  // generates the HTML for a single event row
60
60
  ListEventRenderer.prototype.renderSegHtml = function (seg) {
61
- var _a = this.context, view = _a.view, theme = _a.theme;
61
+ var _a = this.context, theme = _a.theme, options = _a.options;
62
62
  var eventRange = seg.eventRange;
63
63
  var eventDef = eventRange.def;
64
64
  var eventInstance = eventRange.instance;
@@ -68,7 +68,7 @@ Docs & License: https://fullcalendar.io/
68
68
  var bgColor = eventUi.backgroundColor;
69
69
  var timeHtml;
70
70
  if (eventDef.allDay) {
71
- timeHtml = core.getAllDayHtml(view);
71
+ timeHtml = core.getAllDayHtml(options);
72
72
  }
73
73
  else if (core.isMultiDayRange(eventRange.range)) {
74
74
  if (seg.isStart) {
@@ -80,7 +80,7 @@ Docs & License: https://fullcalendar.io/
80
80
  ));
81
81
  }
82
82
  else { // inner segment that lasts the whole day
83
- timeHtml = core.getAllDayHtml(view);
83
+ timeHtml = core.getAllDayHtml(options);
84
84
  }
85
85
  }
86
86
  else {
@@ -126,41 +126,53 @@ Docs & License: https://fullcalendar.io/
126
126
  */
127
127
  var ListView = /** @class */ (function (_super) {
128
128
  __extends(ListView, _super);
129
- function ListView(context, viewSpec, dateProfileGenerator, parentEl) {
130
- var _this = _super.call(this, context, viewSpec, dateProfileGenerator, parentEl) || this;
129
+ function ListView(viewSpec, parentEl) {
130
+ var _this = _super.call(this, viewSpec, parentEl) || this;
131
131
  _this.computeDateVars = core.memoize(computeDateVars);
132
132
  _this.eventStoreToSegs = core.memoize(_this._eventStoreToSegs);
133
+ _this.renderSkeleton = core.memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);
133
134
  var eventRenderer = _this.eventRenderer = new ListEventRenderer(_this);
134
- _this.renderContent = core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer));
135
- _this.el.classList.add('fc-list-view');
136
- var listViewClassNames = (_this.theme.getClass('listView') || '').split(' '); // wish we didn't have to do this
137
- for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {
138
- var listViewClassName = listViewClassNames_1[_i];
139
- if (listViewClassName) { // in case input was empty string
140
- _this.el.classList.add(listViewClassName);
141
- }
142
- }
143
- _this.scroller = new core.ScrollComponent('hidden', // overflow x
144
- 'auto' // overflow y
145
- );
146
- _this.el.appendChild(_this.scroller.el);
147
- _this.contentEl = _this.scroller.el; // shortcut
148
- context.calendar.registerInteractiveComponent(_this, {
149
- el: _this.el
150
- // TODO: make aware that it doesn't do Hits
151
- });
135
+ _this.renderContent = core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [_this.renderSkeleton]);
152
136
  return _this;
153
137
  }
154
- ListView.prototype.render = function (props) {
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);
155
146
  var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;
156
147
  this.dayDates = dayDates;
157
- this.renderContent(this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
148
+ this.renderSkeleton(context);
149
+ this.renderContent(context, this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
158
150
  };
159
151
  ListView.prototype.destroy = function () {
160
152
  _super.prototype.destroy.call(this);
153
+ this.renderSkeleton.unrender();
161
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
161
+ for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {
162
+ var listViewClassName = listViewClassNames_1[_i];
163
+ if (listViewClassName) { // in case input was empty string
164
+ this.el.classList.add(listViewClassName);
165
+ }
166
+ }
167
+ this.scroller = new core.ScrollComponent('hidden', // overflow x
168
+ 'auto' // overflow y
169
+ );
170
+ this.el.appendChild(this.scroller.el);
171
+ this.contentEl = this.scroller.el; // shortcut
172
+ };
173
+ ListView.prototype._unrenderSkeleton = function () {
174
+ // TODO: remove classNames
162
175
  this.scroller.destroy(); // will remove the Grid too
163
- this.calendar.unregisterInteractiveComponent(this);
164
176
  };
165
177
  ListView.prototype.updateSize = function (isResize, viewHeight, isAuto) {
166
178
  _super.prototype.updateSize.call(this, isResize, viewHeight, isAuto);
@@ -176,7 +188,7 @@ Docs & License: https://fullcalendar.io/
176
188
  core.subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
177
189
  };
178
190
  ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
179
- 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);
180
192
  };
181
193
  ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
182
194
  var segs = [];
@@ -187,7 +199,7 @@ Docs & License: https://fullcalendar.io/
187
199
  return segs;
188
200
  };
189
201
  ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
190
- var _a = this, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
202
+ var _a = this.context, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
191
203
  var range = eventRange.range;
192
204
  var allDay = eventRange.def.allDay;
193
205
  var dayIndex;
@@ -226,18 +238,19 @@ Docs & License: https://fullcalendar.io/
226
238
  '<div class="fc-list-empty-wrap2">' + // TODO: try less wraps
227
239
  '<div class="fc-list-empty-wrap1">' +
228
240
  '<div class="fc-list-empty">' +
229
- core.htmlEscape(this.opt('noEventsMessage')) +
241
+ core.htmlEscape(this.context.options.noEventsMessage) +
230
242
  '</div>' +
231
243
  '</div>' +
232
244
  '</div>';
233
245
  };
234
246
  // called by ListEventRenderer
235
247
  ListView.prototype.renderSegList = function (allSegs) {
248
+ var theme = this.context.theme;
236
249
  var segsByDay = this.groupSegsByDay(allSegs); // sparse array
237
250
  var dayIndex;
238
251
  var daySegs;
239
252
  var i;
240
- var tableEl = core.htmlToElement('<table class="fc-list-table ' + this.calendar.theme.getClass('tableList') + '"><tbody></tbody></table>');
253
+ var tableEl = core.htmlToElement('<table class="fc-list-table ' + theme.getClass('tableList') + '"><tbody></tbody></table>');
241
254
  var tbodyEl = tableEl.querySelector('tbody');
242
255
  for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {
243
256
  daySegs = segsByDay[dayIndex];
@@ -267,20 +280,20 @@ Docs & License: https://fullcalendar.io/
267
280
  };
268
281
  // generates the HTML for the day headers that live amongst the event rows
269
282
  ListView.prototype.buildDayHeaderRow = function (dayDate) {
270
- var dateEnv = this.dateEnv;
271
- var mainFormat = core.createFormatter(this.opt('listDayFormat')); // TODO: cache
272
- var altFormat = core.createFormatter(this.opt('listDayAltFormat')); // TODO: cache
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
273
286
  return core.createElement('tr', {
274
287
  className: 'fc-list-heading',
275
288
  'data-date': dateEnv.formatIso(dayDate, { omitTime: true })
276
- }, '<td class="' + (this.calendar.theme.getClass('tableListHeading') ||
277
- this.calendar.theme.getClass('widgetHeader')) + '" colspan="3">' +
289
+ }, '<td class="' + (theme.getClass('tableListHeading') ||
290
+ theme.getClass('widgetHeader')) + '" colspan="3">' +
278
291
  (mainFormat ?
279
- core.buildGotoAnchorHtml(this, dayDate, { 'class': 'fc-list-heading-main' }, core.htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
292
+ core.buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-main' }, core.htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
280
293
  ) :
281
294
  '') +
282
295
  (altFormat ?
283
- core.buildGotoAnchorHtml(this, dayDate, { 'class': 'fc-list-heading-alt' }, core.htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
296
+ core.buildGotoAnchorHtml(options, dateEnv, dayDate, { 'class': 'fc-list-heading-alt' }, core.htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
284
297
  ) :
285
298
  '') +
286
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,CAAC;AAC9C,QAAQ,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAClC,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,IAAI,iBAAiB,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,IAAI,EAAE;AAC7D,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAC1B,YAAY,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE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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):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,t.context)||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.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>"},n.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},n}(t.FgEventRenderer),a=function(e){function n(n,r,a,o){var l=e.call(this,n,r,a,o)||this;l.computeDateVars=t.memoize(i),l.eventStoreToSegs=t.memoize(l._eventStoreToSegs);var d=l.eventRenderer=new s(l);l.renderContent=t.memoizeRendering(d.renderSegs.bind(d),d.unrender.bind(d)),l.el.classList.add("fc-list-view");for(var c=0,p=(l.theme.getClass("listView")||"").split(" ");c<p.length;c++){var h=p[c];h&&l.el.classList.add(h)}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 r(n,e),n.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))},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderContent.unrender(),this.scroller.destroy(),this.calendar.unregisterInteractiveComponent(this)},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.nextDayThreshold).fg,r)},n.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},n.prototype.eventRangeToSegs=function(e,n){var r,s,a,i=this.dateEnv,o=this.nextDayThreshold,l=e.range,d=e.def.allDay,c=[];for(r=0;r<n.length;r++)if((s=t.intersectRanges(l,n[r]))&&(a={component:this,eventRange:e,start:s.start,end:s.end,isStart:e.isStart&&s.start.valueOf()===l.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===l.end.valueOf(),dayIndex:r},c.push(a),!a.isEnd&&!d&&r+1<n.length&&l.end<i.add(n[r+1].start,o))){a.end=l.end,a.isEnd=!0;break}return c},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.opt("noEventsMessage"))+"</div></div></div>"},n.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)},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.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>")},n}(t.View);function i(e){for(var n=t.startOfDay(e.renderRange.start),r=e.renderRange.end,s=[],a=[];n<r;)s.push(n),a.push({start:n,end:t.addDays(n,1)}),n=t.addDays(n,1);return{dayDates:s,dayRanges:a}}a.prototype.fgSegSelector=".fc-list-item";var o=t.createPlugin({views:{list:{class:a,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=a,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullcalendar/list",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "title": "FullCalendar List View Plugin",
5
5
  "description": "View your events as a bulleted list",
6
6
  "keywords": [
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "copyright": "2019 Adam Shaw",
26
26
  "peerDependencies": {
27
- "@fullcalendar/core": "~4.3.0"
27
+ "@fullcalendar/core": "~4.4.0"
28
28
  },
29
29
  "main": "main.js",
30
30
  "module": "main.esm.js",