@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.
Files changed (168) hide show
  1. package/index.cjs +1 -1
  2. package/index.global.js +44 -18
  3. package/index.global.min.js +2 -2
  4. package/index.js +1 -1
  5. package/internal-common.cjs +42 -16
  6. package/internal-common.d.ts +1 -1
  7. package/internal-common.js +42 -16
  8. package/locales/af.global.js +1 -1
  9. package/locales/af.global.min.js +1 -1
  10. package/locales/ar-dz.global.js +1 -1
  11. package/locales/ar-dz.global.min.js +1 -1
  12. package/locales/ar-kw.global.js +1 -1
  13. package/locales/ar-kw.global.min.js +1 -1
  14. package/locales/ar-ly.global.js +1 -1
  15. package/locales/ar-ly.global.min.js +1 -1
  16. package/locales/ar-ma.global.js +1 -1
  17. package/locales/ar-ma.global.min.js +1 -1
  18. package/locales/ar-sa.global.js +1 -1
  19. package/locales/ar-sa.global.min.js +1 -1
  20. package/locales/ar-tn.global.js +1 -1
  21. package/locales/ar-tn.global.min.js +1 -1
  22. package/locales/ar.global.js +1 -1
  23. package/locales/ar.global.min.js +1 -1
  24. package/locales/az.global.js +1 -1
  25. package/locales/az.global.min.js +1 -1
  26. package/locales/bg.global.js +1 -1
  27. package/locales/bg.global.min.js +1 -1
  28. package/locales/bn.global.js +1 -1
  29. package/locales/bn.global.min.js +1 -1
  30. package/locales/bs.global.js +1 -1
  31. package/locales/bs.global.min.js +1 -1
  32. package/locales/ca.global.js +1 -1
  33. package/locales/ca.global.min.js +1 -1
  34. package/locales/cs.global.js +1 -1
  35. package/locales/cs.global.min.js +1 -1
  36. package/locales/cy.global.js +1 -1
  37. package/locales/cy.global.min.js +1 -1
  38. package/locales/da.global.js +1 -1
  39. package/locales/da.global.min.js +1 -1
  40. package/locales/de-at.global.js +1 -1
  41. package/locales/de-at.global.min.js +1 -1
  42. package/locales/de.global.js +1 -1
  43. package/locales/de.global.min.js +1 -1
  44. package/locales/el.global.js +1 -1
  45. package/locales/el.global.min.js +1 -1
  46. package/locales/en-au.global.js +1 -1
  47. package/locales/en-au.global.min.js +1 -1
  48. package/locales/en-gb.global.js +1 -1
  49. package/locales/en-gb.global.min.js +1 -1
  50. package/locales/en-nz.global.js +1 -1
  51. package/locales/en-nz.global.min.js +1 -1
  52. package/locales/eo.global.js +1 -1
  53. package/locales/eo.global.min.js +1 -1
  54. package/locales/es-us.global.js +1 -1
  55. package/locales/es-us.global.min.js +1 -1
  56. package/locales/es.global.js +1 -1
  57. package/locales/es.global.min.js +1 -1
  58. package/locales/et.global.js +1 -1
  59. package/locales/et.global.min.js +1 -1
  60. package/locales/eu.global.js +1 -1
  61. package/locales/eu.global.min.js +1 -1
  62. package/locales/fa.global.js +1 -1
  63. package/locales/fa.global.min.js +1 -1
  64. package/locales/fi.global.js +1 -1
  65. package/locales/fi.global.min.js +1 -1
  66. package/locales/fr-ca.global.js +1 -1
  67. package/locales/fr-ca.global.min.js +1 -1
  68. package/locales/fr-ch.global.js +1 -1
  69. package/locales/fr-ch.global.min.js +1 -1
  70. package/locales/fr.global.js +1 -1
  71. package/locales/fr.global.min.js +1 -1
  72. package/locales/gl.global.js +1 -1
  73. package/locales/gl.global.min.js +1 -1
  74. package/locales/he.global.js +1 -1
  75. package/locales/he.global.min.js +1 -1
  76. package/locales/hi.global.js +1 -1
  77. package/locales/hi.global.min.js +1 -1
  78. package/locales/hr.global.js +1 -1
  79. package/locales/hr.global.min.js +1 -1
  80. package/locales/hu.global.js +1 -1
  81. package/locales/hu.global.min.js +1 -1
  82. package/locales/hy-am.global.js +1 -1
  83. package/locales/hy-am.global.min.js +1 -1
  84. package/locales/id.global.js +1 -1
  85. package/locales/id.global.min.js +1 -1
  86. package/locales/is.global.js +1 -1
  87. package/locales/is.global.min.js +1 -1
  88. package/locales/it.global.js +1 -1
  89. package/locales/it.global.min.js +1 -1
  90. package/locales/ja.global.js +1 -1
  91. package/locales/ja.global.min.js +1 -1
  92. package/locales/ka.global.js +1 -1
  93. package/locales/ka.global.min.js +1 -1
  94. package/locales/kk.global.js +1 -1
  95. package/locales/kk.global.min.js +1 -1
  96. package/locales/km.global.js +1 -1
  97. package/locales/km.global.min.js +1 -1
  98. package/locales/ko.global.js +1 -1
  99. package/locales/ko.global.min.js +1 -1
  100. package/locales/ku.global.js +1 -1
  101. package/locales/ku.global.min.js +1 -1
  102. package/locales/lb.global.js +1 -1
  103. package/locales/lb.global.min.js +1 -1
  104. package/locales/lt.global.js +1 -1
  105. package/locales/lt.global.min.js +1 -1
  106. package/locales/lv.global.js +1 -1
  107. package/locales/lv.global.min.js +1 -1
  108. package/locales/mk.global.js +1 -1
  109. package/locales/mk.global.min.js +1 -1
  110. package/locales/ms.global.js +1 -1
  111. package/locales/ms.global.min.js +1 -1
  112. package/locales/nb.global.js +1 -1
  113. package/locales/nb.global.min.js +1 -1
  114. package/locales/ne.global.js +1 -1
  115. package/locales/ne.global.min.js +1 -1
  116. package/locales/nl.global.js +1 -1
  117. package/locales/nl.global.min.js +1 -1
  118. package/locales/nn.global.js +1 -1
  119. package/locales/nn.global.min.js +1 -1
  120. package/locales/pl.global.js +1 -1
  121. package/locales/pl.global.min.js +1 -1
  122. package/locales/pt-br.global.js +1 -1
  123. package/locales/pt-br.global.min.js +1 -1
  124. package/locales/pt.global.js +1 -1
  125. package/locales/pt.global.min.js +1 -1
  126. package/locales/ro.global.js +1 -1
  127. package/locales/ro.global.min.js +1 -1
  128. package/locales/ru.global.js +1 -1
  129. package/locales/ru.global.min.js +1 -1
  130. package/locales/si-lk.global.js +1 -1
  131. package/locales/si-lk.global.min.js +1 -1
  132. package/locales/sk.global.js +1 -1
  133. package/locales/sk.global.min.js +1 -1
  134. package/locales/sl.global.js +1 -1
  135. package/locales/sl.global.min.js +1 -1
  136. package/locales/sm.global.js +1 -1
  137. package/locales/sm.global.min.js +1 -1
  138. package/locales/sq.global.js +1 -1
  139. package/locales/sq.global.min.js +1 -1
  140. package/locales/sr-cyrl.global.js +1 -1
  141. package/locales/sr-cyrl.global.min.js +1 -1
  142. package/locales/sr.global.js +1 -1
  143. package/locales/sr.global.min.js +1 -1
  144. package/locales/sv.global.js +1 -1
  145. package/locales/sv.global.min.js +1 -1
  146. package/locales/ta-in.global.js +1 -1
  147. package/locales/ta-in.global.min.js +1 -1
  148. package/locales/th.global.js +1 -1
  149. package/locales/th.global.min.js +1 -1
  150. package/locales/tr.global.js +1 -1
  151. package/locales/tr.global.min.js +1 -1
  152. package/locales/ug.global.js +1 -1
  153. package/locales/ug.global.min.js +1 -1
  154. package/locales/uk.global.js +1 -1
  155. package/locales/uk.global.min.js +1 -1
  156. package/locales/uz-cy.global.js +1 -1
  157. package/locales/uz-cy.global.min.js +1 -1
  158. package/locales/uz.global.js +1 -1
  159. package/locales/uz.global.min.js +1 -1
  160. package/locales/vi.global.js +1 -1
  161. package/locales/vi.global.min.js +1 -1
  162. package/locales/zh-cn.global.js +1 -1
  163. package/locales/zh-cn.global.min.js +1 -1
  164. package/locales/zh-tw.global.js +1 -1
  165. package/locales/zh-tw.global.min.js +1 -1
  166. package/locales-all.global.js +1 -1
  167. package/locales-all.global.min.js +1 -1
  168. package/package.json +1 -1
