@fullcalendar/core 6.1.17 → 6.1.18
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 +1 -1
- package/index.global.js +44 -18
- package/index.global.min.js +2 -2
- package/index.js +1 -1
- package/internal-common.cjs +42 -16
- package/internal-common.d.ts +1 -1
- package/internal-common.js +42 -16
- 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 +1 -1
package/index.js
CHANGED
|
@@ -2206,6 +2206,6 @@ function sliceEvents(props, allDay) {
|
|
|
2206
2206
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2207
2207
|
}
|
|
2208
2208
|
|
|
2209
|
-
const version = '6.1.
|
|
2209
|
+
const version = '6.1.18';
|
|
2210
2210
|
|
|
2211
2211
|
export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|
package/internal-common.cjs
CHANGED
|
@@ -1776,6 +1776,25 @@ function compareObjs(oldProps, newProps, equalityFuncs = {}) {
|
|
|
1776
1776
|
if (oldProps === newProps) {
|
|
1777
1777
|
return true;
|
|
1778
1778
|
}
|
|
1779
|
+
// if (debug) {
|
|
1780
|
+
// for (let key in newProps) {
|
|
1781
|
+
// if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) {
|
|
1782
|
+
// // equal
|
|
1783
|
+
// } else {
|
|
1784
|
+
// if (debug) {
|
|
1785
|
+
// console.log('prop difference', key, oldProps[key], newProps[key])
|
|
1786
|
+
// }
|
|
1787
|
+
// }
|
|
1788
|
+
// }
|
|
1789
|
+
// // check for props that were omitted in the new
|
|
1790
|
+
// for (let key in oldProps) {
|
|
1791
|
+
// if (!(key in newProps)) {
|
|
1792
|
+
// if (debug) {
|
|
1793
|
+
// console.log('prop absent', key)
|
|
1794
|
+
// }
|
|
1795
|
+
// }
|
|
1796
|
+
// }
|
|
1797
|
+
// }
|
|
1779
1798
|
for (let key in newProps) {
|
|
1780
1799
|
if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) ;
|
|
1781
1800
|
else {
|
|
@@ -2366,13 +2385,14 @@ function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator,
|
|
|
2366
2385
|
|
|
2367
2386
|
/* eslint max-classes-per-file: off */
|
|
2368
2387
|
class PureComponent extends preact.Component {
|
|
2388
|
+
// debug: boolean
|
|
2369
2389
|
shouldComponentUpdate(nextProps, nextState) {
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2390
|
+
const shouldUpdate = !compareObjs(this.props, nextProps, this.propEquality /*, this.debug */) ||
|
|
2391
|
+
!compareObjs(this.state, nextState, this.stateEquality /*, this.debug */);
|
|
2392
|
+
// if (this.debug && shouldUpdate) {
|
|
2393
|
+
// console.log('shouldUpdate!')
|
|
2394
|
+
// }
|
|
2395
|
+
return shouldUpdate;
|
|
2376
2396
|
}
|
|
2377
2397
|
// HACK for freakin' React StrictMode
|
|
2378
2398
|
safeSetState(newState) {
|
|
@@ -2612,10 +2632,10 @@ class ViewContainer extends BaseComponent {
|
|
|
2612
2632
|
let { props, context } = this;
|
|
2613
2633
|
let { options } = context;
|
|
2614
2634
|
let renderProps = { view: context.viewApi };
|
|
2615
|
-
return (preact.createElement(ContentContainer,
|
|
2635
|
+
return (preact.createElement(ContentContainer, { elRef: props.elRef, elTag: props.elTag || 'div', elAttrs: props.elAttrs, elClasses: [
|
|
2616
2636
|
...buildViewClassNames(props.viewSpec),
|
|
2617
2637
|
...(props.elClasses || []),
|
|
2618
|
-
], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }
|
|
2638
|
+
], elStyle: props.elStyle, renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }, () => props.children));
|
|
2619
2639
|
}
|
|
2620
2640
|
}
|
|
2621
2641
|
function buildViewClassNames(viewSpec) {
|
|
@@ -7070,8 +7090,11 @@ function getSectionByKey(sections, key) {
|
|
|
7070
7090
|
class EventContainer extends BaseComponent {
|
|
7071
7091
|
constructor() {
|
|
7072
7092
|
super(...arguments);
|
|
7093
|
+
// memo
|
|
7094
|
+
this.buildPublicEvent = memoize((context, eventDef, eventInstance) => new EventImpl(context, eventDef, eventInstance));
|
|
7073
7095
|
this.handleEl = (el) => {
|
|
7074
7096
|
this.el = el;
|
|
7097
|
+
setRef(this.props.elRef, el);
|
|
7075
7098
|
if (el) {
|
|
7076
7099
|
setElSeg(el, this.props.seg);
|
|
7077
7100
|
}
|
|
@@ -7084,7 +7107,7 @@ class EventContainer extends BaseComponent {
|
|
|
7084
7107
|
const { eventRange } = seg;
|
|
7085
7108
|
const { ui } = eventRange;
|
|
7086
7109
|
const renderProps = {
|
|
7087
|
-
event:
|
|
7110
|
+
event: this.buildPublicEvent(context, eventRange.def, eventRange.instance),
|
|
7088
7111
|
view: context.viewApi,
|
|
7089
7112
|
timeText: props.timeText,
|
|
7090
7113
|
textColor: ui.textColor,
|
|
@@ -7103,11 +7126,11 @@ class EventContainer extends BaseComponent {
|
|
|
7103
7126
|
isDragging: Boolean(props.isDragging),
|
|
7104
7127
|
isResizing: Boolean(props.isResizing),
|
|
7105
7128
|
};
|
|
7106
|
-
return (preact.createElement(ContentContainer,
|
|
7129
|
+
return (preact.createElement(ContentContainer, { elRef: this.handleEl, elTag: props.elTag, elAttrs: props.elAttrs, elClasses: [
|
|
7107
7130
|
...getEventClassNames(renderProps),
|
|
7108
7131
|
...seg.eventRange.ui.classNames,
|
|
7109
7132
|
...(props.elClasses || []),
|
|
7110
|
-
], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount }))
|
|
7133
|
+
], elStyle: props.elStyle, renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount }, props.children));
|
|
7111
7134
|
}
|
|
7112
7135
|
componentDidUpdate(prevProps) {
|
|
7113
7136
|
if (this.el && this.props.seg !== prevProps.seg) {
|
|
@@ -7134,6 +7157,9 @@ class StandardEvent extends BaseComponent {
|
|
|
7134
7157
|
Boolean(eventContentArg.isEndResizable) && (preact.createElement("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
7135
7158
|
}
|
|
7136
7159
|
}
|
|
7160
|
+
StandardEvent.addPropsEquality({
|
|
7161
|
+
seg: isPropsEqual,
|
|
7162
|
+
});
|
|
7137
7163
|
function renderInnerContent$1(innerProps) {
|
|
7138
7164
|
return (preact.createElement("div", { className: "fc-event-main-frame" },
|
|
7139
7165
|
innerProps.timeText && (preact.createElement("div", { className: "fc-event-time" }, innerProps.timeText)),
|
|
@@ -7148,7 +7174,7 @@ const NowIndicatorContainer = (props) => (preact.createElement(ViewContextType.C
|
|
|
7148
7174
|
date: context.dateEnv.toDate(props.date),
|
|
7149
7175
|
view: context.viewApi,
|
|
7150
7176
|
};
|
|
7151
|
-
return (preact.createElement(ContentContainer,
|
|
7177
|
+
return (preact.createElement(ContentContainer, { elRef: props.elRef, elTag: props.elTag || 'div', elAttrs: props.elAttrs, elClasses: props.elClasses, elStyle: props.elStyle, renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children));
|
|
7152
7178
|
}));
|
|
7153
7179
|
|
|
7154
7180
|
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
@@ -7171,12 +7197,12 @@ class DayCellContainer extends BaseComponent {
|
|
|
7171
7197
|
dateEnv: context.dateEnv,
|
|
7172
7198
|
monthStartFormat: options.monthStartFormat,
|
|
7173
7199
|
});
|
|
7174
|
-
return (preact.createElement(ContentContainer, Object.assign({}, props
|
|
7200
|
+
return (preact.createElement(ContentContainer, { elRef: props.elRef, elTag: props.elTag, elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), elClasses: [
|
|
7175
7201
|
...getDayClassNames(renderProps, context.theme),
|
|
7176
7202
|
...(props.elClasses || []),
|
|
7177
|
-
],
|
|
7203
|
+
], elStyle: props.elStyle, renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
|
|
7178
7204
|
// don't use custom classNames if disabled
|
|
7179
|
-
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount }))
|
|
7205
|
+
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount }, props.children));
|
|
7180
7206
|
}
|
|
7181
7207
|
}
|
|
7182
7208
|
function hasCustomDayCellContent(options) {
|
|
@@ -7213,7 +7239,7 @@ const WeekNumberContainer = (props) => (preact.createElement(ViewContextType.Con
|
|
|
7213
7239
|
let text = dateEnv.format(date, format);
|
|
7214
7240
|
let renderProps = { num, text, date };
|
|
7215
7241
|
return (preact.createElement(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
|
|
7216
|
-
,
|
|
7242
|
+
, { elRef: props.elRef, elTag: props.elTag, elAttrs: props.elAttrs, elClasses: props.elClasses, elStyle: props.elStyle, renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children));
|
|
7217
7243
|
}));
|
|
7218
7244
|
function renderInner(innerProps) {
|
|
7219
7245
|
return innerProps.text;
|
package/internal-common.d.ts
CHANGED
|
@@ -943,7 +943,6 @@ declare abstract class PureComponent<Props = Dictionary, State = Dictionary> ext
|
|
|
943
943
|
context: ViewContext;
|
|
944
944
|
propEquality: EqualityFuncs<Props>;
|
|
945
945
|
stateEquality: EqualityFuncs<State>;
|
|
946
|
-
debug: boolean;
|
|
947
946
|
shouldComponentUpdate(nextProps: Props, nextState: State): boolean;
|
|
948
947
|
safeSetState(newState: Partial<State>): void;
|
|
949
948
|
}
|
|
@@ -2807,6 +2806,7 @@ type EventContainerProps = ElProps & MinimalEventProps & {
|
|
|
2807
2806
|
children?: InnerContainerFunc<EventContentArg>;
|
|
2808
2807
|
};
|
|
2809
2808
|
declare class EventContainer extends BaseComponent<EventContainerProps> {
|
|
2809
|
+
private buildPublicEvent;
|
|
2810
2810
|
el: HTMLElement;
|
|
2811
2811
|
render(): createElement.JSX.Element;
|
|
2812
2812
|
handleEl: (el: HTMLElement | null) => void;
|
package/internal-common.js
CHANGED
|
@@ -1755,6 +1755,25 @@ function compareObjs(oldProps, newProps, equalityFuncs = {}) {
|
|
|
1755
1755
|
if (oldProps === newProps) {
|
|
1756
1756
|
return true;
|
|
1757
1757
|
}
|
|
1758
|
+
// if (debug) {
|
|
1759
|
+
// for (let key in newProps) {
|
|
1760
|
+
// if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) {
|
|
1761
|
+
// // equal
|
|
1762
|
+
// } else {
|
|
1763
|
+
// if (debug) {
|
|
1764
|
+
// console.log('prop difference', key, oldProps[key], newProps[key])
|
|
1765
|
+
// }
|
|
1766
|
+
// }
|
|
1767
|
+
// }
|
|
1768
|
+
// // check for props that were omitted in the new
|
|
1769
|
+
// for (let key in oldProps) {
|
|
1770
|
+
// if (!(key in newProps)) {
|
|
1771
|
+
// if (debug) {
|
|
1772
|
+
// console.log('prop absent', key)
|
|
1773
|
+
// }
|
|
1774
|
+
// }
|
|
1775
|
+
// }
|
|
1776
|
+
// }
|
|
1758
1777
|
for (let key in newProps) {
|
|
1759
1778
|
if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) ;
|
|
1760
1779
|
else {
|
|
@@ -2345,13 +2364,14 @@ function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator,
|
|
|
2345
2364
|
|
|
2346
2365
|
/* eslint max-classes-per-file: off */
|
|
2347
2366
|
class PureComponent extends Component {
|
|
2367
|
+
// debug: boolean
|
|
2348
2368
|
shouldComponentUpdate(nextProps, nextState) {
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2369
|
+
const shouldUpdate = !compareObjs(this.props, nextProps, this.propEquality /*, this.debug */) ||
|
|
2370
|
+
!compareObjs(this.state, nextState, this.stateEquality /*, this.debug */);
|
|
2371
|
+
// if (this.debug && shouldUpdate) {
|
|
2372
|
+
// console.log('shouldUpdate!')
|
|
2373
|
+
// }
|
|
2374
|
+
return shouldUpdate;
|
|
2355
2375
|
}
|
|
2356
2376
|
// HACK for freakin' React StrictMode
|
|
2357
2377
|
safeSetState(newState) {
|
|
@@ -2591,10 +2611,10 @@ class ViewContainer extends BaseComponent {
|
|
|
2591
2611
|
let { props, context } = this;
|
|
2592
2612
|
let { options } = context;
|
|
2593
2613
|
let renderProps = { view: context.viewApi };
|
|
2594
|
-
return (createElement(ContentContainer,
|
|
2614
|
+
return (createElement(ContentContainer, { elRef: props.elRef, elTag: props.elTag || 'div', elAttrs: props.elAttrs, elClasses: [
|
|
2595
2615
|
...buildViewClassNames(props.viewSpec),
|
|
2596
2616
|
...(props.elClasses || []),
|
|
2597
|
-
], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }
|
|
2617
|
+
], elStyle: props.elStyle, renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }, () => props.children));
|
|
2598
2618
|
}
|
|
2599
2619
|
}
|
|
2600
2620
|
function buildViewClassNames(viewSpec) {
|
|
@@ -7049,8 +7069,11 @@ function getSectionByKey(sections, key) {
|
|
|
7049
7069
|
class EventContainer extends BaseComponent {
|
|
7050
7070
|
constructor() {
|
|
7051
7071
|
super(...arguments);
|
|
7072
|
+
// memo
|
|
7073
|
+
this.buildPublicEvent = memoize((context, eventDef, eventInstance) => new EventImpl(context, eventDef, eventInstance));
|
|
7052
7074
|
this.handleEl = (el) => {
|
|
7053
7075
|
this.el = el;
|
|
7076
|
+
setRef(this.props.elRef, el);
|
|
7054
7077
|
if (el) {
|
|
7055
7078
|
setElSeg(el, this.props.seg);
|
|
7056
7079
|
}
|
|
@@ -7063,7 +7086,7 @@ class EventContainer extends BaseComponent {
|
|
|
7063
7086
|
const { eventRange } = seg;
|
|
7064
7087
|
const { ui } = eventRange;
|
|
7065
7088
|
const renderProps = {
|
|
7066
|
-
event:
|
|
7089
|
+
event: this.buildPublicEvent(context, eventRange.def, eventRange.instance),
|
|
7067
7090
|
view: context.viewApi,
|
|
7068
7091
|
timeText: props.timeText,
|
|
7069
7092
|
textColor: ui.textColor,
|
|
@@ -7082,11 +7105,11 @@ class EventContainer extends BaseComponent {
|
|
|
7082
7105
|
isDragging: Boolean(props.isDragging),
|
|
7083
7106
|
isResizing: Boolean(props.isResizing),
|
|
7084
7107
|
};
|
|
7085
|
-
return (createElement(ContentContainer,
|
|
7108
|
+
return (createElement(ContentContainer, { elRef: this.handleEl, elTag: props.elTag, elAttrs: props.elAttrs, elClasses: [
|
|
7086
7109
|
...getEventClassNames(renderProps),
|
|
7087
7110
|
...seg.eventRange.ui.classNames,
|
|
7088
7111
|
...(props.elClasses || []),
|
|
7089
|
-
], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount }))
|
|
7112
|
+
], elStyle: props.elStyle, renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount }, props.children));
|
|
7090
7113
|
}
|
|
7091
7114
|
componentDidUpdate(prevProps) {
|
|
7092
7115
|
if (this.el && this.props.seg !== prevProps.seg) {
|
|
@@ -7113,6 +7136,9 @@ class StandardEvent extends BaseComponent {
|
|
|
7113
7136
|
Boolean(eventContentArg.isEndResizable) && (createElement("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
7114
7137
|
}
|
|
7115
7138
|
}
|
|
7139
|
+
StandardEvent.addPropsEquality({
|
|
7140
|
+
seg: isPropsEqual,
|
|
7141
|
+
});
|
|
7116
7142
|
function renderInnerContent$1(innerProps) {
|
|
7117
7143
|
return (createElement("div", { className: "fc-event-main-frame" },
|
|
7118
7144
|
innerProps.timeText && (createElement("div", { className: "fc-event-time" }, innerProps.timeText)),
|
|
@@ -7127,7 +7153,7 @@ const NowIndicatorContainer = (props) => (createElement(ViewContextType.Consumer
|
|
|
7127
7153
|
date: context.dateEnv.toDate(props.date),
|
|
7128
7154
|
view: context.viewApi,
|
|
7129
7155
|
};
|
|
7130
|
-
return (createElement(ContentContainer,
|
|
7156
|
+
return (createElement(ContentContainer, { elRef: props.elRef, elTag: props.elTag || 'div', elAttrs: props.elAttrs, elClasses: props.elClasses, elStyle: props.elStyle, renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children));
|
|
7131
7157
|
}));
|
|
7132
7158
|
|
|
7133
7159
|
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
@@ -7150,12 +7176,12 @@ class DayCellContainer extends BaseComponent {
|
|
|
7150
7176
|
dateEnv: context.dateEnv,
|
|
7151
7177
|
monthStartFormat: options.monthStartFormat,
|
|
7152
7178
|
});
|
|
7153
|
-
return (createElement(ContentContainer, Object.assign({}, props
|
|
7179
|
+
return (createElement(ContentContainer, { elRef: props.elRef, elTag: props.elTag, elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), elClasses: [
|
|
7154
7180
|
...getDayClassNames(renderProps, context.theme),
|
|
7155
7181
|
...(props.elClasses || []),
|
|
7156
|
-
],
|
|
7182
|
+
], elStyle: props.elStyle, renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
|
|
7157
7183
|
// don't use custom classNames if disabled
|
|
7158
|
-
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount }))
|
|
7184
|
+
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount }, props.children));
|
|
7159
7185
|
}
|
|
7160
7186
|
}
|
|
7161
7187
|
function hasCustomDayCellContent(options) {
|
|
@@ -7192,7 +7218,7 @@ const WeekNumberContainer = (props) => (createElement(ViewContextType.Consumer,
|
|
|
7192
7218
|
let text = dateEnv.format(date, format);
|
|
7193
7219
|
let renderProps = { num, text, date };
|
|
7194
7220
|
return (createElement(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
|
|
7195
|
-
,
|
|
7221
|
+
, { elRef: props.elRef, elTag: props.elTag, elAttrs: props.elAttrs, elClasses: props.elClasses, elStyle: props.elStyle, renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children));
|
|
7196
7222
|
}));
|
|
7197
7223
|
function renderInner(innerProps) {
|
|
7198
7224
|
return innerProps.text;
|
package/locales/af.global.js
CHANGED
package/locales/af.global.min.js
CHANGED
package/locales/ar-dz.global.js
CHANGED
package/locales/ar-kw.global.js
CHANGED
package/locales/ar-ly.global.js
CHANGED
package/locales/ar-ma.global.js
CHANGED
package/locales/ar-sa.global.js
CHANGED
package/locales/ar-tn.global.js
CHANGED
package/locales/ar.global.js
CHANGED
package/locales/ar.global.min.js
CHANGED
package/locales/az.global.js
CHANGED
package/locales/az.global.min.js
CHANGED
package/locales/bg.global.js
CHANGED
package/locales/bg.global.min.js
CHANGED
package/locales/bn.global.js
CHANGED
package/locales/bn.global.min.js
CHANGED
package/locales/bs.global.js
CHANGED
package/locales/bs.global.min.js
CHANGED
package/locales/ca.global.js
CHANGED
package/locales/ca.global.min.js
CHANGED
package/locales/cs.global.js
CHANGED
package/locales/cs.global.min.js
CHANGED
package/locales/cy.global.js
CHANGED
package/locales/cy.global.min.js
CHANGED
package/locales/da.global.js
CHANGED
package/locales/da.global.min.js
CHANGED
package/locales/de-at.global.js
CHANGED
package/locales/de.global.js
CHANGED
package/locales/de.global.min.js
CHANGED
package/locales/el.global.js
CHANGED
package/locales/el.global.min.js
CHANGED
package/locales/en-au.global.js
CHANGED