@fullcalendar/core 6.0.0 → 6.0.2

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 (254) hide show
  1. package/index.cjs +587 -9
  2. package/index.d.ts +7 -3
  3. package/index.global.js +786 -771
  4. package/index.global.min.js +2 -2
  5. package/index.js +580 -4
  6. package/index.js.map +1 -0
  7. package/internal-common.cjs +23 -586
  8. package/internal-common.d.ts +4 -5
  9. package/internal-common.js +18 -579
  10. package/internal-common.js.map +1 -0
  11. package/internal.cjs +0 -2
  12. package/internal.d.ts +1 -1
  13. package/internal.js +1 -1
  14. package/internal.js.map +1 -0
  15. package/locales/af.global.js +4 -4
  16. package/locales/af.global.min.js +2 -2
  17. package/locales/af.js.map +1 -0
  18. package/locales/ar-dz.global.js +4 -4
  19. package/locales/ar-dz.global.min.js +2 -2
  20. package/locales/ar-dz.js.map +1 -0
  21. package/locales/ar-kw.global.js +4 -4
  22. package/locales/ar-kw.global.min.js +2 -2
  23. package/locales/ar-kw.js.map +1 -0
  24. package/locales/ar-ly.global.js +4 -4
  25. package/locales/ar-ly.global.min.js +2 -2
  26. package/locales/ar-ly.js.map +1 -0
  27. package/locales/ar-ma.global.js +4 -4
  28. package/locales/ar-ma.global.min.js +2 -2
  29. package/locales/ar-ma.js.map +1 -0
  30. package/locales/ar-sa.global.js +4 -4
  31. package/locales/ar-sa.global.min.js +2 -2
  32. package/locales/ar-sa.js.map +1 -0
  33. package/locales/ar-tn.global.js +4 -4
  34. package/locales/ar-tn.global.min.js +2 -2
  35. package/locales/ar-tn.js.map +1 -0
  36. package/locales/ar.global.js +4 -4
  37. package/locales/ar.global.min.js +2 -2
  38. package/locales/ar.js.map +1 -0
  39. package/locales/az.global.js +4 -4
  40. package/locales/az.global.min.js +2 -2
  41. package/locales/az.js.map +1 -0
  42. package/locales/bg.global.js +4 -4
  43. package/locales/bg.global.min.js +2 -2
  44. package/locales/bg.js.map +1 -0
  45. package/locales/bn.global.js +4 -4
  46. package/locales/bn.global.min.js +2 -2
  47. package/locales/bn.js.map +1 -0
  48. package/locales/bs.global.js +4 -4
  49. package/locales/bs.global.min.js +2 -2
  50. package/locales/bs.js.map +1 -0
  51. package/locales/ca.global.js +4 -4
  52. package/locales/ca.global.min.js +2 -2
  53. package/locales/ca.js.map +1 -0
  54. package/locales/cs.global.js +4 -4
  55. package/locales/cs.global.min.js +2 -2
  56. package/locales/cs.js.map +1 -0
  57. package/locales/cy.global.js +4 -4
  58. package/locales/cy.global.min.js +2 -2
  59. package/locales/cy.js.map +1 -0
  60. package/locales/da.global.js +4 -4
  61. package/locales/da.global.min.js +2 -2
  62. package/locales/da.js.map +1 -0
  63. package/locales/de-at.global.js +4 -4
  64. package/locales/de-at.global.min.js +2 -2
  65. package/locales/de-at.js.map +1 -0
  66. package/locales/de.global.js +4 -4
  67. package/locales/de.global.min.js +2 -2
  68. package/locales/de.js.map +1 -0
  69. package/locales/el.global.js +4 -4
  70. package/locales/el.global.min.js +2 -2
  71. package/locales/el.js.map +1 -0
  72. package/locales/en-au.global.js +4 -4
  73. package/locales/en-au.global.min.js +2 -2
  74. package/locales/en-au.js.map +1 -0
  75. package/locales/en-gb.global.js +4 -4
  76. package/locales/en-gb.global.min.js +2 -2
  77. package/locales/en-gb.js.map +1 -0
  78. package/locales/en-nz.global.js +4 -4
  79. package/locales/en-nz.global.min.js +2 -2
  80. package/locales/en-nz.js.map +1 -0
  81. package/locales/eo.global.js +4 -4
  82. package/locales/eo.global.min.js +2 -2
  83. package/locales/eo.js.map +1 -0
  84. package/locales/es-us.global.js +4 -4
  85. package/locales/es-us.global.min.js +2 -2
  86. package/locales/es-us.js.map +1 -0
  87. package/locales/es.global.js +4 -4
  88. package/locales/es.global.min.js +2 -2
  89. package/locales/es.js.map +1 -0
  90. package/locales/et.global.js +4 -4
  91. package/locales/et.global.min.js +2 -2
  92. package/locales/et.js.map +1 -0
  93. package/locales/eu.global.js +4 -4
  94. package/locales/eu.global.min.js +2 -2
  95. package/locales/eu.js.map +1 -0
  96. package/locales/fa.global.js +4 -4
  97. package/locales/fa.global.min.js +2 -2
  98. package/locales/fa.js.map +1 -0
  99. package/locales/fi.global.js +4 -4
  100. package/locales/fi.global.min.js +2 -2
  101. package/locales/fi.js.map +1 -0
  102. package/locales/fr-ca.global.js +4 -4
  103. package/locales/fr-ca.global.min.js +2 -2
  104. package/locales/fr-ca.js.map +1 -0
  105. package/locales/fr-ch.global.js +4 -4
  106. package/locales/fr-ch.global.min.js +2 -2
  107. package/locales/fr-ch.js.map +1 -0
  108. package/locales/fr.global.js +4 -4
  109. package/locales/fr.global.min.js +2 -2
  110. package/locales/fr.js.map +1 -0
  111. package/locales/gl.global.js +4 -4
  112. package/locales/gl.global.min.js +2 -2
  113. package/locales/gl.js.map +1 -0
  114. package/locales/he.global.js +4 -4
  115. package/locales/he.global.min.js +2 -2
  116. package/locales/he.js.map +1 -0
  117. package/locales/hi.global.js +4 -4
  118. package/locales/hi.global.min.js +2 -2
  119. package/locales/hi.js.map +1 -0
  120. package/locales/hr.global.js +4 -4
  121. package/locales/hr.global.min.js +2 -2
  122. package/locales/hr.js.map +1 -0
  123. package/locales/hu.global.js +4 -4
  124. package/locales/hu.global.min.js +2 -2
  125. package/locales/hu.js.map +1 -0
  126. package/locales/hy-am.global.js +4 -4
  127. package/locales/hy-am.global.min.js +2 -2
  128. package/locales/hy-am.js.map +1 -0
  129. package/locales/id.global.js +4 -4
  130. package/locales/id.global.min.js +2 -2
  131. package/locales/id.js.map +1 -0
  132. package/locales/is.global.js +4 -4
  133. package/locales/is.global.min.js +2 -2
  134. package/locales/is.js.map +1 -0
  135. package/locales/it.global.js +4 -4
  136. package/locales/it.global.min.js +2 -2
  137. package/locales/it.js.map +1 -0
  138. package/locales/ja.global.js +4 -4
  139. package/locales/ja.global.min.js +2 -2
  140. package/locales/ja.js.map +1 -0
  141. package/locales/ka.global.js +4 -4
  142. package/locales/ka.global.min.js +2 -2
  143. package/locales/ka.js.map +1 -0
  144. package/locales/kk.global.js +4 -4
  145. package/locales/kk.global.min.js +2 -2
  146. package/locales/kk.js.map +1 -0
  147. package/locales/km.global.js +4 -4
  148. package/locales/km.global.min.js +2 -2
  149. package/locales/km.js.map +1 -0
  150. package/locales/ko.global.js +4 -4
  151. package/locales/ko.global.min.js +2 -2
  152. package/locales/ko.js.map +1 -0
  153. package/locales/ku.global.js +4 -4
  154. package/locales/ku.global.min.js +2 -2
  155. package/locales/ku.js.map +1 -0
  156. package/locales/lb.global.js +4 -4
  157. package/locales/lb.global.min.js +2 -2
  158. package/locales/lb.js.map +1 -0
  159. package/locales/lt.global.js +4 -4
  160. package/locales/lt.global.min.js +2 -2
  161. package/locales/lt.js.map +1 -0
  162. package/locales/lv.global.js +4 -4
  163. package/locales/lv.global.min.js +2 -2
  164. package/locales/lv.js.map +1 -0
  165. package/locales/mk.global.js +4 -4
  166. package/locales/mk.global.min.js +2 -2
  167. package/locales/mk.js.map +1 -0
  168. package/locales/ms.global.js +4 -4
  169. package/locales/ms.global.min.js +2 -2
  170. package/locales/ms.js.map +1 -0
  171. package/locales/nb.global.js +4 -4
  172. package/locales/nb.global.min.js +2 -2
  173. package/locales/nb.js.map +1 -0
  174. package/locales/ne.global.js +4 -4
  175. package/locales/ne.global.min.js +2 -2
  176. package/locales/ne.js.map +1 -0
  177. package/locales/nl.global.js +4 -4
  178. package/locales/nl.global.min.js +2 -2
  179. package/locales/nl.js.map +1 -0
  180. package/locales/nn.global.js +4 -4
  181. package/locales/nn.global.min.js +2 -2
  182. package/locales/nn.js.map +1 -0
  183. package/locales/pl.global.js +4 -4
  184. package/locales/pl.global.min.js +2 -2
  185. package/locales/pl.js.map +1 -0
  186. package/locales/pt-br.global.js +4 -4
  187. package/locales/pt-br.global.min.js +2 -2
  188. package/locales/pt-br.js.map +1 -0
  189. package/locales/pt.global.js +4 -4
  190. package/locales/pt.global.min.js +2 -2
  191. package/locales/pt.js.map +1 -0
  192. package/locales/ro.global.js +4 -4
  193. package/locales/ro.global.min.js +2 -2
  194. package/locales/ro.js.map +1 -0
  195. package/locales/ru.global.js +4 -4
  196. package/locales/ru.global.min.js +2 -2
  197. package/locales/ru.js.map +1 -0
  198. package/locales/si-lk.global.js +4 -4
  199. package/locales/si-lk.global.min.js +2 -2
  200. package/locales/si-lk.js.map +1 -0
  201. package/locales/sk.global.js +4 -4
  202. package/locales/sk.global.min.js +2 -2
  203. package/locales/sk.js.map +1 -0
  204. package/locales/sl.global.js +4 -4
  205. package/locales/sl.global.min.js +2 -2
  206. package/locales/sl.js.map +1 -0
  207. package/locales/sm.global.js +4 -4
  208. package/locales/sm.global.min.js +2 -2
  209. package/locales/sm.js.map +1 -0
  210. package/locales/sq.global.js +4 -4
  211. package/locales/sq.global.min.js +2 -2
  212. package/locales/sq.js.map +1 -0
  213. package/locales/sr-cyrl.global.js +4 -4
  214. package/locales/sr-cyrl.global.min.js +2 -2
  215. package/locales/sr-cyrl.js.map +1 -0
  216. package/locales/sr.global.js +4 -4
  217. package/locales/sr.global.min.js +2 -2
  218. package/locales/sr.js.map +1 -0
  219. package/locales/sv.global.js +4 -4
  220. package/locales/sv.global.min.js +2 -2
  221. package/locales/sv.js.map +1 -0
  222. package/locales/ta-in.global.js +4 -4
  223. package/locales/ta-in.global.min.js +2 -2
  224. package/locales/ta-in.js.map +1 -0
  225. package/locales/th.global.js +4 -4
  226. package/locales/th.global.min.js +2 -2
  227. package/locales/th.js.map +1 -0
  228. package/locales/tr.global.js +4 -4
  229. package/locales/tr.global.min.js +2 -2
  230. package/locales/tr.js.map +1 -0
  231. package/locales/ug.global.js +4 -4
  232. package/locales/ug.global.min.js +2 -2
  233. package/locales/ug.js.map +1 -0
  234. package/locales/uk.global.js +4 -4
  235. package/locales/uk.global.min.js +2 -2
  236. package/locales/uk.js.map +1 -0
  237. package/locales/uz.global.js +4 -4
  238. package/locales/uz.global.min.js +2 -2
  239. package/locales/uz.js.map +1 -0
  240. package/locales/vi.global.js +4 -4
  241. package/locales/vi.global.min.js +2 -2
  242. package/locales/vi.js.map +1 -0
  243. package/locales/zh-cn.global.js +4 -4
  244. package/locales/zh-cn.global.min.js +2 -2
  245. package/locales/zh-cn.js.map +1 -0
  246. package/locales/zh-tw.global.js +4 -4
  247. package/locales/zh-tw.global.min.js +2 -2
  248. package/locales/zh-tw.js.map +1 -0
  249. package/locales-all.global.js +4 -4
  250. package/locales-all.global.min.js +2 -2
  251. package/locales-all.js.map +1 -0
  252. package/package.json +1 -1
  253. package/preact.js +1 -1
  254. package/preact.js.map +1 -0