package/index.cjs CHANGED
@@ -2209,7 +2209,7 @@ function sliceEvents(props, allDay) {
2209
2209
  return internalCommon.sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
2210
2210
  }
2211
2211
 
2212
- const version = '6.1.17';
2212
+ const version = '6.1.18';
2213
2213
 
2214
2214
  exports.JsonRequestError = internalCommon.JsonRequestError;
2215
2215
  exports.Calendar = Calendar;
package/index.global.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar Core v6.1.17
2
+ FullCalendar Core v6.1.18
3
3
  Docs & License: https://fullcalendar.io
4
4
  (c) 2024 Adam Shaw
5
5
  */
@@ -672,6 +672,25 @@ var FullCalendar = (function (exports) {
672
672
  if (oldProps === newProps) {
673
673
  return true;
674
674
  }
675
+ // if (debug) {
676
+ // for (let key in newProps) {
677
+ // if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) {
678
+ // // equal
679
+ // } else {
680
+ // if (debug) {
681
+ // console.log('prop difference', key, oldProps[key], newProps[key])
682
+ // }
683
+ // }
684
+ // }
685
+ // // check for props that were omitted in the new
686
+ // for (let key in oldProps) {
687
+ // if (!(key in newProps)) {
688
+ // if (debug) {
689
+ // console.log('prop absent', key)
690
+ // }
691
+ // }
692
+ // }
693
+ // }
675
694
  for (let key in newProps) {
676
695
  if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) ;
677
696
  else {
@@ -3172,13 +3191,14 @@ var FullCalendar = (function (exports) {
3172
3191
 
3173
3192
  /* eslint max-classes-per-file: off */
3174
3193
  class PureComponent extends x$1 {
3194
+ // debug: boolean
3175
3195
  shouldComponentUpdate(nextProps, nextState) {
3176
- if (this.debug) {
3177
- // eslint-disable-next-line no-console
3178
- console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state));
3179
- }
3180
- return !compareObjs(this.props, nextProps, this.propEquality) ||
3181
- !compareObjs(this.state, nextState, this.stateEquality);
3196
+ const shouldUpdate = !compareObjs(this.props, nextProps, this.propEquality /*, this.debug */) ||
3197
+ !compareObjs(this.state, nextState, this.stateEquality /*, this.debug */);
3198
+ // if (this.debug && shouldUpdate) {
3199
+ // console.log('shouldUpdate!')
3200
+ // }
3201
+ return shouldUpdate;
3182
3202
  }
3183
3203
  // HACK for freakin' React StrictMode
3184
3204
  safeSetState(newState) {
@@ -6622,8 +6642,11 @@ var FullCalendar = (function (exports) {
6622
6642
  class EventContainer extends BaseComponent {
6623
6643
  constructor() {
6624
6644
  super(...arguments);
6645
+ // memo
6646
+ this.buildPublicEvent = memoize((context, eventDef, eventInstance) => new EventImpl(context, eventDef, eventInstance));
6625
6647
  this.handleEl = (el) => {
6626
6648
  this.el = el;
6649
+ setRef(this.props.elRef, el);
6627
6650
  if (el) {
6628
6651
  setElSeg(el, this.props.seg);
6629
6652
  }
@@ -6636,7 +6659,7 @@ var FullCalendar = (function (exports) {
6636
6659
  const { eventRange } = seg;
6637
6660
  const { ui } = eventRange;
6638
6661
  const renderProps = {
6639
- event: new EventImpl(context, eventRange.def, eventRange.instance),
6662
+ event: this.buildPublicEvent(context, eventRange.def, eventRange.instance),
6640
6663
  view: context.viewApi,
6641
6664
  timeText: props.timeText,
6642
6665
  textColor: ui.textColor,
@@ -6655,11 +6678,11 @@ var FullCalendar = (function (exports) {
6655
6678
  isDragging: Boolean(props.isDragging),
6656
6679
  isResizing: Boolean(props.isResizing),
6657
6680
  };
6658
- return (y(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
6681
+ return (y(ContentContainer, { elRef: this.handleEl, elTag: props.elTag, elAttrs: props.elAttrs, elClasses: [
6659
6682
  ...getEventClassNames(renderProps),
6660
6683
  ...seg.eventRange.ui.classNames,
6661
6684
  ...(props.elClasses || []),
6662
- ], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
6685
+ ], elStyle: props.elStyle, renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount }, props.children));
6663
6686
  }
6664
6687
  componentDidUpdate(prevProps) {
6665
6688
  if (this.el && this.props.seg !== prevProps.seg) {
@@ -6686,6 +6709,9 @@ var FullCalendar = (function (exports) {
6686
6709
  Boolean(eventContentArg.isEndResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
6687
6710
  }
6688
6711
  }
6712
+ StandardEvent.addPropsEquality({
6713
+ seg: isPropsEqual,
6714
+ });
6689
6715
  function renderInnerContent$1(innerProps) {
6690
6716
  return (y("div", { className: "fc-event-main-frame" },
6691
6717
  innerProps.timeText && (y("div", { className: "fc-event-time" }, innerProps.timeText)),
@@ -6700,7 +6726,7 @@ var FullCalendar = (function (exports) {
6700
6726
  date: context.dateEnv.toDate(props.date),
6701
6727
  view: context.viewApi,
6702
6728
  };
6703
- return (y(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
6729
+ return (y(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));
6704
6730
  }));
6705
6731
 
6706
6732
  const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
@@ -6723,12 +6749,12 @@ var FullCalendar = (function (exports) {
6723
6749
  dateEnv: context.dateEnv,
6724
6750
  monthStartFormat: options.monthStartFormat,
6725
6751
  });
6726
- return (y(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
6752
+ return (y(ContentContainer, { elRef: props.elRef, elTag: props.elTag, elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), elClasses: [
6727
6753
  ...getDayClassNames(renderProps, context.theme),
6728
6754
  ...(props.elClasses || []),
6729
- ], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
6755
+ ], elStyle: props.elStyle, renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
6730
6756
  // don't use custom classNames if disabled
6731
- renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
6757
+ renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount }, props.children));
6732
6758
  }
6733
6759
  }
6734
6760
  function hasCustomDayCellContent(options) {
@@ -6765,7 +6791,7 @@ var FullCalendar = (function (exports) {
6765
6791
  let text = dateEnv.format(date, format);
6766
6792
  let renderProps = { num, text, date };
6767
6793
  return (y(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
6768
- , Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
6794
+ , { 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));
6769
6795
  }));
6770
6796
  function renderInner(innerProps) {
6771
6797
  return innerProps.text;
@@ -7021,10 +7047,10 @@ var FullCalendar = (function (exports) {
7021
7047
  let { props, context } = this;
7022
7048
  let { options } = context;
7023
7049
  let renderProps = { view: context.viewApi };
7024
- return (y(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [
7050
+ return (y(ContentContainer, { elRef: props.elRef, elTag: props.elTag || 'div', elAttrs: props.elAttrs, elClasses: [
7025
7051
  ...buildViewClassNames(props.viewSpec),
7026
7052
  ...(props.elClasses || []),
7027
- ], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children));
7053
+ ], elStyle: props.elStyle, renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }, () => props.children));
7028
7054
  }
7029
7055
  }
7030
7056
  function buildViewClassNames(viewSpec) {
@@ -9908,7 +9934,7 @@ var FullCalendar = (function (exports) {
9908
9934
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
9909
9935
  }
9910
9936
 
9911
- const version = '6.1.17';
9937
+ const version = '6.1.18';
9912
9938
 
9913
9939
  exports.Calendar = Calendar;
9914
9940
  exports.Internal = internal;