fullcalendar
Version:
FullCalendar Vanilla JS package for rendering a calendar
99 lines (93 loc) • 5.75 kB
JavaScript
import { c as settleClearTimeout, b as settleSetTimeout } from './chunks/7f18d777.js';
export { E as Emitter, a as applyStyleProp, e as computeElIsRtl, d as config, i as holdSettle, c as settleClearTimeout, s as settleRequestAnimationFrame, b as settleSetTimeout, w as whenSettled } from './chunks/7f18d777.js';
export { DateEnv, addDays, addMs, asCleanDays, asRoughMinutes, asRoughMs, asRoughSeconds, createDuration, diffDayAndTime, diffWholeDays, diffWholeWeeks, formatDayString, greatestDurationDenominator, intersectRanges, isInt, isValidDate, multiplyDuration, padStart, parseMarker, rangeContainsMarker, rangesEqual, rangesIntersect, startOfDay, wholeDivideDurations } from '@full-ui/headless-calendar';
import 'preact';
export { u as EventImpl, aq as buildEventRangeKey, Z as buildValidInstanceRange, as as combineEventUis, au as compareByFieldSpecs, J as computeViewBorderless, T as computeVisibleDayRange, c as createEventUi, e as createFormatter, f as filterHash, av as flexibleCompare, a4 as getDateSpanInstantEndMs, a3 as getDateSpanInstantStartMs, D as getElEventRange, ai as getEventRangeMeta, $ as getRangeInstantEndMs, a0 as getRangeInstantStartMs, g as guid, i as identity, H as isArraysEqual, I as isPropsEqualShallow, n as mapHash, Y as mergeEventStores, aw as parseFieldSpecs, Q as refineClassName, ax as refineClassNameGenerator, r as refineProps, ay as removeExact, ah as sortEventSegs, w as warn } from './chunks/3954681c.js';
export { C as CalendarApiImpl, d as CalendarDataManager, b as CalendarInner, a as CalendarMediaRoot, c as computeRootClassName, p as parseBusinessHours } from './chunks/c2f96bef.js';
export { B as BaseComponent, C as ContentContainer, e as DateComponent, D as DelayedRunner, d as NowTimer, R as RenderId, S as Scroller, k as StandardEvent, h as ViewContainer, q as afterSize, p as buildNavLinkAttrs, n as findDayNumberText, o as findMonthText, l as findWeekdayText, g as generateClassName, i as getDateMeta, y as getFooterScrollbarSticky, c as getIsHeightAuto, x as getTableHeaderSticky, m as memoize, a as memoizeObjArg, s as setRef, w as watchHeight, u as watchSize, t as watchWidth } from './chunks/8c472da4.js';
export { h as computeEdges, e as computeInnerRect, g as getRectCenter } from './chunks/8d512140.js';
export { j as joinFuncishClassNames, m as mergeCalendarOptions, c as mergeContentInjectors, d as mergeLifecycleCallbacks, a as mergeViewOptionsMap } from './chunks/6ef0f038.js';
export { A as AllDaySplitter, D as DayTimeColsSlicer, N as NowIndicatorDot, a as NowIndicatorHeaderContainer, c as NowIndicatorLineContainer, S as Splitter, T as TimeGridLayout, d as buildDayCols, b as buildDayColsFromSeries, e as computeTimeGridPrintMode, o as organizeSegsByCol, s as splitInteractionByCol } from './chunks/53f7335e.js';
export { e as requestJson, u as unpromisify } from './chunks/36d3f54a.js';
export { D as DateProfileGenerator, c as computeMajorUnit, i as isMajorUnit } from './chunks/269d7ef4.js';
export { B as BgEvent, z as DEFAULT_UNMEASURED_EVENT_THICKNESS, d as DaySeriesModel, e as DaySeriesSlicer, A as DayTableModel, D as DayTableSlicer, C as MeasuredHeightHarness, y as MoreLinkContainer, g as RefMap, R as Ruler, S as Slicer, E as buildDateDataConfigs, F as buildDateRenderConfig, f as buildDateRowConfig, b as buildDayTableModel, G as buildLevelLimitedLayout, H as buildPrintEventBands, I as buildPrintMoreLinkBand, J as computeLateralSpanBottom, c as createDayHeaderFormatter, K as getSliceKey, u as groupLaterallyIntersecting, L as planPrintDomCandidates, s as renderFill, w as sortByAxisOrder } from './chunks/a7fc0962.js';
export { E as ElementDragging, b as isPropsValid } from './chunks/dd5f867a.js';
export { D as DayGridLayout, F as FooterScrollbar } from './chunks/34962c89.js';
function debounce(fn, ms) {
let timeoutStarted;
let timeoutAdded;
let timeoutId; // thruthiness indicates whether active timeout
function runWithTimeout(timeout) {
timeoutStarted = Date.now();
timeoutAdded = 0;
timeoutId = settleSetTimeout(() => {
if (timeoutAdded) {
runWithTimeout(timeoutAdded);
}
else {
timeoutId = undefined;
fn();
}
}, timeout);
}
function request() {
if (timeoutId) {
timeoutAdded = Date.now() - timeoutStarted;
}
else {
runWithTimeout(ms);
}
}
function cancel() {
if (timeoutId) {
settleClearTimeout(timeoutId);
timeoutId = undefined;
}
}
return [request, cancel];
}
class Store {
constructor() {
this.handlers = [];
}
set(value) {
this.currentValue = value;
for (let handler of this.handlers) {
handler(value);
}
}
subscribe(handler) {
this.handlers.push(handler);
if (this.currentValue !== undefined) {
handler(this.currentValue);
}
}
}
/*
Subscribers will get a LIST of CustomRenderings
*/
class CustomRenderingStore extends Store {
constructor() {
super(...arguments);
this.map = new Map();
}
// for consistent order
handle(customRendering) {
const { map } = this;
let updated = false;
if (customRendering.isActive) {
map.set(customRendering.id, customRendering);
updated = true;
}
else if (map.has(customRendering.id)) {
map.delete(customRendering.id);
updated = true;
}
if (updated) {
this.set(map);
}
}
}
// StrictMode always OFF
const strictModeFactor = 1;
export { CustomRenderingStore, debounce, strictModeFactor };