@fullcalendar/core 7.0.0-beta.1 → 7.0.0-beta.4
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 +68 -76
- package/index.d.ts +0 -1
- package/index.global.js +1454 -1325
- package/index.global.min.js +2 -2
- package/index.js +70 -78
- package/internal-common.cjs +2757 -2620
- package/internal-common.d.ts +263 -220
- package/internal-common.js +2743 -2603
- package/internal.cjs +12 -16
- package/internal.d.ts +1 -2
- 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.cjs +1 -2
- package/locales/de-at.global.js +2 -3
- package/locales/de-at.global.min.js +2 -2
- package/locales/de-at.js +1 -2
- package/locales/de.cjs +1 -2
- package/locales/de.global.js +2 -3
- package/locales/de.global.min.js +2 -2
- package/locales/de.js +1 -2
- 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.cjs +1 -2
- package/locales/es.global.js +2 -3
- package/locales/es.global.min.js +2 -2
- package/locales/es.js +1 -2
- 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.cjs +1 -2
- package/locales/gl.global.js +2 -3
- package/locales/gl.global.min.js +2 -2
- package/locales/gl.js +1 -2
- 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.cjs +1 -2
- package/locales/pt-br.global.js +2 -3
- package/locales/pt-br.global.min.js +2 -2
- package/locales/pt-br.js +1 -2
- 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.cjs +1 -2
- package/locales/sv.global.js +2 -3
- package/locales/sv.global.min.js +2 -2
- package/locales/sv.js +1 -2
- 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 +7 -13
- package/locales-all.global.min.js +2 -2
- package/package.json +1 -1
- package/preact.cjs +1 -0
- package/preact.d.ts +3 -2
- package/preact.js +1 -1
package/index.cjs
CHANGED
|
@@ -30,9 +30,9 @@ const MINIMAL_RAW_EN_LOCALE = {
|
|
|
30
30
|
weekText: 'W',
|
|
31
31
|
weekTextLong: 'Week',
|
|
32
32
|
closeHint: 'Close',
|
|
33
|
-
|
|
34
|
-
eventHint: 'Event',
|
|
33
|
+
eventsHint: 'Events',
|
|
35
34
|
allDayText: 'all-day',
|
|
35
|
+
timedText: 'timed',
|
|
36
36
|
moreLinkText: 'more',
|
|
37
37
|
noEventsText: 'No events to display',
|
|
38
38
|
};
|
|
@@ -47,7 +47,7 @@ const RAW_EN_LOCALE = Object.assign(Object.assign({}, MINIMAL_RAW_EN_LOCALE), {
|
|
|
47
47
|
? 'Today'
|
|
48
48
|
: `This ${buttonText}`;
|
|
49
49
|
},
|
|
50
|
-
}, viewHint: '$0 view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) {
|
|
50
|
+
}, viewHint: '$0 view', viewChangeHint: 'Change view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) {
|
|
51
51
|
return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;
|
|
52
52
|
} });
|
|
53
53
|
function organizeRawLocales(explicitRawLocales) {
|
|
@@ -359,7 +359,7 @@ function parseViewConfig(input) {
|
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
function createViewHookComponent(options) {
|
|
362
|
-
return (viewProps) => (preact.createElement(internalCommon.ViewContextType.Consumer, null, (context) => (preact.createElement(internalCommon.ContentContainer, {
|
|
362
|
+
return (viewProps) => (preact.createElement(internalCommon.ViewContextType.Consumer, null, (context) => (preact.createElement(internalCommon.ContentContainer, { tag: "div", className: internalCommon.buildViewClassName(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
|
|
@@ -719,17 +719,25 @@ function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpec
|
|
|
719
719
|
return { header, footer };
|
|
720
720
|
}
|
|
721
721
|
function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
|
|
722
|
-
let
|
|
722
|
+
let isRtl = calendarOptions.direction === 'rtl';
|
|
723
723
|
let viewsWithButtons = [];
|
|
724
724
|
let hasTitle = false;
|
|
725
|
-
|
|
726
|
-
let sectionStr = sectionStrHash[sectionName];
|
|
725
|
+
function processSectionStr(sectionStr) {
|
|
727
726
|
let sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi);
|
|
728
|
-
sectionWidgets[sectionName] = sectionRes.widgets;
|
|
729
727
|
viewsWithButtons.push(...sectionRes.viewsWithButtons);
|
|
730
728
|
hasTitle = hasTitle || sectionRes.hasTitle;
|
|
729
|
+
return sectionRes.widgets;
|
|
731
730
|
}
|
|
732
|
-
|
|
731
|
+
const sectionWidgets = {
|
|
732
|
+
start: processSectionStr(sectionStrHash[isRtl ? 'right' : 'left'] || sectionStrHash.start || ''),
|
|
733
|
+
center: processSectionStr(sectionStrHash.center || ''),
|
|
734
|
+
end: processSectionStr(sectionStrHash[isRtl ? 'left' : 'right'] || sectionStrHash.end || ''),
|
|
735
|
+
};
|
|
736
|
+
return {
|
|
737
|
+
sectionWidgets,
|
|
738
|
+
viewsWithButtons,
|
|
739
|
+
hasTitle,
|
|
740
|
+
};
|
|
733
741
|
}
|
|
734
742
|
/*
|
|
735
743
|
BAD: querying icons and text here. should be done at render time
|
|
@@ -757,6 +765,7 @@ theme, viewSpecs, calendarApi) {
|
|
|
757
765
|
let buttonIcon; // only one of these will be set
|
|
758
766
|
let buttonText; // "
|
|
759
767
|
let buttonHint;
|
|
768
|
+
let isView = false;
|
|
760
769
|
// ^ for the title="" attribute, for accessibility
|
|
761
770
|
if ((customButtonProps = calendarCustomButtons[buttonName])) {
|
|
762
771
|
buttonClick = (ev) => {
|
|
@@ -770,6 +779,7 @@ theme, viewSpecs, calendarApi) {
|
|
|
770
779
|
buttonHint = customButtonProps.hint || customButtonProps.text;
|
|
771
780
|
}
|
|
772
781
|
else if ((viewSpec = viewSpecs[buttonName])) {
|
|
782
|
+
isView = true;
|
|
773
783
|
viewsWithButtons.push(buttonName);
|
|
774
784
|
buttonClick = () => {
|
|
775
785
|
calendarApi.changeView(buttonName);
|
|
@@ -807,7 +817,7 @@ theme, viewSpecs, calendarApi) {
|
|
|
807
817
|
], calendarButtonText[buttonName]);
|
|
808
818
|
}
|
|
809
819
|
}
|
|
810
|
-
return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint };
|
|
820
|
+
return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint, isView };
|
|
811
821
|
})));
|
|
812
822
|
return { widgets, viewsWithButtons, hasTitle };
|
|
813
823
|
}
|
|
@@ -1627,35 +1637,45 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1627
1637
|
render() {
|
|
1628
1638
|
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1629
1639
|
return preact.createElement('div', {
|
|
1630
|
-
className: 'fc-toolbar-
|
|
1640
|
+
className: 'fc-toolbar-section fc-toolbar-' + this.props.name
|
|
1631
1641
|
}, ...children);
|
|
1632
1642
|
}
|
|
1633
1643
|
renderWidgetGroup(widgetGroup) {
|
|
1634
|
-
let { props } = this;
|
|
1635
|
-
let { theme } =
|
|
1644
|
+
let { props, context } = this;
|
|
1645
|
+
let { options, theme } = context;
|
|
1636
1646
|
let children = [];
|
|
1637
1647
|
let isOnlyButtons = true;
|
|
1648
|
+
let isOnlyView = true;
|
|
1649
|
+
for (const widget of widgetGroup) {
|
|
1650
|
+
const { buttonName, isView } = widget;
|
|
1651
|
+
if (buttonName === 'title') {
|
|
1652
|
+
isOnlyButtons = false;
|
|
1653
|
+
}
|
|
1654
|
+
else if (!isView) {
|
|
1655
|
+
isOnlyView = false;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1638
1658
|
for (let widget of widgetGroup) {
|
|
1639
1659
|
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
1640
1660
|
if (buttonName === 'title') {
|
|
1641
|
-
|
|
1642
|
-
children.push(preact.createElement("h2", { className: "fc-toolbar-title" }, props.title));
|
|
1661
|
+
children.push(preact.createElement("div", { role: 'heading', "aria-level": options.headingLevel, id: props.titleId, className: 'fc-toolbar-title' }, props.title));
|
|
1643
1662
|
}
|
|
1644
1663
|
else {
|
|
1645
1664
|
let isPressed = buttonName === props.activeButton;
|
|
1646
1665
|
let isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
|
|
1647
1666
|
(!props.isPrevEnabled && buttonName === 'prev') ||
|
|
1648
1667
|
(!props.isNextEnabled && buttonName === 'next');
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}
|
|
1653
|
-
children.push(preact.createElement("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? preact.createElement("span", { className: buttonIcon, role: "img" }) : '')));
|
|
1668
|
+
children.push(preact.createElement("button", Object.assign({ type: "button", disabled: isDisabled }, ((isOnlyButtons && isOnlyView)
|
|
1669
|
+
? { 'role': 'tab', 'aria-selected': isPressed }
|
|
1670
|
+
: { 'aria-pressed': isPressed }), { "aria-label": typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, className: internalCommon.joinClassNames(`fc-${buttonName}-button`, theme.getClassName('button'), isPressed && theme.getClassName('buttonActive')), onClick: buttonClick }), buttonText || (buttonIcon ? preact.createElement("span", { className: buttonIcon, "aria-hidden": true }) : '')));
|
|
1654
1671
|
}
|
|
1655
1672
|
}
|
|
1656
1673
|
if (children.length > 1) {
|
|
1657
|
-
|
|
1658
|
-
|
|
1674
|
+
return preact.createElement('div', {
|
|
1675
|
+
role: (isOnlyButtons && isOnlyView) ? 'tablist' : undefined,
|
|
1676
|
+
'aria-label': (isOnlyButtons && isOnlyView) ? options.viewChangeHint : undefined,
|
|
1677
|
+
className: isOnlyButtons ? theme.getClassName('buttonGroup') : undefined,
|
|
1678
|
+
}, ...children);
|
|
1659
1679
|
}
|
|
1660
1680
|
return children[0];
|
|
1661
1681
|
}
|
|
@@ -1663,39 +1683,16 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1663
1683
|
|
|
1664
1684
|
class Toolbar extends internalCommon.BaseComponent {
|
|
1665
1685
|
render() {
|
|
1666
|
-
let { model,
|
|
1667
|
-
let
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
if (sectionWidgets.left) {
|
|
1673
|
-
forceLtr = true;
|
|
1674
|
-
startContent = sectionWidgets.left;
|
|
1675
|
-
}
|
|
1676
|
-
else {
|
|
1677
|
-
startContent = sectionWidgets.start;
|
|
1678
|
-
}
|
|
1679
|
-
if (sectionWidgets.right) {
|
|
1680
|
-
forceLtr = true;
|
|
1681
|
-
endContent = sectionWidgets.right;
|
|
1682
|
-
}
|
|
1683
|
-
else {
|
|
1684
|
-
endContent = sectionWidgets.end;
|
|
1685
|
-
}
|
|
1686
|
-
let classNames = [
|
|
1687
|
-
extraClassName || '',
|
|
1688
|
-
'fc-toolbar',
|
|
1689
|
-
forceLtr ? 'fc-toolbar-ltr' : '',
|
|
1690
|
-
];
|
|
1691
|
-
return (preact.createElement("div", { className: classNames.join(' ') },
|
|
1692
|
-
this.renderSection('start', startContent || []),
|
|
1693
|
-
this.renderSection('center', centerContent || []),
|
|
1694
|
-
this.renderSection('end', endContent || [])));
|
|
1686
|
+
let { model, className } = this.props;
|
|
1687
|
+
let { sectionWidgets } = model;
|
|
1688
|
+
return (preact.createElement("div", { className: internalCommon.joinClassNames(className, 'fc-toolbar') },
|
|
1689
|
+
this.renderSection('start', sectionWidgets.start),
|
|
1690
|
+
this.renderSection('center', sectionWidgets.center),
|
|
1691
|
+
this.renderSection('end', sectionWidgets.end)));
|
|
1695
1692
|
}
|
|
1696
1693
|
renderSection(key, widgetGroups) {
|
|
1697
1694
|
let { props } = this;
|
|
1698
|
-
return (preact.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 }));
|
|
1695
|
+
return (preact.createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, titleId: props.titleId, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
|
|
1699
1696
|
}
|
|
1700
1697
|
}
|
|
1701
1698
|
|
|
@@ -1711,19 +1708,12 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1711
1708
|
let eventRange = internalCommon.getElEventRange(segEl);
|
|
1712
1709
|
if (eventRange && // might be the <div> surrounding the more link
|
|
1713
1710
|
component.isValidSegDownEl(ev.target)) {
|
|
1714
|
-
// our way to simulate a link click for elements that can't be <a> tags
|
|
1715
|
-
// grab before trigger fired in case trigger trashes DOM thru rerendering
|
|
1716
|
-
let hasUrlContainer = internalCommon.elementClosest(ev.target, '.fc-event-forced-url');
|
|
1717
|
-
let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
|
|
1718
1711
|
context.emitter.trigger('eventClick', {
|
|
1719
1712
|
el: segEl,
|
|
1720
1713
|
event: new internalCommon.EventImpl(component.context, eventRange.def, eventRange.instance),
|
|
1721
1714
|
jsEvent: ev,
|
|
1722
1715
|
view: context.viewApi,
|
|
1723
1716
|
});
|
|
1724
|
-
if (url && !ev.defaultPrevented) {
|
|
1725
|
-
window.location.href = url;
|
|
1726
|
-
}
|
|
1727
1717
|
}
|
|
1728
1718
|
};
|
|
1729
1719
|
this.destroy = internalCommon.listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
|
|
@@ -1780,16 +1770,12 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1780
1770
|
class ViewHarness extends preact.Component {
|
|
1781
1771
|
render() {
|
|
1782
1772
|
const { props } = this;
|
|
1783
|
-
return (preact.createElement("div", { className:
|
|
1784
|
-
'fc-view-
|
|
1785
|
-
props.
|
|
1786
|
-
? 'fc-view-
|
|
1787
|
-
: props.
|
|
1788
|
-
|
|
1789
|
-
: props.aspectRatio != null
|
|
1790
|
-
? 'fc-view-harness-aspectratio'
|
|
1791
|
-
: ''
|
|
1792
|
-
].join(' '), style: {
|
|
1773
|
+
return (preact.createElement("div", { className: internalCommon.joinClassNames('fc-view-outer', props.height != null
|
|
1774
|
+
? 'fc-view-outer-static'
|
|
1775
|
+
: props.heightLiquid
|
|
1776
|
+
? 'fc-view-outer-liquid'
|
|
1777
|
+
: props.aspectRatio != null
|
|
1778
|
+
&& 'fc-view-outer-aspect-ratio'), style: {
|
|
1793
1779
|
height: props.height,
|
|
1794
1780
|
paddingBottom: props.aspectRatio != null
|
|
1795
1781
|
? `${(1 / props.aspectRatio) * 100}%`
|
|
@@ -1805,6 +1791,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1805
1791
|
this.buildViewPropTransformers = internalCommon.memoize(buildViewPropTransformers);
|
|
1806
1792
|
this.buildToolbarProps = internalCommon.memoize(buildToolbarProps);
|
|
1807
1793
|
this.interactionsStore = {};
|
|
1794
|
+
this.viewTitleId = internalCommon.getUniqueDomId();
|
|
1808
1795
|
// Component Registration
|
|
1809
1796
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1810
1797
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
@@ -1813,7 +1800,10 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1813
1800
|
EventClicking,
|
|
1814
1801
|
EventHovering,
|
|
1815
1802
|
];
|
|
1816
|
-
let interactionClasses = DEFAULT_INTERACTIONS
|
|
1803
|
+
let interactionClasses = DEFAULT_INTERACTIONS;
|
|
1804
|
+
if (!settingsInput.disableHits) {
|
|
1805
|
+
interactionClasses = interactionClasses.concat(this.props.pluginHooks.componentInteractions);
|
|
1806
|
+
}
|
|
1817
1807
|
let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings));
|
|
1818
1808
|
this.interactionsStore[component.uid] = interactions;
|
|
1819
1809
|
internalCommon.interactionSettingsStore[component.uid] = settings;
|
|
@@ -1852,11 +1842,11 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1852
1842
|
}
|
|
1853
1843
|
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);
|
|
1854
1844
|
return (preact.createElement(internalCommon.ViewContextType.Provider, { value: viewContext },
|
|
1855
|
-
toolbarConfig.header && (preact.createElement(Toolbar, Object.assign({
|
|
1845
|
+
toolbarConfig.header && (preact.createElement(Toolbar, Object.assign({ className: "fc-header-toolbar", model: toolbarConfig.header, titleId: this.viewTitleId }, toolbarProps))),
|
|
1856
1846
|
preact.createElement(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
|
|
1857
|
-
this.renderView(props),
|
|
1847
|
+
this.renderView(props, toolbarProps.title),
|
|
1858
1848
|
this.buildAppendContent()),
|
|
1859
|
-
toolbarConfig.footer && (preact.createElement(Toolbar, Object.assign({
|
|
1849
|
+
toolbarConfig.footer && (preact.createElement(Toolbar, Object.assign({ className: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
|
|
1860
1850
|
}
|
|
1861
1851
|
componentDidMount() {
|
|
1862
1852
|
let { props } = this;
|
|
@@ -1887,9 +1877,9 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1887
1877
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
1888
1878
|
return preact.createElement(preact.Fragment, {}, ...children);
|
|
1889
1879
|
}
|
|
1890
|
-
renderView(props) {
|
|
1880
|
+
renderView(props, title) {
|
|
1891
1881
|
let { pluginHooks } = props;
|
|
1892
|
-
let { viewSpec } = props;
|
|
1882
|
+
let { viewSpec, toolbarConfig } = props;
|
|
1893
1883
|
let viewProps = {
|
|
1894
1884
|
dateProfile: props.dateProfile,
|
|
1895
1885
|
businessHours: props.businessHours,
|
|
@@ -1900,6 +1890,8 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1900
1890
|
eventDrag: props.eventDrag,
|
|
1901
1891
|
eventResize: props.eventResize,
|
|
1902
1892
|
forPrint: props.forPrint,
|
|
1893
|
+
labelId: toolbarConfig.header && toolbarConfig.header.hasTitle ? this.viewTitleId : undefined,
|
|
1894
|
+
labelStr: toolbarConfig.header && toolbarConfig.header.hasTitle ? undefined : title,
|
|
1903
1895
|
};
|
|
1904
1896
|
let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
|
|
1905
1897
|
for (let transformer of transformers) {
|
|
@@ -2077,7 +2069,7 @@ function sliceEvents(props, allDay) {
|
|
|
2077
2069
|
return internalCommon.sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2078
2070
|
}
|
|
2079
2071
|
|
|
2080
|
-
const version = '7.0.0-beta.
|
|
2072
|
+
const version = '7.0.0-beta.4';
|
|
2081
2073
|
|
|
2082
2074
|
exports.JsonRequestError = internalCommon.JsonRequestError;
|
|
2083
2075
|
exports.Calendar = Calendar;
|