@fullcalendar/core 7.0.0-beta.3 → 7.0.0-rc.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 +54 -50
- package/index.d.ts +0 -1
- package/index.global.js +343 -381
- package/index.global.min.js +2 -2
- package/index.js +56 -52
- package/internal-common.cjs +5202 -5244
- package/internal-common.d.ts +147 -120
- package/internal-common.js +5199 -5240
- package/internal.cjs +4 -6
- package/internal.d.ts +1 -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.cjs +1 -1
- package/locales/az.global.js +2 -2
- package/locales/az.global.min.js +2 -2
- package/locales/az.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.cjs +1 -1
- package/locales/bs.global.js +2 -2
- package/locales/bs.global.min.js +2 -2
- package/locales/bs.js +1 -1
- package/locales/ca.cjs +1 -1
- package/locales/ca.global.js +2 -2
- package/locales/ca.global.min.js +2 -2
- package/locales/ca.js +1 -1
- package/locales/cs.global.js +1 -1
- package/locales/cs.global.min.js +1 -1
- package/locales/cy.cjs +1 -1
- package/locales/cy.global.js +2 -2
- package/locales/cy.global.min.js +2 -2
- package/locales/cy.js +1 -1
- package/locales/da.cjs +1 -1
- package/locales/da.global.js +2 -2
- package/locales/da.global.min.js +2 -2
- package/locales/da.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.cjs +1 -1
- package/locales/eo.global.js +2 -2
- package/locales/eo.global.min.js +2 -2
- package/locales/eo.js +1 -1
- package/locales/es-us.cjs +1 -1
- package/locales/es-us.global.js +2 -2
- package/locales/es-us.global.min.js +2 -2
- package/locales/es-us.js +1 -1
- package/locales/es.cjs +2 -3
- package/locales/es.global.js +3 -4
- package/locales/es.global.min.js +2 -2
- package/locales/es.js +2 -3
- package/locales/et.cjs +1 -1
- package/locales/et.global.js +2 -2
- package/locales/et.global.min.js +2 -2
- package/locales/et.js +1 -1
- package/locales/eu.cjs +1 -1
- package/locales/eu.global.js +2 -2
- package/locales/eu.global.min.js +2 -2
- package/locales/eu.js +1 -1
- package/locales/fa.global.js +1 -1
- package/locales/fa.global.min.js +1 -1
- package/locales/fi.cjs +1 -1
- package/locales/fi.global.js +2 -2
- package/locales/fi.global.min.js +2 -2
- package/locales/fi.js +1 -1
- package/locales/fr-ca.cjs +1 -1
- package/locales/fr-ca.global.js +2 -2
- package/locales/fr-ca.global.min.js +2 -2
- package/locales/fr-ca.js +1 -1
- package/locales/fr-ch.cjs +1 -1
- package/locales/fr-ch.global.js +2 -2
- package/locales/fr-ch.global.min.js +2 -2
- package/locales/fr-ch.js +1 -1
- package/locales/fr.cjs +1 -1
- package/locales/fr.global.js +2 -2
- package/locales/fr.global.min.js +2 -2
- package/locales/fr.js +1 -1
- package/locales/gl.cjs +2 -3
- package/locales/gl.global.js +3 -4
- package/locales/gl.global.min.js +2 -2
- package/locales/gl.js +2 -3
- 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.cjs +1 -1
- package/locales/hr.global.js +2 -2
- package/locales/hr.global.min.js +2 -2
- package/locales/hr.js +1 -1
- package/locales/hu.cjs +1 -1
- package/locales/hu.global.js +2 -2
- package/locales/hu.global.min.js +2 -2
- package/locales/hu.js +1 -1
- package/locales/hy-am.global.js +1 -1
- package/locales/hy-am.global.min.js +1 -1
- package/locales/id.cjs +1 -1
- package/locales/id.global.js +2 -2
- package/locales/id.global.min.js +2 -2
- package/locales/id.js +1 -1
- package/locales/is.cjs +1 -1
- package/locales/is.global.js +2 -2
- package/locales/is.global.min.js +2 -2
- package/locales/is.js +1 -1
- package/locales/it.cjs +1 -1
- package/locales/it.global.js +2 -2
- package/locales/it.global.min.js +2 -2
- package/locales/it.js +1 -1
- package/locales/ja.global.js +1 -1
- package/locales/ja.global.min.js +1 -1
- package/locales/ka.cjs +1 -1
- package/locales/ka.global.js +2 -2
- package/locales/ka.global.min.js +2 -2
- package/locales/ka.js +1 -1
- package/locales/kk.cjs +1 -1
- package/locales/kk.global.js +2 -2
- package/locales/kk.global.min.js +2 -2
- package/locales/kk.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.cjs +1 -1
- package/locales/lb.global.js +2 -2
- package/locales/lb.global.min.js +2 -2
- package/locales/lb.js +1 -1
- package/locales/lt.cjs +1 -1
- package/locales/lt.global.js +2 -2
- package/locales/lt.global.min.js +2 -2
- package/locales/lt.js +1 -1
- package/locales/lv.cjs +1 -1
- package/locales/lv.global.js +2 -2
- package/locales/lv.global.min.js +2 -2
- package/locales/lv.js +1 -1
- package/locales/mk.global.js +1 -1
- package/locales/mk.global.min.js +1 -1
- package/locales/ms.cjs +1 -1
- package/locales/ms.global.js +2 -2
- package/locales/ms.global.min.js +2 -2
- package/locales/ms.js +1 -1
- package/locales/nb.cjs +1 -1
- package/locales/nb.global.js +2 -2
- package/locales/nb.global.min.js +2 -2
- package/locales/nb.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.cjs +1 -1
- package/locales/nn.global.js +2 -2
- package/locales/nn.global.min.js +2 -2
- package/locales/nn.js +1 -1
- package/locales/pl.cjs +1 -1
- package/locales/pl.global.js +2 -2
- package/locales/pl.global.min.js +2 -2
- package/locales/pl.js +1 -1
- package/locales/pt-br.cjs +2 -3
- package/locales/pt-br.global.js +3 -4
- package/locales/pt-br.global.min.js +2 -2
- package/locales/pt-br.js +2 -3
- package/locales/pt.cjs +1 -1
- package/locales/pt.global.js +2 -2
- package/locales/pt.global.min.js +2 -2
- package/locales/pt.js +1 -1
- package/locales/ro.cjs +1 -1
- package/locales/ro.global.js +2 -2
- package/locales/ro.global.min.js +2 -2
- package/locales/ro.js +1 -1
- package/locales/ru.cjs +1 -1
- package/locales/ru.global.js +2 -2
- package/locales/ru.global.min.js +2 -2
- package/locales/ru.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.cjs +1 -1
- package/locales/sq.global.js +2 -2
- package/locales/sq.global.min.js +2 -2
- package/locales/sq.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.cjs +1 -1
- package/locales/ta-in.global.js +2 -2
- package/locales/ta-in.global.min.js +2 -2
- package/locales/ta-in.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.cjs +1 -1
- package/locales/uk.global.js +2 -2
- package/locales/uk.global.min.js +2 -2
- package/locales/uk.js +1 -1
- package/locales/uz-cy.cjs +1 -1
- package/locales/uz-cy.global.js +2 -2
- package/locales/uz-cy.global.min.js +2 -2
- package/locales/uz-cy.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 +44 -50
- package/locales-all.global.min.js +2 -2
- package/package.json +1 -1
- package/preact.cjs +1 -0
- package/preact.d.ts +4 -3
- 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) {
|
|
@@ -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
|
}
|
|
@@ -1631,27 +1641,41 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
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
|
-
children.push(preact.createElement("button", { type: "button",
|
|
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 }) : '')));
|
|
1650
1671
|
}
|
|
1651
1672
|
}
|
|
1652
1673
|
if (children.length > 1) {
|
|
1653
|
-
|
|
1654
|
-
|
|
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);
|
|
1655
1679
|
}
|
|
1656
1680
|
return children[0];
|
|
1657
1681
|
}
|
|
@@ -1660,33 +1684,15 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1660
1684
|
class Toolbar extends internalCommon.BaseComponent {
|
|
1661
1685
|
render() {
|
|
1662
1686
|
let { model, className } = this.props;
|
|
1663
|
-
let
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
if (sectionWidgets.left) {
|
|
1669
|
-
forceLtr = true;
|
|
1670
|
-
startContent = sectionWidgets.left;
|
|
1671
|
-
}
|
|
1672
|
-
else {
|
|
1673
|
-
startContent = sectionWidgets.start;
|
|
1674
|
-
}
|
|
1675
|
-
if (sectionWidgets.right) {
|
|
1676
|
-
forceLtr = true;
|
|
1677
|
-
endContent = sectionWidgets.right;
|
|
1678
|
-
}
|
|
1679
|
-
else {
|
|
1680
|
-
endContent = sectionWidgets.end;
|
|
1681
|
-
}
|
|
1682
|
-
return (preact.createElement("div", { className: internalCommon.joinClassNames(className, 'fc-toolbar', forceLtr && 'fc-toolbar-ltr') },
|
|
1683
|
-
this.renderSection('start', startContent || []),
|
|
1684
|
-
this.renderSection('center', centerContent || []),
|
|
1685
|
-
this.renderSection('end', endContent || [])));
|
|
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)));
|
|
1686
1692
|
}
|
|
1687
1693
|
renderSection(key, widgetGroups) {
|
|
1688
1694
|
let { props } = this;
|
|
1689
|
-
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 }));
|
|
1690
1696
|
}
|
|
1691
1697
|
}
|
|
1692
1698
|
|
|
@@ -1785,6 +1791,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1785
1791
|
this.buildViewPropTransformers = internalCommon.memoize(buildViewPropTransformers);
|
|
1786
1792
|
this.buildToolbarProps = internalCommon.memoize(buildToolbarProps);
|
|
1787
1793
|
this.interactionsStore = {};
|
|
1794
|
+
this.viewTitleId = internalCommon.getUniqueDomId();
|
|
1788
1795
|
// Component Registration
|
|
1789
1796
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1790
1797
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
@@ -1835,9 +1842,9 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1835
1842
|
}
|
|
1836
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);
|
|
1837
1844
|
return (preact.createElement(internalCommon.ViewContextType.Provider, { value: viewContext },
|
|
1838
|
-
toolbarConfig.header && (preact.createElement(Toolbar, Object.assign({ className: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
|
|
1845
|
+
toolbarConfig.header && (preact.createElement(Toolbar, Object.assign({ className: "fc-header-toolbar", model: toolbarConfig.header, titleId: this.viewTitleId }, toolbarProps))),
|
|
1839
1846
|
preact.createElement(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
|
|
1840
|
-
this.renderView(props),
|
|
1847
|
+
this.renderView(props, toolbarProps.title),
|
|
1841
1848
|
this.buildAppendContent()),
|
|
1842
1849
|
toolbarConfig.footer && (preact.createElement(Toolbar, Object.assign({ className: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
|
|
1843
1850
|
}
|
|
@@ -1870,9 +1877,9 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1870
1877
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
1871
1878
|
return preact.createElement(preact.Fragment, {}, ...children);
|
|
1872
1879
|
}
|
|
1873
|
-
renderView(props) {
|
|
1880
|
+
renderView(props, title) {
|
|
1874
1881
|
let { pluginHooks } = props;
|
|
1875
|
-
let { viewSpec } = props;
|
|
1882
|
+
let { viewSpec, toolbarConfig } = props;
|
|
1876
1883
|
let viewProps = {
|
|
1877
1884
|
dateProfile: props.dateProfile,
|
|
1878
1885
|
businessHours: props.businessHours,
|
|
@@ -1883,6 +1890,8 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1883
1890
|
eventDrag: props.eventDrag,
|
|
1884
1891
|
eventResize: props.eventResize,
|
|
1885
1892
|
forPrint: props.forPrint,
|
|
1893
|
+
labelId: toolbarConfig.header && toolbarConfig.header.hasTitle ? this.viewTitleId : undefined,
|
|
1894
|
+
labelStr: toolbarConfig.header && toolbarConfig.header.hasTitle ? undefined : title,
|
|
1886
1895
|
};
|
|
1887
1896
|
let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
|
|
1888
1897
|
for (let transformer of transformers) {
|
|
@@ -1983,11 +1992,6 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
1983
1992
|
this.renderRunner.request();
|
|
1984
1993
|
}
|
|
1985
1994
|
}
|
|
1986
|
-
updateSize() {
|
|
1987
|
-
internalCommon.flushSync(() => {
|
|
1988
|
-
super.updateSize();
|
|
1989
|
-
});
|
|
1990
|
-
}
|
|
1991
1995
|
batchRendering(func) {
|
|
1992
1996
|
this.renderRunner.pause('batchRendering');
|
|
1993
1997
|
func();
|
|
@@ -2060,7 +2064,7 @@ function sliceEvents(props, allDay) {
|
|
|
2060
2064
|
return internalCommon.sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2061
2065
|
}
|
|
2062
2066
|
|
|
2063
|
-
const version = '7.0.0-
|
|
2067
|
+
const version = '7.0.0-rc.0';
|
|
2064
2068
|
|
|
2065
2069
|
exports.JsonRequestError = internalCommon.JsonRequestError;
|
|
2066
2070
|
exports.Calendar = Calendar;
|