package/index.js CHANGED
@@ -1,11 +1,13 @@
1
- import { i as injectStyles, g as globalLocales, m as mergeProps, T as Theme, a as mapHash, V as ViewContextType, C as ContentContainer, b as buildViewClassNames, c as greatestDurationDenominator, d as createDuration, B as BASE_OPTION_DEFAULTS, f as formatWithOrdinals, D as DelayedRunner, e as createFormatter, h as diffWholeDays, j as memoize, k as buildBuildPluginHooks, l as memoizeObjArg, n as isPropsEqual, E as Emitter, o as getInitialDate, r as rangeContainsMarker, p as initEventSources, q as createEmptyEventStore, s as reduceCurrentDate, t as reduceEventSources, u as reduceEventStore, v as computeEventSourcesLoading, w as reduceEventSourcesNewTimeZone, x as rezoneEventStoreDates, y as mergeRawOptions, z as globalPlugins, A as BASE_OPTION_REFINERS, F as CALENDAR_LISTENER_REFINERS, G as CALENDAR_OPTION_REFINERS, H as COMPLEX_OPTION_COMPARATORS, I as VIEW_OPTION_REFINERS, J as DateEnv, K as DateProfileGenerator, L as createEventUi, M as parseBusinessHours, N as BaseComponent, O as setRef, P as Interaction, Q as getElSeg, R as elementClosest, S as EventImpl, U as listenBySelector, W as listenToHoverBySelector, X as PureComponent, Y as buildViewContext, Z as getUniqueDomId, _ as parseInteractionSettings, $ as interactionSettingsStore, a0 as getNow, a1 as CalendarImpl, a2 as flushSync, a3 as CalendarRoot, a4 as RenderId, a5 as isArraysEqual, a6 as applyStyleProp, a7 as sliceEventStore } from './internal-common.js';
2
- export { a9 as JsonRequestError, a8 as createPlugin } from './internal-common.js';
1
+ import { i as injectStyles, m as mergeProps, g as guid, a as isArraysEqual, T as Theme, b as mapHash, V as ViewContextType, C as ContentContainer, c as buildViewClassNames, d as greatestDurationDenominator, e as createDuration, B as BASE_OPTION_DEFAULTS, f as arrayToHash, h as filterHash, j as buildEventSourceRefiners, p as parseEventSource, k as formatWithOrdinals, u as unpromisify, l as buildRangeApiWithTimeZone, n as identity, r as requestJson, s as subtractDurations, o as intersectRanges, q as startOfDay, t as addDays, v as hashValuesToArray, w as buildEventApis, D as DelayedRunner, x as createFormatter, y as diffWholeDays, z as memoize, A as memoizeObjArg, E as isPropsEqual, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as mergeRawOptions, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_OPTION_REFINERS, S as DateEnv, U as DateProfileGenerator, W as createEventUi, X as parseBusinessHours, Y as BaseComponent, Z as setRef, _ as Interaction, $ as getElSeg, a0 as elementClosest, a1 as EventImpl, a2 as listenBySelector, a3 as listenToHoverBySelector, a4 as PureComponent, a5 as buildViewContext, a6 as getUniqueDomId, a7 as parseInteractionSettings, a8 as interactionSettingsStore, a9 as getNow, aa as CalendarImpl, ab as flushSync, ac as CalendarRoot, ad as RenderId, ae as applyStyleProp, af as sliceEventStore } from './internal-common.js';
2
+ export { ag as JsonRequestError } from './internal-common.js';
3
3
  import { createElement, createRef, Fragment, render } from 'preact';
