@fullcalendar/core 6.1.15 → 7.0.0-beta.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/index.cjs +42 -104
- package/index.d.ts +2 -1
- package/index.global.js +1338 -1656
- package/index.global.min.js +2 -2
- package/index.js +45 -107
- package/internal-common.cjs +2237 -2493
- package/internal-common.d.ts +137 -272
- package/internal-common.js +2227 -2478
- package/internal.cjs +12 -17
- package/internal.d.ts +2 -1
- package/internal.js +1 -1
- package/locales/af.global.js +1 -1
- package/locales/af.global.min.js +1 -1
- package/locales/ar-dz.global.js +1 -1
- package/locales/ar-dz.global.min.js +1 -1
- package/locales/ar-kw.global.js +1 -1
- package/locales/ar-kw.global.min.js +1 -1
- package/locales/ar-ly.global.js +1 -1
- package/locales/ar-ly.global.min.js +1 -1
- package/locales/ar-ma.global.js +1 -1
- package/locales/ar-ma.global.min.js +1 -1
- package/locales/ar-sa.global.js +1 -1
- package/locales/ar-sa.global.min.js +1 -1
- package/locales/ar-tn.global.js +1 -1
- package/locales/ar-tn.global.min.js +1 -1
- package/locales/ar.global.js +1 -1
- package/locales/ar.global.min.js +1 -1
- package/locales/az.global.js +1 -1
- package/locales/az.global.min.js +1 -1
- package/locales/bg.global.js +1 -1
- package/locales/bg.global.min.js +1 -1
- package/locales/bn.global.js +1 -1
- package/locales/bn.global.min.js +1 -1
- package/locales/bs.global.js +1 -1
- package/locales/bs.global.min.js +1 -1
- package/locales/ca.global.js +1 -1
- package/locales/ca.global.min.js +1 -1
- package/locales/cs.global.js +1 -1
- package/locales/cs.global.min.js +1 -1
- package/locales/cy.global.js +1 -1
- package/locales/cy.global.min.js +1 -1
- package/locales/da.global.js +1 -1
- package/locales/da.global.min.js +1 -1
- package/locales/de-at.global.js +1 -1
- package/locales/de-at.global.min.js +1 -1
- package/locales/de.global.js +1 -1
- package/locales/de.global.min.js +1 -1
- package/locales/el.global.js +1 -1
- package/locales/el.global.min.js +1 -1
- package/locales/en-au.global.js +1 -1
- package/locales/en-au.global.min.js +1 -1
- package/locales/en-gb.global.js +1 -1
- package/locales/en-gb.global.min.js +1 -1
- package/locales/en-nz.global.js +1 -1
- package/locales/en-nz.global.min.js +1 -1
- package/locales/eo.global.js +1 -1
- package/locales/eo.global.min.js +1 -1
- package/locales/es-us.global.js +1 -1
- package/locales/es-us.global.min.js +1 -1
- package/locales/es.global.js +1 -1
- package/locales/es.global.min.js +1 -1
- package/locales/et.global.js +1 -1
- package/locales/et.global.min.js +1 -1
- package/locales/eu.global.js +1 -1
- package/locales/eu.global.min.js +1 -1
- package/locales/fa.global.js +1 -1
- package/locales/fa.global.min.js +1 -1
- package/locales/fi.global.js +1 -1
- package/locales/fi.global.min.js +1 -1
- package/locales/fr-ca.global.js +1 -1
- package/locales/fr-ca.global.min.js +1 -1
- package/locales/fr-ch.global.js +1 -1
- package/locales/fr-ch.global.min.js +1 -1
- package/locales/fr.global.js +1 -1
- package/locales/fr.global.min.js +1 -1
- package/locales/gl.global.js +1 -1
- package/locales/gl.global.min.js +1 -1
- package/locales/he.global.js +1 -1
- package/locales/he.global.min.js +1 -1
- package/locales/hi.global.js +1 -1
- package/locales/hi.global.min.js +1 -1
- package/locales/hr.global.js +1 -1
- package/locales/hr.global.min.js +1 -1
- package/locales/hu.global.js +1 -1
- package/locales/hu.global.min.js +1 -1
- package/locales/hy-am.global.js +1 -1
- package/locales/hy-am.global.min.js +1 -1
- package/locales/id.global.js +1 -1
- package/locales/id.global.min.js +1 -1
- package/locales/is.global.js +1 -1
- package/locales/is.global.min.js +1 -1
- package/locales/it.global.js +1 -1
- package/locales/it.global.min.js +1 -1
- package/locales/ja.global.js +1 -1
- package/locales/ja.global.min.js +1 -1
- package/locales/ka.global.js +1 -1
- package/locales/ka.global.min.js +1 -1
- package/locales/kk.global.js +1 -1
- package/locales/kk.global.min.js +1 -1
- package/locales/km.global.js +1 -1
- package/locales/km.global.min.js +1 -1
- package/locales/ko.global.js +1 -1
- package/locales/ko.global.min.js +1 -1
- package/locales/ku.global.js +1 -1
- package/locales/ku.global.min.js +1 -1
- package/locales/lb.global.js +1 -1
- package/locales/lb.global.min.js +1 -1
- package/locales/lt.global.js +1 -1
- package/locales/lt.global.min.js +1 -1
- package/locales/lv.global.js +1 -1
- package/locales/lv.global.min.js +1 -1
- package/locales/mk.global.js +1 -1
- package/locales/mk.global.min.js +1 -1
- package/locales/ms.global.js +1 -1
- package/locales/ms.global.min.js +1 -1
- package/locales/nb.global.js +1 -1
- package/locales/nb.global.min.js +1 -1
- package/locales/ne.global.js +1 -1
- package/locales/ne.global.min.js +1 -1
- package/locales/nl.global.js +1 -1
- package/locales/nl.global.min.js +1 -1
- package/locales/nn.global.js +1 -1
- package/locales/nn.global.min.js +1 -1
- package/locales/pl.global.js +1 -1
- package/locales/pl.global.min.js +1 -1
- package/locales/pt-br.global.js +1 -1
- package/locales/pt-br.global.min.js +1 -1
- package/locales/pt.global.js +1 -1
- package/locales/pt.global.min.js +1 -1
- package/locales/ro.global.js +1 -1
- package/locales/ro.global.min.js +1 -1
- package/locales/ru.global.js +1 -1
- package/locales/ru.global.min.js +1 -1
- package/locales/si-lk.global.js +1 -1
- package/locales/si-lk.global.min.js +1 -1
- package/locales/sk.global.js +1 -1
- package/locales/sk.global.min.js +1 -1
- package/locales/sl.global.js +1 -1
- package/locales/sl.global.min.js +1 -1
- package/locales/sm.global.js +1 -1
- package/locales/sm.global.min.js +1 -1
- package/locales/sq.global.js +1 -1
- package/locales/sq.global.min.js +1 -1
- package/locales/sr-cyrl.global.js +1 -1
- package/locales/sr-cyrl.global.min.js +1 -1
- package/locales/sr.global.js +1 -1
- package/locales/sr.global.min.js +1 -1
- package/locales/sv.global.js +1 -1
- package/locales/sv.global.min.js +1 -1
- package/locales/ta-in.global.js +1 -1
- package/locales/ta-in.global.min.js +1 -1
- package/locales/th.global.js +1 -1
- package/locales/th.global.min.js +1 -1
- package/locales/tr.global.js +1 -1
- package/locales/tr.global.min.js +1 -1
- package/locales/ug.global.js +1 -1
- package/locales/ug.global.min.js +1 -1
- package/locales/uk.global.js +1 -1
- package/locales/uk.global.min.js +1 -1
- package/locales/uz-cy.global.js +1 -1
- package/locales/uz-cy.global.min.js +1 -1
- package/locales/uz.global.js +1 -1
- package/locales/uz.global.min.js +1 -1
- package/locales/vi.global.js +1 -1
- package/locales/vi.global.min.js +1 -1
- package/locales/zh-cn.global.js +1 -1
- package/locales/zh-cn.global.min.js +1 -1
- package/locales/zh-tw.global.js +1 -1
- package/locales/zh-tw.global.min.js +1 -1
- package/locales-all.global.js +1 -1
- package/locales-all.global.min.js +1 -1
- package/package.json +2 -2
- package/preact.js +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as mergeProps, g as guid, i as isArraysEqual, T as Theme, a as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, b as buildViewClassNames, c as greatestDurationDenominator, d as createDuration, e as BASE_OPTION_DEFAULTS, f as arrayToHash, h as filterHash, j as buildEventSourceRefiners, p as parseEventSource, k as formatWithOrdinals, u as unpromisify, l as buildRangeApiWithTimeZone, n as identity, r as requestJson, s as subtractDurations, o as intersectRanges, q as startOfDay, t as addDays, v as hashValuesToArray, w as buildEventApis, D as DelayedRunner, x as createFormatter, y as diffWholeDays, z as memoize, A as memoizeObjArg, E as isPropsEqual, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as mergeRawOptions, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_OPTION_REFINERS, S as DateEnv, U as DateProfileGenerator, W as createEventUi, X as parseBusinessHours, Y as
|
|
2
|
-
export {
|
|
3
|
-
import { createElement,
|
|
1
|
+
import { m as mergeProps, g as guid, i as isArraysEqual, T as Theme, a as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, b as buildViewClassNames, c as greatestDurationDenominator, d as createDuration, e as BASE_OPTION_DEFAULTS, f as arrayToHash, h as filterHash, j as buildEventSourceRefiners, p as parseEventSource, k as formatWithOrdinals, u as unpromisify, l as buildRangeApiWithTimeZone, n as identity, r as requestJson, s as subtractDurations, o as intersectRanges, q as startOfDay, t as addDays, v as hashValuesToArray, w as buildEventApis, D as DelayedRunner, x as createFormatter, y as diffWholeDays, z as memoize, A as memoizeObjArg, E as isPropsEqual, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as mergeRawOptions, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_OPTION_REFINERS, S as DateEnv, U as DateProfileGenerator, W as createEventUi, X as parseBusinessHours, Y as Interaction, Z as getElSeg, _ as elementClosest, $ as EventImpl, a0 as listenBySelector, a1 as listenToHoverBySelector, a2 as PureComponent, a3 as buildViewContext, a4 as parseInteractionSettings, a5 as interactionSettingsStore, a6 as getNow, a7 as getIsHeightAuto, a8 as CalendarImpl, a9 as flushSync, aa as CalendarRoot, ab as RenderId, ac as ensureElHasStyles, ad as applyStyleProp, ae as sliceEventStore } from './internal-common.js';
|
|
2
|
+
export { af as JsonRequestError } from './internal-common.js';
|
|
3
|
+
import { createElement, Component, Fragment, render } from 'preact';
|
|
4
4
|
import 'preact/compat';
|
|
5
5
|
|
|
6
6
|
const globalLocales = [];
|
|
@@ -133,7 +133,7 @@ function createPlugin(input) {
|
|
|
133
133
|
initialView: input.initialView || '',
|
|
134
134
|
elementDraggingImpl: input.elementDraggingImpl,
|
|
135
135
|
optionChangeHandlers: input.optionChangeHandlers || {},
|
|
136
|
-
|
|
136
|
+
scrollerSyncerClass: input.scrollerSyncerClass || null,
|
|
137
137
|
listenerRefiners: input.listenerRefiners || {},
|
|
138
138
|
optionRefiners: input.optionRefiners || {},
|
|
139
139
|
propSetHandlers: input.propSetHandlers || {},
|
|
@@ -171,7 +171,7 @@ function buildPluginHooks(pluginDefs, globalDefs) {
|
|
|
171
171
|
initialView: '',
|
|
172
172
|
elementDraggingImpl: null,
|
|
173
173
|
optionChangeHandlers: {},
|
|
174
|
-
|
|
174
|
+
scrollerSyncerClass: null,
|
|
175
175
|
listenerRefiners: {},
|
|
176
176
|
optionRefiners: {},
|
|
177
177
|
propSetHandlers: {},
|
|
@@ -241,7 +241,7 @@ function combineHooks(hooks0, hooks1) {
|
|
|
241
241
|
initialView: hooks0.initialView || hooks1.initialView,
|
|
242
242
|
elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
|
|
243
243
|
optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
|
|
244
|
-
|
|
244
|
+
scrollerSyncerClass: hooks0.scrollerSyncerClass || hooks1.scrollerSyncerClass,
|
|
245
245
|
listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
|
|
246
246
|
optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
|
|
247
247
|
propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
|
|
@@ -261,7 +261,6 @@ class StandardTheme extends Theme {
|
|
|
261
261
|
}
|
|
262
262
|
StandardTheme.prototype.classes = {
|
|
263
263
|
root: 'fc-theme-standard',
|
|
264
|
-
tableCellShaded: 'fc-cell-shaded',
|
|
265
264
|
buttonGroup: 'fc-button-group',
|
|
266
265
|
button: 'fc-button fc-button-primary',
|
|
267
266
|
buttonActive: 'fc-button-active',
|
|
@@ -1624,7 +1623,9 @@ function warnUnknownOptions(options, viewName) {
|
|
|
1624
1623
|
class ToolbarSection extends BaseComponent {
|
|
1625
1624
|
render() {
|
|
1626
1625
|
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1627
|
-
return createElement('div', {
|
|
1626
|
+
return createElement('div', {
|
|
1627
|
+
className: 'fc-toolbar-chunk fc-toolbar-' + this.props.name
|
|
1628
|
+
}, ...children);
|
|
1628
1629
|
}
|
|
1629
1630
|
renderWidgetGroup(widgetGroup) {
|
|
1630
1631
|
let { props } = this;
|
|
@@ -1635,7 +1636,7 @@ class ToolbarSection extends BaseComponent {
|
|
|
1635
1636
|
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
1636
1637
|
if (buttonName === 'title') {
|
|
1637
1638
|
isOnlyButtons = false;
|
|
1638
|
-
children.push(createElement("h2", { className: "fc-toolbar-title"
|
|
1639
|
+
children.push(createElement("h2", { className: "fc-toolbar-title" }, props.title));
|
|
1639
1640
|
}
|
|
1640
1641
|
else {
|
|
1641
1642
|
let isPressed = buttonName === props.activeButton;
|
|
@@ -1691,65 +1692,7 @@ class Toolbar extends BaseComponent {
|
|
|
1691
1692
|
}
|
|
1692
1693
|
renderSection(key, widgetGroups) {
|
|
1693
1694
|
let { props } = this;
|
|
1694
|
-
return (createElement(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
class ViewHarness extends BaseComponent {
|
|
1699
|
-
constructor() {
|
|
1700
|
-
super(...arguments);
|
|
1701
|
-
this.state = {
|
|
1702
|
-
availableWidth: null,
|
|
1703
|
-
};
|
|
1704
|
-
this.handleEl = (el) => {
|
|
1705
|
-
this.el = el;
|
|
1706
|
-
setRef(this.props.elRef, el);
|
|
1707
|
-
this.updateAvailableWidth();
|
|
1708
|
-
};
|
|
1709
|
-
this.handleResize = () => {
|
|
1710
|
-
this.updateAvailableWidth();
|
|
1711
|
-
};
|
|
1712
|
-
}
|
|
1713
|
-
render() {
|
|
1714
|
-
let { props, state } = this;
|
|
1715
|
-
let { aspectRatio } = props;
|
|
1716
|
-
let classNames = [
|
|
1717
|
-
'fc-view-harness',
|
|
1718
|
-
(aspectRatio || props.liquid || props.height)
|
|
1719
|
-
? 'fc-view-harness-active' // harness controls the height
|
|
1720
|
-
: 'fc-view-harness-passive', // let the view do the height
|
|
1721
|
-
];
|
|
1722
|
-
let height = '';
|
|
1723
|
-
let paddingBottom = '';
|
|
1724
|
-
if (aspectRatio) {
|
|
1725
|
-
if (state.availableWidth !== null) {
|
|
1726
|
-
height = state.availableWidth / aspectRatio;
|
|
1727
|
-
}
|
|
1728
|
-
else {
|
|
1729
|
-
// while waiting to know availableWidth, we can't set height to *zero*
|
|
1730
|
-
// because will cause lots of unnecessary scrollbars within scrollgrid.
|
|
1731
|
-
// BETTER: don't start rendering ANYTHING yet until we know container width
|
|
1732
|
-
// NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606)
|
|
1733
|
-
paddingBottom = `${(1 / aspectRatio) * 100}%`;
|
|
1734
|
-
}
|
|
1735
|
-
}
|
|
1736
|
-
else {
|
|
1737
|
-
height = props.height || '';
|
|
1738
|
-
}
|
|
1739
|
-
return (createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children));
|
|
1740
|
-
}
|
|
1741
|
-
componentDidMount() {
|
|
1742
|
-
this.context.addResizeHandler(this.handleResize);
|
|
1743
|
-
}
|
|
1744
|
-
componentWillUnmount() {
|
|
1745
|
-
this.context.removeResizeHandler(this.handleResize);
|
|
1746
|
-
}
|
|
1747
|
-
updateAvailableWidth() {
|
|
1748
|
-
if (this.el && // needed. but why?
|
|
1749
|
-
this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth
|
|
1750
|
-
) {
|
|
1751
|
-
this.setState({ availableWidth: this.el.offsetWidth });
|
|
1752
|
-
}
|
|
1695
|
+
return (createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
|
|
1753
1696
|
}
|
|
1754
1697
|
}
|
|
1755
1698
|
|
|
@@ -1831,19 +1774,34 @@ class EventHovering extends Interaction {
|
|
|
1831
1774
|
}
|
|
1832
1775
|
}
|
|
1833
1776
|
|
|
1777
|
+
class ViewHarness extends Component {
|
|
1778
|
+
render() {
|
|
1779
|
+
const { props } = this;
|
|
1780
|
+
return (createElement("div", { className: [
|
|
1781
|
+
'fc-view-harness',
|
|
1782
|
+
props.height != null
|
|
1783
|
+
? 'fc-view-harness-fixedheight'
|
|
1784
|
+
: props.heightLiquid
|
|
1785
|
+
? 'fc-view-harness-liquid'
|
|
1786
|
+
: props.aspectRatio != null
|
|
1787
|
+
? 'fc-view-harness-aspectratio'
|
|
1788
|
+
: ''
|
|
1789
|
+
].join(' '), style: {
|
|
1790
|
+
height: props.height,
|
|
1791
|
+
paddingBottom: props.aspectRatio != null
|
|
1792
|
+
? `${(1 / props.aspectRatio) * 100}%`
|
|
1793
|
+
: undefined
|
|
1794
|
+
} }, props.children));
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1834
1798
|
class CalendarContent extends PureComponent {
|
|
1835
1799
|
constructor() {
|
|
1836
1800
|
super(...arguments);
|
|
1837
1801
|
this.buildViewContext = memoize(buildViewContext);
|
|
1838
1802
|
this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
1839
1803
|
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
1840
|
-
this.headerRef = createRef();
|
|
1841
|
-
this.footerRef = createRef();
|
|
1842
1804
|
this.interactionsStore = {};
|
|
1843
|
-
// eslint-disable-next-line
|
|
1844
|
-
this.state = {
|
|
1845
|
-
viewLabelId: getUniqueDomId(),
|
|
1846
|
-
};
|
|
1847
1805
|
// Component Registration
|
|
1848
1806
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1849
1807
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
@@ -1867,20 +1825,6 @@ class CalendarContent extends PureComponent {
|
|
|
1867
1825
|
}
|
|
1868
1826
|
delete interactionSettingsStore[component.uid];
|
|
1869
1827
|
};
|
|
1870
|
-
// Resizing
|
|
1871
|
-
// -----------------------------------------------------------------------------------------------------------------
|
|
1872
|
-
this.resizeRunner = new DelayedRunner(() => {
|
|
1873
|
-
this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
|
|
1874
|
-
this.props.emitter.trigger('windowResize', { view: this.props.viewApi });
|
|
1875
|
-
});
|
|
1876
|
-
this.handleWindowResize = (ev) => {
|
|
1877
|
-
let { options } = this.props;
|
|
1878
|
-
if (options.handleWindowResize &&
|
|
1879
|
-
ev.target === window // avoid jqui events
|
|
1880
|
-
) {
|
|
1881
|
-
this.resizeRunner.request(options.windowResizeDelay);
|
|
1882
|
-
}
|
|
1883
|
-
};
|
|
1884
1828
|
}
|
|
1885
1829
|
/*
|
|
1886
1830
|
renders INSIDE of an outer div
|
|
@@ -1890,14 +1834,12 @@ class CalendarContent extends PureComponent {
|
|
|
1890
1834
|
let { toolbarConfig, options } = props;
|
|
1891
1835
|
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
|
|
1892
1836
|
props.viewTitle);
|
|
1893
|
-
let
|
|
1894
|
-
let
|
|
1837
|
+
let viewHeight;
|
|
1838
|
+
let viewHeightLiquid = false;
|
|
1895
1839
|
let viewAspectRatio;
|
|
1896
|
-
if (props.
|
|
1897
|
-
viewHeight = '';
|
|
1898
|
-
}
|
|
1840
|
+
if (props.forPrint || getIsHeightAuto(options)) ;
|
|
1899
1841
|
else if (options.height != null) {
|
|
1900
|
-
|
|
1842
|
+
viewHeightLiquid = true;
|
|
1901
1843
|
}
|
|
1902
1844
|
else if (options.contentHeight != null) {
|
|
1903
1845
|
viewHeight = options.contentHeight;
|
|
@@ -1906,21 +1848,17 @@ class CalendarContent extends PureComponent {
|
|
|
1906
1848
|
viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
|
|
1907
1849
|
}
|
|
1908
1850
|
let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
|
|
1909
|
-
let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
|
|
1910
|
-
? this.state.viewLabelId
|
|
1911
|
-
: undefined;
|
|
1912
1851
|
return (createElement(ViewContextType.Provider, { value: viewContext },
|
|
1913
|
-
toolbarConfig.header && (createElement(Toolbar, Object.assign({
|
|
1914
|
-
createElement(ViewHarness, {
|
|
1852
|
+
toolbarConfig.header && (createElement(Toolbar, Object.assign({ extraClassName: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
|
|
1853
|
+
createElement(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
|
|
1915
1854
|
this.renderView(props),
|
|
1916
1855
|
this.buildAppendContent()),
|
|
1917
|
-
toolbarConfig.footer && (createElement(Toolbar, Object.assign({
|
|
1856
|
+
toolbarConfig.footer && (createElement(Toolbar, Object.assign({ extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
|
|
1918
1857
|
}
|
|
1919
1858
|
componentDidMount() {
|
|
1920
1859
|
let { props } = this;
|
|
1921
1860
|
this.calendarInteractions = props.pluginHooks.calendarInteractions
|
|
1922
1861
|
.map((CalendarInteractionClass) => new CalendarInteractionClass(props));
|
|
1923
|
-
window.addEventListener('resize', this.handleWindowResize);
|
|
1924
1862
|
let { propSetHandlers } = props.pluginHooks;
|
|
1925
1863
|
for (let propName in propSetHandlers) {
|
|
1926
1864
|
propSetHandlers[propName](props[propName], props);
|
|
@@ -1936,8 +1874,6 @@ class CalendarContent extends PureComponent {
|
|
|
1936
1874
|
}
|
|
1937
1875
|
}
|
|
1938
1876
|
componentWillUnmount() {
|
|
1939
|
-
window.removeEventListener('resize', this.handleWindowResize);
|
|
1940
|
-
this.resizeRunner.clear();
|
|
1941
1877
|
for (let interaction of this.calendarInteractions) {
|
|
1942
1878
|
interaction.destroy();
|
|
1943
1879
|
}
|
|
@@ -1960,7 +1896,6 @@ class CalendarContent extends PureComponent {
|
|
|
1960
1896
|
eventSelection: props.eventSelection,
|
|
1961
1897
|
eventDrag: props.eventDrag,
|
|
1962
1898
|
eventResize: props.eventResize,
|
|
1963
|
-
isHeightAuto: props.isHeightAuto,
|
|
1964
1899
|
forPrint: props.forPrint,
|
|
1965
1900
|
};
|
|
1966
1901
|
let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
|
|
@@ -1991,6 +1926,9 @@ function buildViewPropTransformers(theClasses) {
|
|
|
1991
1926
|
return theClasses.map((TheClass) => new TheClass());
|
|
1992
1927
|
}
|
|
1993
1928
|
|
|
1929
|
+
/*
|
|
1930
|
+
Vanilla JS API
|
|
1931
|
+
*/
|
|
1994
1932
|
class Calendar extends CalendarImpl {
|
|
1995
1933
|
constructor(el, optionOverrides = {}) {
|
|
1996
1934
|
super();
|
|
@@ -2015,11 +1953,11 @@ class Calendar extends CalendarImpl {
|
|
|
2015
1953
|
this.isRendered = true;
|
|
2016
1954
|
let { currentData } = this;
|
|
2017
1955
|
flushSync(() => {
|
|
2018
|
-
render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height,
|
|
1956
|
+
render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, forPrint) => {
|
|
2019
1957
|
this.setClassNames(classNames);
|
|
2020
1958
|
this.setHeight(height);
|
|
2021
1959
|
return (createElement(RenderId.Provider, { value: this.customContentRenderId },
|
|
2022
|
-
createElement(CalendarContent, Object.assign({
|
|
1960
|
+
createElement(CalendarContent, Object.assign({ forPrint: forPrint }, currentData))));
|
|
2023
1961
|
}), this.el);
|
|
2024
1962
|
});
|
|
2025
1963
|
}
|
|
@@ -2136,6 +2074,6 @@ function sliceEvents(props, allDay) {
|
|
|
2136
2074
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2137
2075
|
}
|
|
2138
2076
|
|
|
2139
|
-
const version = '
|
|
2077
|
+
const version = '7.0.0-beta.0';
|
|
2140
2078
|
|
|
2141
2079
|
export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|