4
4
  import 'preact/compat';
5
5
 
6
6
  var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-unselectable{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;user-select:none}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,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\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button::-moz-focus-inner{border-style:none;padding:0}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}";
7
7
  injectStyles(css_248z);
8
8
 
9
+ const globalLocales = [];
10
+
9
11
  const MINIMAL_RAW_EN_LOCALE = {
10
12
  code: 'en',
11
13
  week: {
@@ -99,6 +101,165 @@ function parseLocale(codeArg, codes, raw) {
99
101
  };
100
102
  }
101
103
 
104
+ // TODO: easier way to add new hooks? need to update a million things
105
+ function createPlugin(input) {
106
+ return {
107
+ id: guid(),
108
+ name: input.name,
109
+ premiumReleaseDate: input.premiumReleaseDate ? new Date(input.premiumReleaseDate) : undefined,
110
+ deps: input.deps || [],
111
+ reducers: input.reducers || [],
112
+ isLoadingFuncs: input.isLoadingFuncs || [],
113
+ contextInit: [].concat(input.contextInit || []),
114
+ eventRefiners: input.eventRefiners || {},
115
+ eventDefMemberAdders: input.eventDefMemberAdders || [],
116
+ eventSourceRefiners: input.eventSourceRefiners || {},
117
+ isDraggableTransformers: input.isDraggableTransformers || [],
118
+ eventDragMutationMassagers: input.eventDragMutationMassagers || [],
119
+ eventDefMutationAppliers: input.eventDefMutationAppliers || [],
120
+ dateSelectionTransformers: input.dateSelectionTransformers || [],
121
+ datePointTransforms: input.datePointTransforms || [],
122
+ dateSpanTransforms: input.dateSpanTransforms || [],
123
+ views: input.views || {},
124
+ viewPropsTransformers: input.viewPropsTransformers || [],
125
+ isPropsValid: input.isPropsValid || null,
126
+ externalDefTransforms: input.externalDefTransforms || [],
127
+ viewContainerAppends: input.viewContainerAppends || [],
128
+ eventDropTransformers: input.eventDropTransformers || [],
129
+ componentInteractions: input.componentInteractions || [],
130
+ calendarInteractions: input.calendarInteractions || [],
131
+ themeClasses: input.themeClasses || {},
132
+ eventSourceDefs: input.eventSourceDefs || [],
133
+ cmdFormatter: input.cmdFormatter,
134
+ recurringTypes: input.recurringTypes || [],
135
+ namedTimeZonedImpl: input.namedTimeZonedImpl,
136
+ initialView: input.initialView || '',
137
+ elementDraggingImpl: input.elementDraggingImpl,
138
+ optionChangeHandlers: input.optionChangeHandlers || {},
139
+ scrollGridImpl: input.scrollGridImpl || null,
140
+ listenerRefiners: input.listenerRefiners || {},
141
+ optionRefiners: input.optionRefiners || {},
142
+ propSetHandlers: input.propSetHandlers || {},
143
+ };
144
+ }
145
+ function buildPluginHooks(pluginDefs, globalDefs) {
146
+ let currentPluginIds = {};
147
+ let hooks = {
148
+ premiumReleaseDate: undefined,
149
+ reducers: [],
150
+ isLoadingFuncs: [],
151
+ contextInit: [],
152
+ eventRefiners: {},
153
+ eventDefMemberAdders: [],
154
+ eventSourceRefiners: {},
155
+ isDraggableTransformers: [],
156
+ eventDragMutationMassagers: [],
157
+ eventDefMutationAppliers: [],
158
+ dateSelectionTransformers: [],
159
+ datePointTransforms: [],
160
+ dateSpanTransforms: [],
161
+ views: {},
162
+ viewPropsTransformers: [],
163
+ isPropsValid: null,
164
+ externalDefTransforms: [],
165
+ viewContainerAppends: [],
166
+ eventDropTransformers: [],
167
+ componentInteractions: [],
168
+ calendarInteractions: [],
169
+ themeClasses: {},
170
+ eventSourceDefs: [],
171
+ cmdFormatter: null,
172
+ recurringTypes: [],
173
+ namedTimeZonedImpl: null,
174
+ initialView: '',
175
+ elementDraggingImpl: null,
176
+ optionChangeHandlers: {},
177
+ scrollGridImpl: null,
178
+ listenerRefiners: {},
179
+ optionRefiners: {},
180
+ propSetHandlers: {},
181
+ };
182
+ function addDefs(defs) {
183
+ for (let def of defs) {
184
+ const pluginName = def.name;
185
+ const currentId = currentPluginIds[pluginName];
186
+ if (currentId === undefined) {
187
+ currentPluginIds[pluginName] = def.id;
188
+ addDefs(def.deps);
189
+ hooks = combineHooks(hooks, def);
190
+ }
191
+ else if (currentId !== def.id) {
192
+ // different ID than the one already added
193
+ console.warn(`Duplicate plugin '${pluginName}'`);
194
+ }
195
+ }
196
+ }
197
+ if (pluginDefs) {
198
+ addDefs(pluginDefs);
199
+ }
200
+ addDefs(globalDefs);
201
+ return hooks;
202
+ }
203
+ function buildBuildPluginHooks() {
204
+ let currentOverrideDefs = [];
205
+ let currentGlobalDefs = [];
206
+ let currentHooks;
207
+ return (overrideDefs, globalDefs) => {
208
+ if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {
209
+ currentHooks = buildPluginHooks(overrideDefs, globalDefs);
210
+ }
211
+ currentOverrideDefs = overrideDefs;
212
+ currentGlobalDefs = globalDefs;
213
+ return currentHooks;
214
+ };
215
+ }
216
+ function combineHooks(hooks0, hooks1) {
217
+ return {
218
+ premiumReleaseDate: compareOptionalDates(hooks0.premiumReleaseDate, hooks1.premiumReleaseDate),
219
+ reducers: hooks0.reducers.concat(hooks1.reducers),
220
+ isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs),
221
+ contextInit: hooks0.contextInit.concat(hooks1.contextInit),
222
+ eventRefiners: Object.assign(Object.assign({}, hooks0.eventRefiners), hooks1.eventRefiners),
223
+ eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),
224
+ eventSourceRefiners: Object.assign(Object.assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners),
225
+ isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),
226
+ eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),
227
+ eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),
228
+ dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),
229
+ datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),
230
+ dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),
231
+ views: Object.assign(Object.assign({}, hooks0.views), hooks1.views),
232
+ viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),
233
+ isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,
234
+ externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),
235
+ viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),
236
+ eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),
237
+ calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),
238
+ componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),
239
+ themeClasses: Object.assign(Object.assign({}, hooks0.themeClasses), hooks1.themeClasses),
240
+ eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),
241
+ cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,
242
+ recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),
243
+ namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,
244
+ initialView: hooks0.initialView || hooks1.initialView,
245
+ elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
246
+ optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
247
+ scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,
248
+ listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
249
+ optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
250
+ propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
251
+ };
252
+ }
253
+ function compareOptionalDates(date0, date1) {
254
+ if (date0 === undefined) {
255
+ return date1;
256
+ }
257
+ if (date1 === undefined) {
258
+ return date0;
259
+ }
260
+ return new Date(Math.max(date0.valueOf(), date1.valueOf()));
261
+ }
262
+
102
263
  class StandardTheme extends Theme {
103
264
  }
104
265
  StandardTheme.prototype.classes = {
@@ -328,6 +489,170 @@ function reduceDateProfile(currentDateProfile, action, currentDate, dateProfileG
328
489
  return currentDateProfile;
329
490
  }
330
491
 
492
+ function initEventSources(calendarOptions, dateProfile, context) {
493
+ let activeRange = dateProfile ? dateProfile.activeRange : null;
494
+ return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context);
495
+ }
496
+ function reduceEventSources(eventSources, action, dateProfile, context) {
497
+ let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
498
+ switch (action.type) {
499
+ case 'ADD_EVENT_SOURCES': // already parsed
500
+ return addSources(eventSources, action.sources, activeRange, context);
501
+ case 'REMOVE_EVENT_SOURCE':
502
+ return removeSource(eventSources, action.sourceId);
503
+ case 'PREV': // TODO: how do we track all actions that affect dateProfile :(
504
+ case 'NEXT':
505
+ case 'CHANGE_DATE':
506
+ case 'CHANGE_VIEW_TYPE':
507
+ if (dateProfile) {
508
+ return fetchDirtySources(eventSources, activeRange, context);
509
+ }
510
+ return eventSources;
511
+ case 'FETCH_EVENT_SOURCES':
512
+ return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?
513
+ arrayToHash(action.sourceIds) :
514
+ excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context);
515
+ case 'RECEIVE_EVENTS':
516
+ case 'RECEIVE_EVENT_ERROR':
517
+ return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);
518
+ case 'REMOVE_ALL_EVENT_SOURCES':
519
+ return {};
520
+ default:
521
+ return eventSources;
522
+ }
523
+ }
524
+ function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) {
525
+ let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
526
+ return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context);
527
+ }
528
+ function computeEventSourcesLoading(eventSources) {
529
+ for (let sourceId in eventSources) {
530
+ if (eventSources[sourceId].isFetching) {
531
+ return true;
532
+ }
533
+ }
534
+ return false;
535
+ }
536
+ function addSources(eventSourceHash, sources, fetchRange, context) {
537
+ let hash = {};
538
+ for (let source of sources) {
539
+ hash[source.sourceId] = source;
540
+ }
541
+ if (fetchRange) {
542
+ hash = fetchDirtySources(hash, fetchRange, context);
543
+ }
544
+ return Object.assign(Object.assign({}, eventSourceHash), hash);
545
+ }
546
+ function removeSource(eventSourceHash, sourceId) {
547
+ return filterHash(eventSourceHash, (eventSource) => eventSource.sourceId !== sourceId);
548
+ }
549
+ function fetchDirtySources(sourceHash, fetchRange, context) {
550
+ return fetchSourcesByIds(sourceHash, filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)), fetchRange, false, context);
551
+ }
552
+ function isSourceDirty(eventSource, fetchRange, context) {
553
+ if (!doesSourceNeedRange(eventSource, context)) {
554
+ return !eventSource.latestFetchId;
555
+ }
556
+ return !context.options.lazyFetching ||
557
+ !eventSource.fetchRange ||
558
+ eventSource.isFetching || // always cancel outdated in-progress fetches
559
+ fetchRange.start < eventSource.fetchRange.start ||
560
+ fetchRange.end > eventSource.fetchRange.end;
561
+ }
562
+ function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) {
563
+ let nextSources = {};
564
+ for (let sourceId in prevSources) {
565
+ let source = prevSources[sourceId];
566
+ if (sourceIdHash[sourceId]) {
567
+ nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context);
568
+ }
569
+ else {
570
+ nextSources[sourceId] = source;
571
+ }
572
+ }
573
+ return nextSources;
574
+ }
575
+ function fetchSource(eventSource, fetchRange, isRefetch, context) {
576
+ let { options, calendarApi } = context;
577
+ let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];
578
+ let fetchId = guid();
579
+ sourceDef.fetch({
580
+ eventSource,
581
+ range: fetchRange,
582
+ isRefetch,
583
+ context,
584
+ }, (res) => {
585
+ let { rawEvents } = res;
586
+ if (options.eventSourceSuccess) {
587
+ rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.response) || rawEvents;
588
+ }
589
+ if (eventSource.success) {
590
+ rawEvents = eventSource.success.call(calendarApi, rawEvents, res.response) || rawEvents;
591
+ }
592
+ context.dispatch({
593
+ type: 'RECEIVE_EVENTS',
594
+ sourceId: eventSource.sourceId,
595
+ fetchId,
596
+ fetchRange,
597
+ rawEvents,
598
+ });
599
+ }, (error) => {
600
+ let errorHandled = false;
601
+ if (options.eventSourceFailure) {
602
+ options.eventSourceFailure.call(calendarApi, error);
603
+ errorHandled = true;
604
+ }
605
+ if (eventSource.failure) {
606
+ eventSource.failure(error);
607
+ errorHandled = true;
608
+ }
609
+ if (!errorHandled) {
610
+ console.warn(error.message, error);
611
+ }
612
+ context.dispatch({
613
+ type: 'RECEIVE_EVENT_ERROR',
614
+ sourceId: eventSource.sourceId,
615
+ fetchId,
616
+ fetchRange,
617
+ error,
618
+ });
619
+ });
620
+ return Object.assign(Object.assign({}, eventSource), { isFetching: true, latestFetchId: fetchId });
621
+ }
622
+ function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {
623
+ let eventSource = sourceHash[sourceId];
624
+ if (eventSource && // not already removed
625
+ fetchId === eventSource.latestFetchId) {
626
+ return Object.assign(Object.assign({}, sourceHash), { [sourceId]: Object.assign(Object.assign({}, eventSource), { isFetching: false, fetchRange }) });
627
+ }
628
+ return sourceHash;
629
+ }
630
+ function excludeStaticSources(eventSources, context) {
631
+ return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context));
632
+ }
633
+ function parseInitialSources(rawOptions, context) {
634
+ let refiners = buildEventSourceRefiners(context);
635
+ let rawSources = [].concat(rawOptions.eventSources || []);
636
+ let sources = []; // parsed
637
+ if (rawOptions.initialEvents) {
638
+ rawSources.unshift(rawOptions.initialEvents);
639
+ }
640
+ if (rawOptions.events) {
641
+ rawSources.unshift(rawOptions.events);
642
+ }
643
+ for (let rawSource of rawSources) {
644
+ let source = parseEventSource(rawSource, context, refiners);
645
+ if (source) {
646
+ sources.push(source);
647
+ }
648
+ }
649
+ return sources;
650
+ }
651
+ function doesSourceNeedRange(eventSource, context) {
652
+ let defs = context.pluginHooks.eventSourceDefs;
653
+ return !defs[eventSource.sourceDefId].ignoreRange;
654
+ }
655
+
331
656
  function reduceDateSelection(currentSelection, action) {
332
657
  switch (action.type) {
333
658
  case 'UNSELECT_DATES':
@@ -513,6 +838,257 @@ class ViewImpl {
513
838
  }
514
839
  }
515
840
 
841
+ let eventSourceDef$2 = {
842
+ ignoreRange: true,
843
+ parseMeta(refined) {
844
+ if (Array.isArray(refined.events)) {
845
+ return refined.events;
846
+ }
847
+ return null;
848
+ },
849
+ fetch(arg, successCallback) {
850
+ successCallback({
851
+ rawEvents: arg.eventSource.meta,
852
+ });
853
+ },
854
+ };
855
+ const arrayEventSourcePlugin = createPlugin({
856
+ name: 'array-event-source',
857
+ eventSourceDefs: [eventSourceDef$2],
858
+ });
859
+
860
+ let eventSourceDef$1 = {
861
+ parseMeta(refined) {
862
+ if (typeof refined.events === 'function') {
863
+ return refined.events;
864
+ }
865
+ return null;
866
+ },
867
+ fetch(arg, successCallback, errorCallback) {
868
+ const { dateEnv } = arg.context;
869
+ const func = arg.eventSource.meta;
870
+ unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), (rawEvents) => successCallback({ rawEvents }), errorCallback);
871
+ },
872
+ };
873
+ const funcEventSourcePlugin = createPlugin({
874
+ name: 'func-event-source',
875
+ eventSourceDefs: [eventSourceDef$1],
876
+ });
877
+
878
+ const JSON_FEED_EVENT_SOURCE_REFINERS = {
879
+ method: String,
880
+ extraParams: identity,
881
+ startParam: String,
882
+ endParam: String,
883
+ timeZoneParam: String,
884
+ };
885
+
886
+ let eventSourceDef = {
887
+ parseMeta(refined) {
888
+ if (refined.url && (refined.format === 'json' || !refined.format)) {
889
+ return {
890
+ url: refined.url,
891
+ format: 'json',
892
+ method: (refined.method || 'GET').toUpperCase(),
893
+ extraParams: refined.extraParams,
894
+ startParam: refined.startParam,
895
+ endParam: refined.endParam,
896
+ timeZoneParam: refined.timeZoneParam,
897
+ };
898
+ }
899
+ return null;
900
+ },
901
+ fetch(arg, successCallback, errorCallback) {
902
+ const { meta } = arg.eventSource;
903
+ const requestParams = buildRequestParams(meta, arg.range, arg.context);
904
+ requestJson(meta.method, meta.url, requestParams).then(([rawEvents, response]) => {
905
+ successCallback({ rawEvents, response });
906
+ }, errorCallback);
907
+ },
908
+ };
909
+ const jsonFeedEventSourcePlugin = createPlugin({
910
+ name: 'json-event-source',
911
+ eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,
912
+ eventSourceDefs: [eventSourceDef],
913
+ });
914
+ function buildRequestParams(meta, range, context) {
915
+ let { dateEnv, options } = context;
916
+ let startParam;
917
+ let endParam;
918
+ let timeZoneParam;
919
+ let customRequestParams;
920
+ let params = {};
921
+ startParam = meta.startParam;
922
+ if (startParam == null) {
923
+ startParam = options.startParam;
924
+ }
925
+ endParam = meta.endParam;
926
+ if (endParam == null) {
927
+ endParam = options.endParam;
928
+ }
929
+ timeZoneParam = meta.timeZoneParam;
930
+ if (timeZoneParam == null) {
931
+ timeZoneParam = options.timeZoneParam;
932
+ }
933
+ // retrieve any outbound GET/POST data from the options
934
+ if (typeof meta.extraParams === 'function') {
935
+ // supplied as a function that returns a key/value object
936
+ customRequestParams = meta.extraParams();
937
+ }
938
+ else {
939
+ // probably supplied as a straight key/value object
940
+ customRequestParams = meta.extraParams || {};
941
+ }
942
+ Object.assign(params, customRequestParams);
943
+ params[startParam] = dateEnv.formatIso(range.start);
944
+ params[endParam] = dateEnv.formatIso(range.end);
945
+ if (dateEnv.timeZone !== 'local') {
946
+ params[timeZoneParam] = dateEnv.timeZone;
947
+ }
948
+ return params;
949
+ }
950
+
951
+ const SIMPLE_RECURRING_REFINERS = {
952
+ daysOfWeek: identity,
953
+ startTime: createDuration,
954
+ endTime: createDuration,
955
+ duration: createDuration,
956
+ startRecur: identity,
957
+ endRecur: identity,
958
+ };
959
+
960
+ let recurring = {
961
+ parse(refined, dateEnv) {
962
+ if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {
963
+ let recurringData = {
964
+ daysOfWeek: refined.daysOfWeek || null,
965
+ startTime: refined.startTime || null,
966
+ endTime: refined.endTime || null,
967
+ startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,
968
+ endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,
969
+ };
970
+ let duration;
971
+ if (refined.duration) {
972
+ duration = refined.duration;
973
+ }
974
+ if (!duration && refined.startTime && refined.endTime) {
975
+ duration = subtractDurations(refined.endTime, refined.startTime);
976
+ }
977
+ return {
978
+ allDayGuess: Boolean(!refined.startTime && !refined.endTime),
979
+ duration,
980
+ typeData: recurringData, // doesn't need endTime anymore but oh well
981
+ };
982
+ }
983
+ return null;
984
+ },
985
+ expand(typeData, framingRange, dateEnv) {
986
+ let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });
987
+ if (clippedFramingRange) {
988
+ return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);
989
+ }
990
+ return [];
991
+ },
992
+ };
993
+ const simpleRecurringEventsPlugin = createPlugin({
994
+ name: 'simple-recurring-event',
995
+ recurringTypes: [recurring],
996
+ eventRefiners: SIMPLE_RECURRING_REFINERS,
997
+ });
998
+ function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
999
+ let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;
1000
+ let dayMarker = startOfDay(framingRange.start);
1001
+ let endMarker = framingRange.end;
1002
+ let instanceStarts = [];
1003
+ while (dayMarker < endMarker) {
1004
+ let instanceStart;
1005
+ // if everyday, or this particular day-of-week
1006
+ if (!dowHash || dowHash[dayMarker.getUTCDay()]) {
1007
+ if (startTime) {
1008
+ instanceStart = dateEnv.add(dayMarker, startTime);
1009
+ }
1010
+ else {
1011
+ instanceStart = dayMarker;
1012
+ }
1013
+ instanceStarts.push(instanceStart);
1014
+ }
1015
+ dayMarker = addDays(dayMarker, 1);
1016
+ }
1017
+ return instanceStarts;
1018
+ }
1019
+
1020
+ const changeHandlerPlugin = createPlugin({
1021
+ name: 'change-handler',
1022
+ optionChangeHandlers: {
1023
+ events(events, context) {
1024
+ handleEventSources([events], context);
1025
+ },
1026
+ eventSources: handleEventSources,
1027
+ },
1028
+ });
1029
+ /*
1030
+ BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out
1031
+ */
1032
+ function handleEventSources(inputs, context) {
1033
+ let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);
1034
+ let newInputs = [];
1035
+ for (let input of inputs) {
1036
+ let inputFound = false;
1037
+ for (let i = 0; i < unfoundSources.length; i += 1) {
1038
+ if (unfoundSources[i]._raw === input) {
1039
+ unfoundSources.splice(i, 1); // delete
1040
+ inputFound = true;
1041
+ break;
1042
+ }
1043
+ }
1044
+ if (!inputFound) {
1045
+ newInputs.push(input);
1046
+ }
1047
+ }
1048
+ for (let unfoundSource of unfoundSources) {
1049
+ context.dispatch({
1050
+ type: 'REMOVE_EVENT_SOURCE',
1051
+ sourceId: unfoundSource.sourceId,
1052
+ });
1053
+ }
1054
+ for (let newInput of newInputs) {
1055
+ context.calendarApi.addEventSource(newInput);
1056
+ }
1057
+ }
1058
+
1059
+ function handleDateProfile(dateProfile, context) {
1060
+ context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
1061
+ }
1062
+
1063
+ function handleEventStore(eventStore, context) {
1064
+ let { emitter } = context;
1065
+ if (emitter.hasHandlers('eventsSet')) {
1066
+ emitter.trigger('eventsSet', buildEventApis(eventStore, context));
1067
+ }
1068
+ }
1069
+
1070
+ /*
1071
+ this array is exposed on the root namespace so that UMD plugins can add to it.
1072
+ see the rollup-bundles script.
1073
+ */
1074
+ const globalPlugins = [
1075
+ arrayEventSourcePlugin,
1076
+ funcEventSourcePlugin,
1077
+ jsonFeedEventSourcePlugin,
1078
+ simpleRecurringEventsPlugin,
1079
+ changeHandlerPlugin,
1080
+ createPlugin({
1081
+ name: 'misc',
1082
+ isLoadingFuncs: [
1083
+ (state) => computeEventSourcesLoading(state.eventSources),
1084
+ ],
1085
+ propSetHandlers: {
1086
+ dateProfile: handleDateProfile,
1087
+ eventStore: handleEventStore,
1088
+ },
1089
+ }),
1090
+ ];
1091
+
516
1092
  class TaskRunner {
517
1093
  constructor(runTaskOption, drainedOption) {
518
1094
  this.runTaskOption = runTaskOption;
@@ -1531,6 +2107,6 @@ function sliceEvents(props, allDay) {
1531
2107
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
1532
2108
  }
1533
2109
 
1534
- const version = '6.0.0';
2110
+ const version = '6.0.2';
1535
2111
 
1536
- export { Calendar, formatDate, formatRange, sliceEvents, version };
2112
+ export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };