@fullcalendar/core 7.0.0-beta.3 → 7.0.0-beta.5

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 (599) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +7 -1
  3. package/{index.cjs → cjs/index.cjs} +508 -373
  4. package/cjs/internal-classnames.cjs +11 -0
  5. package/{internal-common.cjs → cjs/internal-common.cjs} +5011 -4779
  6. package/{internal.cjs → cjs/internal.cjs} +26 -20
  7. package/{locales → cjs/locales}/af.cjs +8 -10
  8. package/{locales → cjs/locales}/ar-dz.cjs +7 -10
  9. package/{locales → cjs/locales}/ar-kw.cjs +7 -10
  10. package/{locales → cjs/locales}/ar-ly.cjs +7 -10
  11. package/{locales → cjs/locales}/ar-ma.cjs +7 -10
  12. package/{locales → cjs/locales}/ar-sa.cjs +7 -10
  13. package/{locales → cjs/locales}/ar-tn.cjs +7 -10
  14. package/{locales → cjs/locales}/ar.cjs +7 -10
  15. package/{locales → cjs/locales}/az.cjs +8 -11
  16. package/{locales → cjs/locales}/bg.cjs +8 -10
  17. package/{locales → cjs/locales}/bn.cjs +7 -10
  18. package/{locales → cjs/locales}/bs.cjs +10 -12
  19. package/{locales → cjs/locales}/ca.cjs +10 -12
  20. package/{locales → cjs/locales}/cs.cjs +9 -11
  21. package/{locales → cjs/locales}/cy.cjs +8 -11
  22. package/{locales → cjs/locales}/da.cjs +8 -11
  23. package/cjs/locales/de-at.cjs +57 -0
  24. package/cjs/locales/de.cjs +57 -0
  25. package/{locales → cjs/locales}/el.cjs +9 -11
  26. package/{locales → cjs/locales}/en-au.cjs +4 -5
  27. package/{locales → cjs/locales}/en-gb.cjs +4 -5
  28. package/{locales → cjs/locales}/en-nz.cjs +4 -5
  29. package/{locales → cjs/locales}/eo.cjs +10 -12
  30. package/cjs/locales/es-us.cjs +34 -0
  31. package/cjs/locales/es.cjs +40 -0
  32. package/{locales → cjs/locales}/et.cjs +10 -12
  33. package/{locales → cjs/locales}/eu.cjs +10 -12
  34. package/{locales → cjs/locales}/fa.cjs +9 -11
  35. package/{locales → cjs/locales}/fi.cjs +10 -12
  36. package/cjs/locales/fr-ca.cjs +21 -0
  37. package/{locales → cjs/locales}/fr-ch.cjs +10 -12
  38. package/{locales → cjs/locales}/fr.cjs +10 -13
  39. package/cjs/locales/gl.cjs +40 -0
  40. package/{locales → cjs/locales}/he.cjs +8 -11
  41. package/{locales → cjs/locales}/hi.cjs +9 -11
  42. package/{locales → cjs/locales}/hr.cjs +10 -12
  43. package/{locales → cjs/locales}/hu.cjs +8 -11
  44. package/{locales → cjs/locales}/hy-am.cjs +9 -11
  45. package/{locales → cjs/locales}/id.cjs +10 -12
  46. package/{locales → cjs/locales}/is.cjs +8 -11
  47. package/{locales → cjs/locales}/it.cjs +10 -12
  48. package/{locales → cjs/locales}/ja.cjs +7 -10
  49. package/cjs/locales/ka.cjs +27 -0
  50. package/{locales → cjs/locales}/kk.cjs +9 -12
  51. package/{locales → cjs/locales}/km.cjs +7 -10
  52. package/{locales → cjs/locales}/ko.cjs +7 -10
  53. package/{locales → cjs/locales}/ku.cjs +7 -10
  54. package/{locales → cjs/locales}/lb.cjs +10 -12
  55. package/{locales → cjs/locales}/lt.cjs +10 -12
  56. package/{locales → cjs/locales}/lv.cjs +10 -12
  57. package/{locales → cjs/locales}/mk.cjs +9 -11
  58. package/{locales → cjs/locales}/ms.cjs +10 -12
  59. package/{locales → cjs/locales}/nb.cjs +11 -17
  60. package/{locales → cjs/locales}/ne.cjs +7 -10
  61. package/{locales → cjs/locales}/nl.cjs +8 -10
  62. package/{locales → cjs/locales}/nn.cjs +8 -11
  63. package/{locales → cjs/locales}/pl.cjs +10 -12
  64. package/cjs/locales/pt-br.cjs +40 -0
  65. package/{locales → cjs/locales}/pt.cjs +10 -12
  66. package/{locales → cjs/locales}/ro.cjs +10 -12
  67. package/{locales → cjs/locales}/ru.cjs +10 -12
  68. package/{locales → cjs/locales}/si-lk.cjs +9 -11
  69. package/{locales → cjs/locales}/sk.cjs +9 -11
  70. package/{locales → cjs/locales}/sl.cjs +7 -10
  71. package/{locales → cjs/locales}/sm.cjs +7 -10
  72. package/{locales → cjs/locales}/sq.cjs +10 -12
  73. package/{locales → cjs/locales}/sr-cyrl.cjs +9 -11
  74. package/{locales → cjs/locales}/sr.cjs +9 -11
  75. package/cjs/locales/sv.cjs +41 -0
  76. package/{locales → cjs/locales}/ta-in.cjs +8 -11
  77. package/{locales → cjs/locales}/th.cjs +9 -12
  78. package/{locales → cjs/locales}/tr.cjs +9 -11
  79. package/cjs/locales/ug.cjs +18 -0
  80. package/{locales → cjs/locales}/uk.cjs +10 -12
  81. package/{locales → cjs/locales}/uz-cy.cjs +7 -10
  82. package/{locales → cjs/locales}/uz.cjs +8 -10
  83. package/{locales → cjs/locales}/vi.cjs +9 -11
  84. package/{locales → cjs/locales}/zh-cn.cjs +7 -10
  85. package/{locales → cjs/locales}/zh-tw.cjs +7 -10
  86. package/{preact.cjs → cjs/preact.cjs} +1 -0
  87. package/esm/index.d.ts +53 -0
  88. package/{index.js → esm/index.js} +510 -377
  89. package/esm/internal-classnames.d.ts +1 -0
  90. package/esm/internal-classnames.js +3 -0
  91. package/{internal-common.d.ts → esm/internal-common.d.ts} +773 -708
  92. package/{internal-common.js → esm/internal-common.js} +4982 -4755
  93. package/esm/internal.d.ts +5 -0
  94. package/esm/internal.js +3 -0
  95. package/{locales → esm/locales}/af.js +8 -10
  96. package/{locales → esm/locales}/ar-dz.js +7 -10
  97. package/{locales → esm/locales}/ar-kw.js +7 -10
  98. package/{locales → esm/locales}/ar-ly.js +7 -10
  99. package/{locales → esm/locales}/ar-ma.js +7 -10
  100. package/{locales → esm/locales}/ar-sa.js +7 -10
  101. package/{locales → esm/locales}/ar-tn.js +7 -10
  102. package/{locales → esm/locales}/ar.js +7 -10
  103. package/{locales → esm/locales}/az.js +8 -11
  104. package/{locales → esm/locales}/bg.js +8 -10
  105. package/{locales → esm/locales}/bn.js +7 -10
  106. package/{locales → esm/locales}/bs.js +10 -12
  107. package/esm/locales/ca.js +21 -0
  108. package/{locales → esm/locales}/cs.js +9 -11
  109. package/{locales → esm/locales}/cy.js +8 -11
  110. package/{locales → esm/locales}/da.js +8 -11
  111. package/esm/locales/de-at.js +53 -0
  112. package/esm/locales/de.js +53 -0
  113. package/{locales → esm/locales}/el.js +9 -11
  114. package/{locales → esm/locales}/en-au.js +4 -5
  115. package/{locales → esm/locales}/en-gb.js +4 -5
  116. package/{locales → esm/locales}/en-nz.js +4 -5
  117. package/esm/locales/eo.js +21 -0
  118. package/esm/locales/es-us.js +30 -0
  119. package/esm/locales/es.js +36 -0
  120. package/{locales → esm/locales}/et.js +10 -12
  121. package/esm/locales/eu.js +21 -0
  122. package/{locales → esm/locales}/fa.js +9 -11
  123. package/esm/locales/fi.js +21 -0
  124. package/esm/locales/fr-ca.js +17 -0
  125. package/esm/locales/fr-ch.js +21 -0
  126. package/esm/locales/fr.js +21 -0
  127. package/esm/locales/gl.js +36 -0
  128. package/esm/locales/he.js +17 -0
  129. package/{locales → esm/locales}/hi.js +9 -11
  130. package/{locales → esm/locales}/hr.js +10 -12
  131. package/{locales → esm/locales}/hu.js +8 -11
  132. package/{locales → esm/locales}/hy-am.js +9 -11
  133. package/esm/locales/id.js +21 -0
  134. package/{locales → esm/locales}/is.js +8 -11
  135. package/{locales → esm/locales}/it.js +10 -12
  136. package/{locales → esm/locales}/ja.js +7 -10
  137. package/esm/locales/ka.js +23 -0
  138. package/esm/locales/kk.js +22 -0
  139. package/{locales → esm/locales}/km.js +7 -10
  140. package/esm/locales/ko.js +16 -0
  141. package/{locales → esm/locales}/ku.js +7 -10
  142. package/esm/locales/lb.js +21 -0
  143. package/esm/locales/lt.js +21 -0
  144. package/esm/locales/lv.js +23 -0
  145. package/esm/locales/mk.js +19 -0
  146. package/{locales → esm/locales}/ms.js +10 -12
  147. package/{locales → esm/locales}/nb.js +11 -17
  148. package/{locales → esm/locales}/ne.js +7 -10
  149. package/{locales → esm/locales}/nl.js +8 -10
  150. package/{locales → esm/locales}/nn.js +8 -11
  151. package/esm/locales/pl.js +21 -0
  152. package/esm/locales/pt-br.js +36 -0
  153. package/esm/locales/pt.js +21 -0
  154. package/{locales → esm/locales}/ro.js +10 -12
  155. package/esm/locales/ru.js +23 -0
  156. package/esm/locales/si-lk.js +21 -0
  157. package/{locales → esm/locales}/sk.js +9 -11
  158. package/{locales → esm/locales}/sl.js +7 -10
  159. package/esm/locales/sm.js +16 -0
  160. package/{locales → esm/locales}/sq.js +10 -12
  161. package/{locales → esm/locales}/sr-cyrl.js +9 -11
  162. package/{locales → esm/locales}/sr.js +9 -11
  163. package/esm/locales/sv.js +37 -0
  164. package/esm/locales/ta-in.js +22 -0
  165. package/esm/locales/th.js +22 -0
  166. package/{locales → esm/locales}/tr.js +9 -11
  167. package/esm/locales/ug.js +14 -0
  168. package/esm/locales/uk.js +23 -0
  169. package/{locales → esm/locales}/uz-cy.js +7 -10
  170. package/{locales → esm/locales}/uz.js +8 -10
  171. package/{locales → esm/locales}/vi.js +9 -11
  172. package/{locales → esm/locales}/zh-cn.js +7 -10
  173. package/esm/locales/zh-tw.js +16 -0
  174. package/{preact.d.ts → esm/preact.d.ts} +4 -3
  175. package/esm/preact.js +3 -0
  176. package/{locales/af.global.js → global/locales/af.js} +12 -14
  177. package/global/locales/af.min.js +6 -0
  178. package/{locales/ar-dz.global.js → global/locales/ar-dz.js} +11 -14
  179. package/global/locales/ar-dz.min.js +6 -0
  180. package/{locales/ar-kw.global.js → global/locales/ar-kw.js} +11 -14
  181. package/global/locales/ar-kw.min.js +6 -0
  182. package/{locales/ar-ly.global.js → global/locales/ar-ly.js} +11 -14
  183. package/global/locales/ar-ly.min.js +6 -0
  184. package/{locales/ar-ma.global.js → global/locales/ar-ma.js} +11 -14
  185. package/global/locales/ar-ma.min.js +6 -0
  186. package/{locales/ar-sa.global.js → global/locales/ar-sa.js} +11 -14
  187. package/global/locales/ar-sa.min.js +6 -0
  188. package/{locales/ar-tn.global.js → global/locales/ar-tn.js} +11 -14
  189. package/global/locales/ar-tn.min.js +6 -0
  190. package/{locales/ar.global.js → global/locales/ar.js} +11 -14
  191. package/global/locales/ar.min.js +6 -0
  192. package/{locales/az.global.js → global/locales/az.js} +12 -15
  193. package/global/locales/az.min.js +6 -0
  194. package/{locales/bg.global.js → global/locales/bg.js} +12 -14
  195. package/global/locales/bg.min.js +6 -0
  196. package/{locales/bn.global.js → global/locales/bn.js} +11 -14
  197. package/global/locales/bn.min.js +6 -0
  198. package/global/locales/bs.js +33 -0
  199. package/global/locales/bs.min.js +6 -0
  200. package/global/locales/ca.js +31 -0
  201. package/global/locales/ca.min.js +6 -0
  202. package/{locales/cs.global.js → global/locales/cs.js} +13 -15
  203. package/global/locales/cs.min.js +6 -0
  204. package/global/locales/cy.js +30 -0
  205. package/global/locales/cy.min.js +6 -0
  206. package/global/locales/da.js +30 -0
  207. package/global/locales/da.min.js +6 -0
  208. package/global/locales/de-at.js +63 -0
  209. package/global/locales/de-at.min.js +6 -0
  210. package/global/locales/de.js +63 -0
  211. package/global/locales/de.min.js +6 -0
  212. package/global/locales/el.js +31 -0
  213. package/global/locales/el.min.js +6 -0
  214. package/{locales/en-au.global.js → global/locales/en-au.js} +8 -9
  215. package/global/locales/en-au.min.js +6 -0
  216. package/{locales/en-gb.global.js → global/locales/en-gb.js} +8 -9
  217. package/global/locales/en-gb.min.js +6 -0
  218. package/{locales/en-nz.global.js → global/locales/en-nz.js} +8 -9
  219. package/global/locales/en-nz.min.js +6 -0
  220. package/global/locales/eo.js +31 -0
  221. package/global/locales/eo.min.js +6 -0
  222. package/global/locales/es-us.js +40 -0
  223. package/global/locales/es-us.min.js +6 -0
  224. package/global/locales/es.js +46 -0
  225. package/global/locales/es.min.js +6 -0
  226. package/global/locales/et.js +33 -0
  227. package/global/locales/et.min.js +6 -0
  228. package/global/locales/eu.js +31 -0
  229. package/global/locales/eu.min.js +6 -0
  230. package/{locales/fa.global.js → global/locales/fa.js} +13 -15
  231. package/global/locales/fa.min.js +6 -0
  232. package/global/locales/fi.js +31 -0
  233. package/global/locales/fi.min.js +6 -0
  234. package/global/locales/fr-ca.js +27 -0
  235. package/global/locales/fr-ca.min.js +6 -0
  236. package/global/locales/fr-ch.js +31 -0
  237. package/global/locales/fr-ch.min.js +6 -0
  238. package/global/locales/fr.js +31 -0
  239. package/global/locales/fr.min.js +6 -0
  240. package/global/locales/gl.js +46 -0
  241. package/global/locales/gl.min.js +6 -0
  242. package/global/locales/he.js +27 -0
  243. package/global/locales/he.min.js +6 -0
  244. package/{locales/hi.global.js → global/locales/hi.js} +13 -15
  245. package/global/locales/hi.min.js +6 -0
  246. package/global/locales/hr.js +33 -0
  247. package/global/locales/hr.min.js +6 -0
  248. package/global/locales/hu.js +30 -0
  249. package/global/locales/hu.min.js +6 -0
  250. package/{locales/hy-am.global.js → global/locales/hy-am.js} +13 -15
  251. package/global/locales/hy-am.min.js +6 -0
  252. package/global/locales/id.js +31 -0
  253. package/global/locales/id.min.js +6 -0
  254. package/global/locales/is.js +30 -0
  255. package/global/locales/is.min.js +6 -0
  256. package/global/locales/it.js +33 -0
  257. package/global/locales/it.min.js +6 -0
  258. package/global/locales/ja.js +28 -0
  259. package/global/locales/ja.min.js +6 -0
  260. package/global/locales/ka.js +33 -0
  261. package/global/locales/ka.min.js +6 -0
  262. package/global/locales/kk.js +32 -0
  263. package/global/locales/kk.min.js +6 -0
  264. package/{locales/km.global.js → global/locales/km.js} +11 -14
  265. package/global/locales/km.min.js +6 -0
  266. package/global/locales/ko.js +26 -0
  267. package/global/locales/ko.min.js +6 -0
  268. package/{locales/ku.global.js → global/locales/ku.js} +11 -14
  269. package/global/locales/ku.min.js +6 -0
  270. package/global/locales/lb.js +31 -0
  271. package/global/locales/lb.min.js +6 -0
  272. package/global/locales/lt.js +31 -0
  273. package/global/locales/lt.min.js +6 -0
  274. package/global/locales/lv.js +33 -0
  275. package/global/locales/lv.min.js +6 -0
  276. package/global/locales/mk.js +29 -0
  277. package/global/locales/mk.min.js +6 -0
  278. package/global/locales/ms.js +33 -0
  279. package/global/locales/ms.min.js +6 -0
  280. package/{locales/nb.global.js → global/locales/nb.js} +15 -21
  281. package/global/locales/nb.min.js +6 -0
  282. package/{locales/ne.global.js → global/locales/ne.js} +11 -14
  283. package/global/locales/ne.min.js +6 -0
  284. package/{locales/nl.global.js → global/locales/nl.js} +12 -14
  285. package/global/locales/nl.min.js +6 -0
  286. package/global/locales/nn.js +30 -0
  287. package/global/locales/nn.min.js +6 -0
  288. package/global/locales/pl.js +31 -0
  289. package/global/locales/pl.min.js +6 -0
  290. package/global/locales/pt-br.js +46 -0
  291. package/global/locales/pt-br.min.js +6 -0
  292. package/global/locales/pt.js +31 -0
  293. package/global/locales/pt.min.js +6 -0
  294. package/global/locales/ro.js +33 -0
  295. package/global/locales/ro.min.js +6 -0
  296. package/global/locales/ru.js +33 -0
  297. package/global/locales/ru.min.js +6 -0
  298. package/global/locales/si-lk.js +31 -0
  299. package/global/locales/si-lk.min.js +6 -0
  300. package/{locales/sk.global.js → global/locales/sk.js} +13 -15
  301. package/global/locales/sk.min.js +6 -0
  302. package/{locales/sl.global.js → global/locales/sl.js} +11 -14
  303. package/global/locales/sl.min.js +6 -0
  304. package/global/locales/sm.js +26 -0
  305. package/global/locales/sm.min.js +6 -0
  306. package/global/locales/sq.js +33 -0
  307. package/global/locales/sq.min.js +6 -0
  308. package/{locales/sr-cyrl.global.js → global/locales/sr-cyrl.js} +13 -15
  309. package/global/locales/sr-cyrl.min.js +6 -0
  310. package/{locales/sr.global.js → global/locales/sr.js} +13 -15
  311. package/global/locales/sr.min.js +6 -0
  312. package/global/locales/sv.js +47 -0
  313. package/global/locales/sv.min.js +6 -0
  314. package/global/locales/ta-in.js +32 -0
  315. package/global/locales/ta-in.min.js +6 -0
  316. package/global/locales/th.js +32 -0
  317. package/global/locales/th.min.js +6 -0
  318. package/{locales/tr.global.js → global/locales/tr.js} +13 -15
  319. package/global/locales/tr.min.js +6 -0
  320. package/global/locales/ug.js +24 -0
  321. package/global/locales/ug.min.js +6 -0
  322. package/global/locales/uk.js +33 -0
  323. package/global/locales/uk.min.js +6 -0
  324. package/{locales/uz-cy.global.js → global/locales/uz-cy.js} +11 -14
  325. package/global/locales/uz-cy.min.js +6 -0
  326. package/{locales/uz.global.js → global/locales/uz.js} +12 -14
  327. package/global/locales/uz.min.js +6 -0
  328. package/{locales/vi.global.js → global/locales/vi.js} +13 -15
  329. package/global/locales/vi.min.js +6 -0
  330. package/{locales/zh-cn.global.js → global/locales/zh-cn.js} +11 -14
  331. package/global/locales/zh-cn.min.js +6 -0
  332. package/global/locales/zh-tw.js +26 -0
  333. package/global/locales/zh-tw.min.js +6 -0
  334. package/global/locales-all.js +1730 -0
  335. package/global/locales-all.min.js +6 -0
  336. package/{index.global.js → global.js} +5295 -4925
  337. package/global.min.js +6 -0
  338. package/package.json +53 -35
  339. package/skeleton.css +477 -0
  340. package/skeleton.min.css +1 -0
  341. package/skeleton.styles.js +30 -0
  342. package/index.d.ts +0 -48
  343. package/index.global.min.js +0 -6
  344. package/internal.d.ts +0 -4
  345. package/internal.js +0 -3
  346. package/locales/af.global.min.js +0 -6
  347. package/locales/ar-dz.global.min.js +0 -6
  348. package/locales/ar-kw.global.min.js +0 -6
  349. package/locales/ar-ly.global.min.js +0 -6
  350. package/locales/ar-ma.global.min.js +0 -6
  351. package/locales/ar-sa.global.min.js +0 -6
  352. package/locales/ar-tn.global.min.js +0 -6
  353. package/locales/ar.global.min.js +0 -6
  354. package/locales/az.global.min.js +0 -6
  355. package/locales/bg.global.min.js +0 -6
  356. package/locales/bn.global.min.js +0 -6
  357. package/locales/bs.global.js +0 -35
  358. package/locales/bs.global.min.js +0 -6
  359. package/locales/ca.global.js +0 -33
  360. package/locales/ca.global.min.js +0 -6
  361. package/locales/ca.js +0 -23
  362. package/locales/cs.global.min.js +0 -6
  363. package/locales/cy.global.js +0 -33
  364. package/locales/cy.global.min.js +0 -6
  365. package/locales/da.global.js +0 -33
  366. package/locales/da.global.min.js +0 -6
  367. package/locales/de-at.cjs +0 -63
  368. package/locales/de-at.global.js +0 -69
  369. package/locales/de-at.global.min.js +0 -6
  370. package/locales/de-at.js +0 -59
  371. package/locales/de.cjs +0 -63
  372. package/locales/de.global.js +0 -69
  373. package/locales/de.global.min.js +0 -6
  374. package/locales/de.js +0 -59
  375. package/locales/el.global.js +0 -33
  376. package/locales/el.global.min.js +0 -6
  377. package/locales/en-au.global.min.js +0 -6
  378. package/locales/en-gb.global.min.js +0 -6
  379. package/locales/en-nz.global.min.js +0 -6
  380. package/locales/eo.global.js +0 -33
  381. package/locales/eo.global.min.js +0 -6
  382. package/locales/eo.js +0 -23
  383. package/locales/es-us.cjs +0 -27
  384. package/locales/es-us.global.js +0 -33
  385. package/locales/es-us.global.min.js +0 -6
  386. package/locales/es-us.js +0 -23
  387. package/locales/es.cjs +0 -46
  388. package/locales/es.global.js +0 -52
  389. package/locales/es.global.min.js +0 -6
  390. package/locales/es.js +0 -42
  391. package/locales/et.global.js +0 -35
  392. package/locales/et.global.min.js +0 -6
  393. package/locales/eu.global.js +0 -33
  394. package/locales/eu.global.min.js +0 -6
  395. package/locales/eu.js +0 -23
  396. package/locales/fa.global.min.js +0 -6
  397. package/locales/fi.global.js +0 -33
  398. package/locales/fi.global.min.js +0 -6
  399. package/locales/fi.js +0 -23
  400. package/locales/fr-ca.cjs +0 -23
  401. package/locales/fr-ca.global.js +0 -29
  402. package/locales/fr-ca.global.min.js +0 -6
  403. package/locales/fr-ca.js +0 -19
  404. package/locales/fr-ch.global.js +0 -33
  405. package/locales/fr-ch.global.min.js +0 -6
  406. package/locales/fr-ch.js +0 -23
  407. package/locales/fr.global.js +0 -34
  408. package/locales/fr.global.min.js +0 -6
  409. package/locales/fr.js +0 -24
  410. package/locales/gl.cjs +0 -46
  411. package/locales/gl.global.js +0 -52
  412. package/locales/gl.global.min.js +0 -6
  413. package/locales/gl.js +0 -42
  414. package/locales/he.global.js +0 -30
  415. package/locales/he.global.min.js +0 -6
  416. package/locales/he.js +0 -20
  417. package/locales/hi.global.min.js +0 -6
  418. package/locales/hr.global.js +0 -35
  419. package/locales/hr.global.min.js +0 -6
  420. package/locales/hu.global.js +0 -33
  421. package/locales/hu.global.min.js +0 -6
  422. package/locales/hy-am.global.min.js +0 -6
  423. package/locales/id.global.js +0 -33
  424. package/locales/id.global.min.js +0 -6
  425. package/locales/id.js +0 -23
  426. package/locales/is.global.js +0 -33
  427. package/locales/is.global.min.js +0 -6
  428. package/locales/it.global.js +0 -35
  429. package/locales/it.global.min.js +0 -6
  430. package/locales/ja.global.js +0 -31
  431. package/locales/ja.global.min.js +0 -6
  432. package/locales/ka.cjs +0 -29
  433. package/locales/ka.global.js +0 -35
  434. package/locales/ka.global.min.js +0 -6
  435. package/locales/ka.js +0 -25
  436. package/locales/kk.global.js +0 -35
  437. package/locales/kk.global.min.js +0 -6
  438. package/locales/kk.js +0 -25
  439. package/locales/km.global.min.js +0 -6
  440. package/locales/ko.global.js +0 -29
  441. package/locales/ko.global.min.js +0 -6
  442. package/locales/ko.js +0 -19
  443. package/locales/ku.global.min.js +0 -6
  444. package/locales/lb.global.js +0 -33
  445. package/locales/lb.global.min.js +0 -6
  446. package/locales/lb.js +0 -23
  447. package/locales/lt.global.js +0 -33
  448. package/locales/lt.global.min.js +0 -6
  449. package/locales/lt.js +0 -23
  450. package/locales/lv.global.js +0 -35
  451. package/locales/lv.global.min.js +0 -6
  452. package/locales/lv.js +0 -25
  453. package/locales/mk.global.js +0 -31
  454. package/locales/mk.global.min.js +0 -6
  455. package/locales/mk.js +0 -21
  456. package/locales/ms.global.js +0 -35
  457. package/locales/ms.global.min.js +0 -6
  458. package/locales/nb.global.min.js +0 -6
  459. package/locales/ne.global.min.js +0 -6
  460. package/locales/nl.global.min.js +0 -6
  461. package/locales/nn.global.js +0 -33
  462. package/locales/nn.global.min.js +0 -6
  463. package/locales/pl.global.js +0 -33
  464. package/locales/pl.global.min.js +0 -6
  465. package/locales/pl.js +0 -23
  466. package/locales/pt-br.cjs +0 -46
  467. package/locales/pt-br.global.js +0 -52
  468. package/locales/pt-br.global.min.js +0 -6
  469. package/locales/pt-br.js +0 -42
  470. package/locales/pt.global.js +0 -33
  471. package/locales/pt.global.min.js +0 -6
  472. package/locales/pt.js +0 -23
  473. package/locales/ro.global.js +0 -35
  474. package/locales/ro.global.min.js +0 -6
  475. package/locales/ru.global.js +0 -35
  476. package/locales/ru.global.min.js +0 -6
  477. package/locales/ru.js +0 -25
  478. package/locales/si-lk.global.js +0 -33
  479. package/locales/si-lk.global.min.js +0 -6
  480. package/locales/si-lk.js +0 -23
  481. package/locales/sk.global.min.js +0 -6
  482. package/locales/sl.global.min.js +0 -6
  483. package/locales/sm.global.js +0 -29
  484. package/locales/sm.global.min.js +0 -6
  485. package/locales/sm.js +0 -19
  486. package/locales/sq.global.js +0 -35
  487. package/locales/sq.global.min.js +0 -6
  488. package/locales/sr-cyrl.global.min.js +0 -6
  489. package/locales/sr.global.min.js +0 -6
  490. package/locales/sv.cjs +0 -47
  491. package/locales/sv.global.js +0 -53
  492. package/locales/sv.global.min.js +0 -6
  493. package/locales/sv.js +0 -43
  494. package/locales/ta-in.global.js +0 -35
  495. package/locales/ta-in.global.min.js +0 -6
  496. package/locales/ta-in.js +0 -25
  497. package/locales/th.global.js +0 -35
  498. package/locales/th.global.min.js +0 -6
  499. package/locales/th.js +0 -25
  500. package/locales/tr.global.min.js +0 -6
  501. package/locales/ug.cjs +0 -20
  502. package/locales/ug.global.js +0 -26
  503. package/locales/ug.global.min.js +0 -6
  504. package/locales/ug.js +0 -16
  505. package/locales/uk.global.js +0 -35
  506. package/locales/uk.global.min.js +0 -6
  507. package/locales/uk.js +0 -25
  508. package/locales/uz-cy.global.min.js +0 -6
  509. package/locales/uz.global.min.js +0 -6
  510. package/locales/vi.global.min.js +0 -6
  511. package/locales/zh-cn.global.min.js +0 -6
  512. package/locales/zh-tw.global.js +0 -29
  513. package/locales/zh-tw.global.min.js +0 -6
  514. package/locales/zh-tw.js +0 -19
  515. package/locales-all.global.js +0 -1933
  516. package/locales-all.global.min.js +0 -6
  517. package/preact.js +0 -3
  518. /package/{locales-all.cjs → cjs/locales-all.cjs} +0 -0
  519. /package/{locales → esm/locales}/af.d.ts +0 -0
  520. /package/{locales → esm/locales}/ar-dz.d.ts +0 -0
  521. /package/{locales → esm/locales}/ar-kw.d.ts +0 -0
  522. /package/{locales → esm/locales}/ar-ly.d.ts +0 -0
  523. /package/{locales → esm/locales}/ar-ma.d.ts +0 -0
  524. /package/{locales → esm/locales}/ar-sa.d.ts +0 -0
  525. /package/{locales → esm/locales}/ar-tn.d.ts +0 -0
  526. /package/{locales → esm/locales}/ar.d.ts +0 -0
  527. /package/{locales → esm/locales}/az.d.ts +0 -0
  528. /package/{locales → esm/locales}/bg.d.ts +0 -0
  529. /package/{locales → esm/locales}/bn.d.ts +0 -0
  530. /package/{locales → esm/locales}/bs.d.ts +0 -0
  531. /package/{locales → esm/locales}/ca.d.ts +0 -0
  532. /package/{locales → esm/locales}/cs.d.ts +0 -0
  533. /package/{locales → esm/locales}/cy.d.ts +0 -0
  534. /package/{locales → esm/locales}/da.d.ts +0 -0
  535. /package/{locales → esm/locales}/de-at.d.ts +0 -0
  536. /package/{locales → esm/locales}/de.d.ts +0 -0
  537. /package/{locales → esm/locales}/el.d.ts +0 -0
  538. /package/{locales → esm/locales}/en-au.d.ts +0 -0
  539. /package/{locales → esm/locales}/en-gb.d.ts +0 -0
  540. /package/{locales → esm/locales}/en-nz.d.ts +0 -0
  541. /package/{locales → esm/locales}/eo.d.ts +0 -0
  542. /package/{locales → esm/locales}/es-us.d.ts +0 -0
  543. /package/{locales → esm/locales}/es.d.ts +0 -0
  544. /package/{locales → esm/locales}/et.d.ts +0 -0
  545. /package/{locales → esm/locales}/eu.d.ts +0 -0
  546. /package/{locales → esm/locales}/fa.d.ts +0 -0
  547. /package/{locales → esm/locales}/fi.d.ts +0 -0
  548. /package/{locales → esm/locales}/fr-ca.d.ts +0 -0
  549. /package/{locales → esm/locales}/fr-ch.d.ts +0 -0
  550. /package/{locales → esm/locales}/fr.d.ts +0 -0
  551. /package/{locales → esm/locales}/gl.d.ts +0 -0
  552. /package/{locales → esm/locales}/he.d.ts +0 -0
  553. /package/{locales → esm/locales}/hi.d.ts +0 -0
  554. /package/{locales → esm/locales}/hr.d.ts +0 -0
  555. /package/{locales → esm/locales}/hu.d.ts +0 -0
  556. /package/{locales → esm/locales}/hy-am.d.ts +0 -0
  557. /package/{locales → esm/locales}/id.d.ts +0 -0
  558. /package/{locales → esm/locales}/is.d.ts +0 -0
  559. /package/{locales → esm/locales}/it.d.ts +0 -0
  560. /package/{locales → esm/locales}/ja.d.ts +0 -0
  561. /package/{locales → esm/locales}/ka.d.ts +0 -0
  562. /package/{locales → esm/locales}/kk.d.ts +0 -0
  563. /package/{locales → esm/locales}/km.d.ts +0 -0
  564. /package/{locales → esm/locales}/ko.d.ts +0 -0
  565. /package/{locales → esm/locales}/ku.d.ts +0 -0
  566. /package/{locales → esm/locales}/lb.d.ts +0 -0
  567. /package/{locales → esm/locales}/lt.d.ts +0 -0
  568. /package/{locales → esm/locales}/lv.d.ts +0 -0
  569. /package/{locales → esm/locales}/mk.d.ts +0 -0
  570. /package/{locales → esm/locales}/ms.d.ts +0 -0
  571. /package/{locales → esm/locales}/nb.d.ts +0 -0
  572. /package/{locales → esm/locales}/ne.d.ts +0 -0
  573. /package/{locales → esm/locales}/nl.d.ts +0 -0
  574. /package/{locales → esm/locales}/nn.d.ts +0 -0
  575. /package/{locales → esm/locales}/pl.d.ts +0 -0
  576. /package/{locales → esm/locales}/pt-br.d.ts +0 -0
  577. /package/{locales → esm/locales}/pt.d.ts +0 -0
  578. /package/{locales → esm/locales}/ro.d.ts +0 -0
  579. /package/{locales → esm/locales}/ru.d.ts +0 -0
  580. /package/{locales → esm/locales}/si-lk.d.ts +0 -0
  581. /package/{locales → esm/locales}/sk.d.ts +0 -0
  582. /package/{locales → esm/locales}/sl.d.ts +0 -0
  583. /package/{locales → esm/locales}/sm.d.ts +0 -0
  584. /package/{locales → esm/locales}/sq.d.ts +0 -0
  585. /package/{locales → esm/locales}/sr-cyrl.d.ts +0 -0
  586. /package/{locales → esm/locales}/sr.d.ts +0 -0
  587. /package/{locales → esm/locales}/sv.d.ts +0 -0
  588. /package/{locales → esm/locales}/ta-in.d.ts +0 -0
  589. /package/{locales → esm/locales}/th.d.ts +0 -0
  590. /package/{locales → esm/locales}/tr.d.ts +0 -0
  591. /package/{locales → esm/locales}/ug.d.ts +0 -0
  592. /package/{locales → esm/locales}/uk.d.ts +0 -0
  593. /package/{locales → esm/locales}/uz-cy.d.ts +0 -0
  594. /package/{locales → esm/locales}/uz.d.ts +0 -0
  595. /package/{locales → esm/locales}/vi.d.ts +0 -0
  596. /package/{locales → esm/locales}/zh-cn.d.ts +0 -0
  597. /package/{locales → esm/locales}/zh-tw.d.ts +0 -0
  598. /package/{locales-all.d.ts → esm/locales-all.d.ts} +0 -0
  599. /package/{locales-all.js → esm/locales-all.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { m as mergeProps, g as guid, i as isArraysEqual, T as Theme, a as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, b as buildViewClassName, c as greatestDurationDenominator, d as createDuration, e 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 joinClassNames, Z as Interaction, _ as getElEventRange, $ as EventImpl, a0 as listenBySelector, a1 as listenToHoverBySelector, a2 as PureComponent, a3 as buildViewContext, a4 as parseInteractionSettings, a5 as interactionSettingsStore, a6 as getNow, a7 as getIsHeightAuto, a8 as CalendarImpl, a9 as flushSync, aa as CalendarRoot, ab as RenderId, ac as ensureElHasStyles, ad as applyStyleProp, ae as sliceEventStore } from './internal-common.js';
2
- export { af as JsonRequestError } from './internal-common.js';
3
- import { createElement, Component, Fragment, render } from 'preact';
1
+ import { m as mergeCalendarOptions, g as guid, i as isArraysEqual, a as mergeViewOptionsMap, b as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, c as generateClassName, d as greatestDurationDenominator, e as createDuration, 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 isPropsEqualShallow, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as BASE_OPTION_DEFAULTS, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_ONLY_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_ONLY_OPTION_REFINERS, S as DateEnv, T as DateProfileGenerator, U as createEventUi, W as parseBusinessHours, X as Interaction, Y as getElEventRange, Z as EventImpl, _ as listenBySelector, $ as classNames, a0 as listenToHoverBySelector, a1 as joinArrayishClassNames, a2 as joinClassNames, a3 as PureComponent, a4 as buildViewContext, a5 as getUniqueDomId, a6 as parseInteractionSettings, a7 as interactionSettingsStore, a8 as getIsHeightAuto, a9 as CalendarImpl, aa as flushSync, ab as CalendarRoot, ac as getNow, ad as RenderId, ae as applyStyleProp, af as sliceEventStore } from './internal-common.js';
2
+ export { ag as JsonRequestError, a2 as joinClassNames } from './internal-common.js';
3
+ import { createElement, Fragment, render } from 'preact';
4
4
  import 'preact/compat';
5
5
 
6
6
  const globalLocales = [];
@@ -12,39 +12,34 @@ const MINIMAL_RAW_EN_LOCALE = {
12
12
  doy: 4, // 4 days need to be within the year to be considered the first week
13
13
  },
14
14
  direction: 'ltr',
15
- buttonText: {
16
- prev: 'prev',
17
- next: 'next',
18
- prevYear: 'prev year',
19
- nextYear: 'next year',
20
- year: 'year',
21
- today: 'today',
22
- month: 'month',
23
- week: 'week',
24
- day: 'day',
25
- list: 'list',
26
- },
27
- weekText: 'W',
28
- weekTextLong: 'Week',
15
+ todayText: 'Today',
16
+ prevText: 'Prev',
17
+ nextText: 'Next',
18
+ prevYearText: 'Prev year',
19
+ nextYearText: 'Next year',
20
+ yearText: 'Year',
21
+ monthText: 'Month',
22
+ weekText: 'Week',
23
+ dayText: 'Day',
24
+ listText: 'List',
29
25
  closeHint: 'Close',
30
- timeHint: 'Time',
31
- eventHint: 'Event',
32
- allDayText: 'all-day',
26
+ eventsHint: 'Events',
27
+ allDayText: 'All-day',
28
+ timedText: 'Timed',
33
29
  moreLinkText: 'more',
34
30
  noEventsText: 'No events to display',
35
31
  };
32
+ /*
33
+ Includes things we don't want other locales to inherit,
34
+ things that derive from other translatable strings.
35
+ */
36
36
  const RAW_EN_LOCALE = Object.assign(Object.assign({}, MINIMAL_RAW_EN_LOCALE), {
37
- // Includes things we don't want other locales to inherit,
38
- // things that derive from other translatable strings.
39
- buttonHints: {
40
- prev: 'Previous $0',
41
- next: 'Next $0',
42
- today(buttonText, unit) {
43
- return (unit === 'day')
44
- ? 'Today'
45
- : `This ${buttonText}`;
46
- },
47
- }, viewHint: '$0 view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) {
37
+ // if a locale doesn't define this, fall back to weekText, don't use EN
38
+ weekTextShort: 'W', todayHint: (unitText, unit) => {
39
+ return (unit === 'day')
40
+ ? 'Today'
41
+ : `This ${unitText}`;
42
+ }, prevHint: 'Previous $0', nextHint: 'Next $0', viewHint: '$0 view', viewChangeHint: 'Change view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) {
48
43
  return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;
49
44
  } });
50
45
  function organizeRawLocales(explicitRawLocales) {
@@ -85,7 +80,7 @@ function queryRawLocale(codes, available) {
85
80
  return null;
86
81
  }
87
82
  function parseLocale(codeArg, codes, raw) {
88
- let merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']);
83
+ let merged = mergeCalendarOptions(MINIMAL_RAW_EN_LOCALE, raw);
89
84
  delete merged.code; // don't want this part of the options
90
85
  let { week } = merged;
91
86
  delete merged.week;
@@ -125,7 +120,6 @@ function createPlugin(input) {
125
120
  eventDropTransformers: input.eventDropTransformers || [],
126
121
  componentInteractions: input.componentInteractions || [],
127
122
  calendarInteractions: input.calendarInteractions || [],
128
- themeClasses: input.themeClasses || {},
129
123
  eventSourceDefs: input.eventSourceDefs || [],
130
124
  cmdFormatter: input.cmdFormatter,
131
125
  recurringTypes: input.recurringTypes || [],
@@ -136,6 +130,7 @@ function createPlugin(input) {
136
130
  scrollerSyncerClass: input.scrollerSyncerClass || null,
137
131
  listenerRefiners: input.listenerRefiners || {},
138
132
  optionRefiners: input.optionRefiners || {},
133
+ optionDefaults: input.optionDefaults ? [input.optionDefaults] : [],
139
134
  propSetHandlers: input.propSetHandlers || {},
140
135
  };
141
136
  }
@@ -163,7 +158,6 @@ function buildPluginHooks(pluginDefs, globalDefs) {
163
158
  eventDropTransformers: [],
164
159
  componentInteractions: [],
165
160
  calendarInteractions: [],
166
- themeClasses: {},
167
161
  eventSourceDefs: [],
168
162
  cmdFormatter: null,
169
163
  recurringTypes: [],
@@ -174,6 +168,7 @@ function buildPluginHooks(pluginDefs, globalDefs) {
174
168
  scrollerSyncerClass: null,
175
169
  listenerRefiners: {},
176
170
  optionRefiners: {},
171
+ optionDefaults: [],
177
172
  propSetHandlers: {},
178
173
  };
179
174
  function addDefs(defs) {
@@ -225,7 +220,7 @@ function combineHooks(hooks0, hooks1) {
225
220
  dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),
226
221
  datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),
227
222
  dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),
228
- views: Object.assign(Object.assign({}, hooks0.views), hooks1.views),
223
+ views: mergeViewOptionsMap(hooks0.views, hooks1.views),
229
224
  viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),
230
225
  isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,
231
226
  externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),
@@ -233,7 +228,6 @@ function combineHooks(hooks0, hooks1) {
233
228
  eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),
234
229
  calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),
235
230
  componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),
236
- themeClasses: Object.assign(Object.assign({}, hooks0.themeClasses), hooks1.themeClasses),
237
231
  eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),
238
232
  cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,
239
233
  recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),
@@ -244,6 +238,7 @@ function combineHooks(hooks0, hooks1) {
244
238
  scrollerSyncerClass: hooks0.scrollerSyncerClass || hooks1.scrollerSyncerClass,
245
239
  listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
246
240
  optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
241
+ optionDefaults: hooks0.optionDefaults.concat(hooks1.optionDefaults),
247
242
  propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
248
243
  };
249
244
  }
@@ -257,32 +252,6 @@ function compareOptionalDates(date0, date1) {
257
252
  return new Date(Math.max(date0.valueOf(), date1.valueOf()));
258
253
  }
259
254
 
260
- class StandardTheme extends Theme {
261
- }
262
- StandardTheme.prototype.classes = {
263
- root: 'fc-theme-standard',
264
- buttonGroup: 'fc-button-group',
265
- button: 'fc-button fc-button-primary',
266
- buttonActive: 'fc-button-active',
267
- };
268
- StandardTheme.prototype.baseIconClass = 'fc-icon';
269
- StandardTheme.prototype.iconClasses = {
270
- close: 'fc-icon-x',
271
- prev: 'fc-icon-chevron-left',
272
- next: 'fc-icon-chevron-right',
273
- prevYear: 'fc-icon-chevrons-left',
274
- nextYear: 'fc-icon-chevrons-right',
275
- };
276
- StandardTheme.prototype.rtlIconClasses = {
277
- prev: 'fc-icon-chevron-right',
278
- next: 'fc-icon-chevron-left',
279
- prevYear: 'fc-icon-chevrons-right',
280
- nextYear: 'fc-icon-chevrons-left',
281
- };
282
- StandardTheme.prototype.iconOverrideOption = 'buttonIcons'; // TODO: make TS-friendly
283
- StandardTheme.prototype.iconOverrideCustomButtonOption = 'icon';
284
- StandardTheme.prototype.iconOverridePrefix = 'fc-icon-';
285
-
286
255
  function compileViewDefs(defaultConfigs, overrideConfigs) {
287
256
  let hash = {};
288
257
  let viewType;
@@ -327,8 +296,8 @@ function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {
327
296
  return {
328
297
  type: viewType,
329
298
  component: theComponent,
330
- defaults: Object.assign(Object.assign({}, (superDef ? superDef.defaults : {})), (defaultConfig ? defaultConfig.rawOptions : {})),
331
- overrides: Object.assign(Object.assign({}, (superDef ? superDef.overrides : {})), (overrideConfig ? overrideConfig.rawOptions : {})),
299
+ defaults: mergeCalendarOptions(superDef ? superDef.defaults : {}, defaultConfig ? defaultConfig.rawOptions : {}),
300
+ overrides: mergeCalendarOptions(superDef ? superDef.overrides : {}, overrideConfig ? overrideConfig.rawOptions : {}),
332
301
  };
333
302
  }
334
303
 
@@ -356,16 +325,21 @@ function parseViewConfig(input) {
356
325
  };
357
326
  }
358
327
  function createViewHookComponent(options) {
359
- return (viewProps) => (createElement(ViewContextType.Consumer, null, (context) => (createElement(ContentContainer, { tag: "div", className: buildViewClassName(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
328
+ return (viewProps) => (createElement(ViewContextType.Consumer, null, (context) => {
329
+ var _a;
330
+ return (createElement(ContentContainer, { tag: "div", className: generateClassName(options.viewClass, {
331
+ view: context.viewApi,
332
+ }), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: ((_a = options.class) !== null && _a !== void 0 ? _a : options.className), didMount: options.didMount, willUnmount: options.willUnmount }));
333
+ }));
360
334
  }
361
335
 
362
- function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
336
+ function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides) {
363
337
  let defaultConfigs = parseViewConfigs(defaultInputs);
364
338
  let overrideConfigs = parseViewConfigs(optionOverrides.views);
365
339
  let viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);
366
- return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults));
340
+ return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides));
367
341
  }
368
- function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
342
+ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides) {
369
343
  let durationInput = viewDef.overrides.duration ||
370
344
  viewDef.defaults.duration ||
371
345
  dynamicOptionOverrides.duration ||
@@ -385,34 +359,6 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
385
359
  }
386
360
  }
387
361
  }
388
- let queryButtonText = (optionsSubset) => {
389
- let buttonTextMap = optionsSubset.buttonText || {};
390
- let buttonTextKey = viewDef.defaults.buttonTextKey;
391
- if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) {
392
- return buttonTextMap[buttonTextKey];
393
- }
394
- if (buttonTextMap[viewDef.type] != null) {
395
- return buttonTextMap[viewDef.type];
396
- }
397
- if (buttonTextMap[singleUnit] != null) {
398
- return buttonTextMap[singleUnit];
399
- }
400
- return null;
401
- };
402
- let queryButtonTitle = (optionsSubset) => {
403
- let buttonHints = optionsSubset.buttonHints || {};
404
- let buttonKey = viewDef.defaults.buttonTextKey; // use same key as text
405
- if (buttonKey != null && buttonHints[buttonKey] != null) {
406
- return buttonHints[buttonKey];
407
- }
408
- if (buttonHints[viewDef.type] != null) {
409
- return buttonHints[viewDef.type];
410
- }
411
- if (buttonHints[singleUnit] != null) {
412
- return buttonHints[singleUnit];
413
- }
414
- return null;
415
- };
416
362
  return {
417
363
  type: viewDef.type,
418
364
  component: viewDef.component,
@@ -421,21 +367,6 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
421
367
  singleUnit,
422
368
  optionDefaults: viewDef.defaults,
423
369
  optionOverrides: Object.assign(Object.assign({}, singleUnitOverrides), viewDef.overrides),
424
- buttonTextOverride: queryButtonText(dynamicOptionOverrides) ||
425
- queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence
426
- viewDef.overrides.buttonText,
427
- buttonTextDefault: queryButtonText(localeDefaults) ||
428
- viewDef.defaults.buttonText ||
429
- queryButtonText(BASE_OPTION_DEFAULTS) ||
430
- viewDef.type,
431
- // not DRY
432
- buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) ||
433
- queryButtonTitle(optionOverrides) ||
434
- viewDef.overrides.buttonHint,
435
- buttonTitleDefault: queryButtonTitle(localeDefaults) ||
436
- viewDef.defaults.buttonHint ||
437
- queryButtonTitle(BASE_OPTION_DEFAULTS),
438
- // will eventually fall back to buttonText
439
370
  };
440
371
  }
441
372
  // hack to get memoization working
@@ -710,101 +641,121 @@ function reduceEventResize(currentResize, action) {
710
641
  }
711
642
  }
712
643
 
713
- function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
714
- let header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null;
715
- let footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null;
644
+ function parseToolbars(calendarOptions, viewSpecs, calendarApi) {
645
+ let header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, viewSpecs, calendarApi) : null;
646
+ let footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, viewSpecs, calendarApi) : null;
716
647
  return { header, footer };
717
648
  }
718
- function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
719
- let sectionWidgets = {};
649
+ function parseToolbar(sectionStrHash, calendarOptions, viewSpecs, calendarApi) {
650
+ let isRtl = calendarOptions.direction === 'rtl';
720
651
  let viewsWithButtons = [];
721
652
  let hasTitle = false;
722
- for (let sectionName in sectionStrHash) {
723
- let sectionStr = sectionStrHash[sectionName];
724
- let sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi);
725
- sectionWidgets[sectionName] = sectionRes.widgets;
653
+ function processSectionStr(sectionStr) {
654
+ let sectionRes = parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi);
726
655
  viewsWithButtons.push(...sectionRes.viewsWithButtons);
727
656
  hasTitle = hasTitle || sectionRes.hasTitle;
657
+ return sectionRes.widgets;
728
658
  }
729
- return { sectionWidgets, viewsWithButtons, hasTitle };
659
+ const sectionWidgets = {
660
+ start: processSectionStr(sectionStrHash[isRtl ? 'right' : 'left'] || sectionStrHash.start || ''),
661
+ center: processSectionStr(sectionStrHash.center || ''),
662
+ end: processSectionStr(sectionStrHash[isRtl ? 'left' : 'right'] || sectionStrHash.end || ''),
663
+ };
664
+ return {
665
+ sectionWidgets,
666
+ viewsWithButtons,
667
+ hasTitle,
668
+ };
730
669
  }
731
670
  /*
732
671
  BAD: querying icons and text here. should be done at render time
733
672
  */
734
- function parseSection(sectionStr, calendarOptions, // defaults+overrides, then refined
735
- calendarOptionOverrides, // overrides only!, unrefined :(
736
- theme, viewSpecs, calendarApi) {
737
- let isRtl = calendarOptions.direction === 'rtl';
738
- let calendarCustomButtons = calendarOptions.customButtons || {};
739
- let calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {};
740
- let calendarButtonText = calendarOptions.buttonText || {};
741
- let calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {};
742
- let calendarButtonHints = calendarOptions.buttonHints || {};
673
+ function parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi) {
674
+ let calendarButtons = calendarOptions.buttons || {};
675
+ let customElements = calendarOptions.toolbarElements || {};
743
676
  let sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];
744
677
  let viewsWithButtons = [];
745
678
  let hasTitle = false;
746
- let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((buttonName) => {
747
- if (buttonName === 'title') {
679
+ let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((name) => {
680
+ var _a;
681
+ if (name === 'title') {
748
682
  hasTitle = true;
749
- return { buttonName };
683
+ return { name };
684
+ }
685
+ if (customElements[name]) {
686
+ return { name, customElement: customElements[name] };
750
687
  }
751
- let customButtonProps;
752
688
  let viewSpec;
753
- let buttonClick;
754
- let buttonIcon; // only one of these will be set
755
- let buttonText; // "
689
+ let buttonInput = calendarButtons[name] || {};
690
+ let buttonText;
756
691
  let buttonHint;
757
- // ^ for the title="" attribute, for accessibility
758
- if ((customButtonProps = calendarCustomButtons[buttonName])) {
692
+ let buttonClick;
693
+ if ((viewSpec = viewSpecs[name])) {
694
+ viewsWithButtons.push(name);
695
+ const buttonTextKey = viewSpec.optionDefaults.buttonTextKey;
696
+ buttonText = buttonInput.text ||
697
+ (buttonTextKey ? calendarOptions[buttonTextKey] : '') ||
698
+ (viewSpec.singleUnit ? calendarOptions[viewSpec.singleUnit + 'Text'] : '') ||
699
+ name;
700
+ /*
701
+ buttons{}.hint(viewButtonText, viewName)
702
+ viewHint(viewButtonText, viewName)
703
+ */
704
+ buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.viewHint, [buttonText, name], // ordinal arguments
705
+ buttonText);
759
706
  buttonClick = (ev) => {
760
- if (customButtonProps.click) {
761
- customButtonProps.click.call(ev.target, ev, ev.target); // TODO: use Calendar this context?
707
+ var _a;
708
+ (_a = buttonInput === null || buttonInput === void 0 ? void 0 : buttonInput.click) === null || _a === void 0 ? void 0 : _a.call(buttonInput, ev);
709
+ if (!ev.defaultPrevented) {
710
+ calendarApi.changeView(name);
762
711
  }
763
712
  };
764
- (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||
765
- (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
766
- (buttonText = customButtonProps.text);
767
- buttonHint = customButtonProps.hint || customButtonProps.text;
768
- }
769
- else if ((viewSpec = viewSpecs[buttonName])) {
770
- viewsWithButtons.push(buttonName);
771
- buttonClick = () => {
772
- calendarApi.changeView(buttonName);
773
- };
774
- (buttonText = viewSpec.buttonTextOverride) ||
775
- (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
776
- (buttonText = viewSpec.buttonTextDefault);
777
- let textFallback = viewSpec.buttonTextOverride ||
778
- viewSpec.buttonTextDefault;
779
- buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride ||
780
- viewSpec.buttonTitleDefault ||
781
- calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName
782
- textFallback);
783
- }
784
- else if (calendarApi[buttonName]) { // a calendarApi method
785
- buttonClick = () => {
786
- calendarApi[buttonName]();
787
- };
788
- (buttonText = calendarButtonTextOverrides[buttonName]) ||
789
- (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
790
- (buttonText = calendarButtonText[buttonName]); // everything else is considered default
791
- if (buttonName === 'prevYear' || buttonName === 'nextYear') {
792
- let prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next';
793
- buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] ||
794
- calendarButtonHints[prevOrNext], [
795
- calendarButtonText.year || 'year',
796
- 'year',
797
- ], calendarButtonText[buttonName]);
713
+ }
714
+ else {
715
+ buttonText = buttonInput.text ||
716
+ calendarOptions[name + 'Text'] ||
717
+ name;
718
+ /*
719
+ button{}.hint(currentUnitText, currentUnit)
720
+ prevHint(currentUnitUnitext, currentUnit)
721
+ nextHint -- same
722
+ todayHint -- same
723
+ */
724
+ if (name === 'prevYear') {
725
+ buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.prevHint, [calendarOptions.yearText, 'year'], buttonText);
726
+ }
727
+ else if (name === 'nextYear') {
728
+ buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.nextHint, [calendarOptions.yearText, 'year'], buttonText);
798
729
  }
799
730
  else {
800
- buttonHint = (navUnit) => formatWithOrdinals(calendarButtonHintOverrides[buttonName] ||
801
- calendarButtonHints[buttonName], [
802
- calendarButtonText[navUnit] || navUnit,
803
- navUnit,
804
- ], calendarButtonText[buttonName]);
731
+ buttonHint = (currentUnit) => {
732
+ return formatWithOrdinals(buttonInput.hint || calendarOptions[name + 'Hint'], // todayHint/prevHint/nextHint
733
+ [calendarOptions[currentUnit + 'Text'], currentUnit], // ordinal arguments
734
+ buttonText);
735
+ };
805
736
  }
737
+ buttonClick = (ev) => {
738
+ var _a, _b;
739
+ (_a = buttonInput === null || buttonInput === void 0 ? void 0 : buttonInput.click) === null || _a === void 0 ? void 0 : _a.call(buttonInput, ev);
740
+ if (!ev.defaultPrevented) {
741
+ (_b = calendarApi[name]) === null || _b === void 0 ? void 0 : _b.call(calendarApi);
742
+ }
743
+ };
806
744
  }
807
- return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint };
745
+ return {
746
+ name,
747
+ isView: Boolean(viewSpec),
748
+ buttonText,
749
+ buttonHint,
750
+ buttonDisplay: buttonInput.display,
751
+ buttonIconClass: buttonInput.iconClass,
752
+ buttonIconContent: buttonInput.iconContent,
753
+ buttonClick,
754
+ buttonIsPrimary: buttonInput.isPrimary || false,
755
+ buttonClass: (_a = buttonInput.class) !== null && _a !== void 0 ? _a : buttonInput.className,
756
+ buttonDidMount: buttonInput.didMount,
757
+ buttonWillUnmount: buttonInput.willUnmount,
758
+ };
808
759
  })));
809
760
  return { widgets, viewsWithButtons, hasTitle };
810
761
  }
@@ -1021,6 +972,10 @@ function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
1021
972
  const changeHandlerPlugin = createPlugin({
1022
973
  name: 'change-handler',
1023
974
  optionChangeHandlers: {
975
+ controller(controller, context) {
976
+ // TODO: the initial setting is in CalendarDataManager
977
+ controller._setApi(context.calendarApi);
978
+ },
1024
979
  events(events, context) {
1025
980
  handleEventSources([events], context);
1026
981
  },
@@ -1152,14 +1107,14 @@ function buildTitle(dateProfile, viewOptions, dateEnv) {
1152
1107
  else { // for day units or smaller, use the actual day range
1153
1108
  range = dateProfile.activeRange;
1154
1109
  }
1155
- return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {
1110
+ return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile, dateEnv)), {
1156
1111
  isEndExclusive: dateProfile.isRangeAllDay,
1157
1112
  defaultSeparator: viewOptions.titleRangeSeparator,
1158
1113
  });
1159
1114
  }
1160
1115
  // Generates the format string that should be used to generate the title for the current date range.
1161
1116
  // Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
1162
- function buildTitleFormat(dateProfile) {
1117
+ function buildTitleFormat(dateProfile, dateEnv) {
1163
1118
  let { currentRangeUnit } = dateProfile;
1164
1119
  if (currentRangeUnit === 'year') {
1165
1120
  return { year: 'numeric' };
@@ -1169,8 +1124,12 @@ function buildTitleFormat(dateProfile) {
1169
1124
  }
1170
1125
  let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
1171
1126
  if (days !== null && days > 1) {
1172
- // multi-day range. shorter, like "Sep 9 - 10 2014"
1173
- return { year: 'numeric', month: 'short', day: 'numeric' };
1127
+ return {
1128
+ year: 'numeric',
1129
+ month: dateEnv.getMonth(dateProfile.activeRange.start) !== dateEnv.getMonth(dateProfile.activeRange.end)
1130
+ ? 'short' // different months? do "Sep - Oct 2014"
1131
+ : 'long', // same month? do "September 2014"
1132
+ };
1174
1133
  }
1175
1134
  // one day. longer, like "September 9 2014"
1176
1135
  return { year: 'numeric', month: 'long', day: 'numeric' };
@@ -1185,13 +1144,12 @@ class CalendarDataManager {
1185
1144
  this.buildLocale = memoize(buildLocale);
1186
1145
  this.buildPluginHooks = buildBuildPluginHooks();
1187
1146
  this.buildDateEnv = memoize(buildDateEnv$1);
1188
- this.buildTheme = memoize(buildTheme);
1189
1147
  this.parseToolbars = memoize(parseToolbars);
1190
1148
  this.buildViewSpecs = memoize(buildViewSpecs);
1191
1149
  this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
1192
1150
  this.buildViewApi = memoize(buildViewApi);
1193
1151
  this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
1194
- this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);
1152
+ this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqualShallow);
1195
1153
  this.buildEventUiBases = memoize(buildEventUiBases);
1196
1154
  this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
1197
1155
  this.buildTitle = memoize(buildTitle);
@@ -1212,13 +1170,19 @@ class CalendarDataManager {
1212
1170
  this.actionRunner.pause();
1213
1171
  let dynamicOptionOverrides = {};
1214
1172
  let optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);
1215
- let currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView;
1173
+ let currentViewType = optionsData.calendarOptions.initialView ||
1174
+ optionsData.pluginHooks.initialView;
1216
1175
  let currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);
1217
1176
  // wire things up
1218
1177
  // TODO: not DRY
1219
1178
  props.calendarApi.currentDataManager = this;
1220
1179
  this.emitter.setThisContext(props.calendarApi);
1221
1180
  this.emitter.setOptions(currentViewData.options);
1181
+ // NOTE: subsequent updates detected by options-change-handlers.ts
1182
+ const controllerOption = optionsData.calendarOptions.controller;
1183
+ if (controllerOption) {
1184
+ controllerOption._setApi(props.calendarApi);
1185
+ }
1222
1186
  let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
1223
1187
  let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
1224
1188
  if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
@@ -1360,7 +1324,8 @@ class CalendarDataManager {
1360
1324
  let oldData = this.data;
1361
1325
  let optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi);
1362
1326
  let currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides);
1363
- let data = this.data = Object.assign(Object.assign(Object.assign({ viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);
1327
+ let viewTitle = this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv);
1328
+ let data = this.data = Object.assign(Object.assign(Object.assign({ viewTitle, calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);
1364
1329
  let changeHandlers = optionsData.pluginHooks.optionChangeHandlers;
1365
1330
  let oldCalendarOptions = oldData && oldData.calendarOptions;
1366
1331
  let newCalendarOptions = optionsData.calendarOptions;
@@ -1390,18 +1355,15 @@ class CalendarDataManager {
1390
1355
  dynamicOptionOverrides === this.stableDynamicOptionOverrides) {
1391
1356
  return this.stableCalendarOptionsData;
1392
1357
  }
1393
- let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, extra, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);
1394
- warnUnknownOptions(extra);
1395
- let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
1396
- let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides, localeDefaults);
1397
- let theme = this.buildTheme(refinedOptions, pluginHooks);
1398
- let toolbarConfig = this.parseToolbars(refinedOptions, this.stableOptionOverrides, theme, viewSpecs, calendarApi);
1358
+ let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);
1359
+ let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, refinedOptions.weekTextShort, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
1360
+ let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides);
1361
+ let toolbarConfig = this.parseToolbars(refinedOptions, viewSpecs, calendarApi);
1399
1362
  return this.stableCalendarOptionsData = {
1400
1363
  calendarOptions: refinedOptions,
1401
1364
  pluginHooks,
1402
1365
  dateEnv,
1403
1366
  viewSpecs,
1404
- theme,
1405
1367
  toolbarConfig,
1406
1368
  localeDefaults,
1407
1369
  availableRawLocales: availableLocaleData.map,
@@ -1409,23 +1371,13 @@ class CalendarDataManager {
1409
1371
  }
1410
1372
  // always called from behind a memoizer
1411
1373
  processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {
1412
- let { locales, locale } = mergeRawOptions([
1413
- BASE_OPTION_DEFAULTS,
1414
- optionOverrides,
1415
- dynamicOptionOverrides,
1416
- ]);
1374
+ let { locales, locale } = mergeCalendarOptions(BASE_OPTION_DEFAULTS, optionOverrides, dynamicOptionOverrides);
1417
1375
  let availableLocaleData = this.organizeRawLocales(locales);
1418
1376
  let availableRawLocales = availableLocaleData.map;
1419
1377
  let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
1420
1378
  let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
1421
- let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
1422
- let extra = {};
1423
- let raw = mergeRawOptions([
1424
- BASE_OPTION_DEFAULTS,
1425
- localeDefaults,
1426
- optionOverrides,
1427
- dynamicOptionOverrides,
1428
- ]);
1379
+ let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_ONLY_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
1380
+ let raw = mergeCalendarOptions(BASE_OPTION_DEFAULTS, ...pluginHooks.optionDefaults, localeDefaults, filterKnownOptions(mergeCalendarOptions(optionOverrides, dynamicOptionOverrides), refiners));
1429
1381
  let refined = {};
1430
1382
  let currentRaw = this.currentCalendarOptionsInput;
1431
1383
  let currentRefined = this.currentCalendarOptionsRefined;
@@ -1433,16 +1385,17 @@ class CalendarDataManager {
1433
1385
  for (let optionName in raw) {
1434
1386
  if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
1435
1387
  (optionName in currentRaw) &&
1436
- COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])))) {
1388
+ COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])) || (
1389
+ // see options-manip
1390
+ currentRaw[optionName] && currentRaw[optionName].parts &&
1391
+ raw[optionName] && raw[optionName].parts &&
1392
+ isArraysEqual(currentRaw[optionName].parts, raw[optionName].parts)))) {
1437
1393
  refined[optionName] = currentRefined[optionName];
1438
1394
  }
1439
1395
  else if (refiners[optionName]) {
1440
1396
  refined[optionName] = refiners[optionName](raw[optionName]);
1441
1397
  anyChanges = true;
1442
1398
  }
1443
- else {
1444
- extra[optionName] = currentRaw[optionName];
1445
- }
1446
1399
  }
1447
1400
  if (anyChanges) {
1448
1401
  this.currentCalendarOptionsInput = raw;
@@ -1458,7 +1411,6 @@ class CalendarDataManager {
1458
1411
  pluginHooks,
1459
1412
  availableLocaleData,
1460
1413
  localeDefaults,
1461
- extra,
1462
1414
  };
1463
1415
  }
1464
1416
  _computeCurrentViewData(viewType, optionsData, optionOverrides, dynamicOptionOverrides) {
@@ -1466,8 +1418,7 @@ class CalendarDataManager {
1466
1418
  if (!viewSpec) {
1467
1419
  throw new Error(`viewType "${viewType}" is not available. Please make sure you've loaded all neccessary plugins`);
1468
1420
  }
1469
- let { refinedOptions, extra } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);
1470
- warnUnknownOptions(extra);
1421
+ let { refinedOptions } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);
1471
1422
  let dateProfileGenerator = this.buildDateProfileGenerator({
1472
1423
  dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,
1473
1424
  duration: viewSpec.duration,
@@ -1492,24 +1443,19 @@ class CalendarDataManager {
1492
1443
  return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };
1493
1444
  }
1494
1445
  processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
1495
- let raw = mergeRawOptions([
1496
- BASE_OPTION_DEFAULTS,
1497
- viewSpec.optionDefaults,
1498
- localeDefaults,
1499
- optionOverrides,
1500
- viewSpec.optionOverrides,
1501
- dynamicOptionOverrides,
1502
- ]);
1503
- let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
1446
+ let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_ONLY_OPTION_REFINERS), VIEW_ONLY_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
1447
+ let raw = mergeCalendarOptions(BASE_OPTION_DEFAULTS, ...pluginHooks.optionDefaults, viewSpec.optionDefaults, localeDefaults, filterKnownOptions(mergeCalendarOptions(optionOverrides, viewSpec.optionOverrides, dynamicOptionOverrides), refiners));
1504
1448
  let refined = {};
1505
1449
  let currentRaw = this.currentViewOptionsInput;
1506
1450
  let currentRefined = this.currentViewOptionsRefined;
1507
1451
  let anyChanges = false;
1508
- let extra = {};
1509
1452
  for (let optionName in raw) {
1510
- if (raw[optionName] === currentRaw[optionName] ||
1511
- (COMPLEX_OPTION_COMPARATORS[optionName] &&
1512
- COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName]))) {
1453
+ if (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
1454
+ COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName])) || (
1455
+ // see options-manip
1456
+ currentRaw[optionName] && currentRaw[optionName].parts &&
1457
+ raw[optionName] && raw[optionName].parts &&
1458
+ isArraysEqual(currentRaw[optionName].parts, raw[optionName].parts))) {
1513
1459
  refined[optionName] = currentRefined[optionName];
1514
1460
  }
1515
1461
  else {
@@ -1523,9 +1469,6 @@ class CalendarDataManager {
1523
1469
  else if (refiners[optionName]) {
1524
1470
  refined[optionName] = refiners[optionName](raw[optionName]);
1525
1471
  }
1526
- else {
1527
- extra[optionName] = raw[optionName];
1528
- }
1529
1472
  anyChanges = true;
1530
1473
  }
1531
1474
  }
@@ -1536,11 +1479,10 @@ class CalendarDataManager {
1536
1479
  return {
1537
1480
  rawOptions: this.currentViewOptionsInput,
1538
1481
  refinedOptions: this.currentViewOptionsRefined,
1539
- extra,
1540
1482
  };
1541
1483
  }
1542
1484
  }
1543
- function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
1485
+ function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, weekTextShort, pluginHooks, availableLocaleData, defaultSeparator) {
1544
1486
  let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
1545
1487
  return new DateEnv({
1546
1488
  calendarSystem: 'gregory',
@@ -1550,14 +1492,11 @@ function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDa
1550
1492
  weekNumberCalculation,
1551
1493
  firstDay,
1552
1494
  weekText,
1495
+ weekTextShort,
1553
1496
  cmdFormatter: pluginHooks.cmdFormatter,
1554
1497
  defaultSeparator,
1555
1498
  });
1556
1499
  }
1557
- function buildTheme(options, pluginHooks) {
1558
- let ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme;
1559
- return new ThemeClass(options);
1560
- }
1561
1500
  function buildDateProfileGenerator(props) {
1562
1501
  let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
1563
1502
  return new DateProfileGeneratorClass(props);
@@ -1568,8 +1507,13 @@ function buildViewApi(type, getCurrentData, dateEnv) {
1568
1507
  function buildEventUiBySource(eventSources) {
1569
1508
  return mapHash(eventSources, (eventSource) => eventSource.ui);
1570
1509
  }
1510
+ /*
1511
+ The result of this is processed by compileEventUi
1512
+ */
1571
1513
  function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
1572
- let eventUiBases = { '': eventUiSingleBase };
1514
+ let eventUiBases = {
1515
+ '': eventUiSingleBase, // fallback
1516
+ };
1573
1517
  for (let defId in eventDefs) {
1574
1518
  let def = eventDefs[defId];
1575
1519
  if (def.sourceId && eventUiBySource[def.sourceId]) {
@@ -1579,7 +1523,7 @@ function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
1579
1523
  return eventUiBases;
1580
1524
  }
1581
1525
  function buildViewUiProps(calendarContext) {
1582
- let { options } = calendarContext;
1526
+ const { options } = calendarContext;
1583
1527
  return {
1584
1528
  eventUiSingleBase: createEventUi({
1585
1529
  display: options.eventDisplay,
@@ -1589,11 +1533,9 @@ function buildViewUiProps(calendarContext) {
1589
1533
  constraint: options.eventConstraint,
1590
1534
  overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,
1591
1535
  allow: options.eventAllow,
1592
- backgroundColor: options.eventBackgroundColor,
1593
- borderColor: options.eventBorderColor,
1594
- textColor: options.eventTextColor,
1595
- color: options.eventColor,
1596
- // classNames: options.eventClassNames // render hook will handle this
1536
+ // color: options.eventColor, // StandardEvent/BgEvent will handle this
1537
+ // contrastColor: options.eventContrastColor, // StandardEvent/BgEvent will handle this
1538
+ // className: options.eventClass // render hook will handle this
1597
1539
  }, calendarContext),
1598
1540
  selectionConfig: createEventUi({
1599
1541
  constraint: options.selectConstraint,
@@ -1613,78 +1555,14 @@ function computeIsLoading(state, context) {
1613
1555
  function parseContextBusinessHours(calendarContext) {
1614
1556
  return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
1615
1557
  }
1616
- function warnUnknownOptions(options, viewName) {
1617
- for (let optionName in options) {
1618
- console.warn(`Unknown option '${optionName}'` +
1619
- (viewName ? ` for view '${viewName}'` : ''));
1620
- }
1621
- }
1622
-
1623
- class ToolbarSection extends BaseComponent {
1624
- render() {
1625
- let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
1626
- return createElement('div', {
1627
- className: 'fc-toolbar-section fc-toolbar-' + this.props.name
1628
- }, ...children);
1629
- }
1630
- renderWidgetGroup(widgetGroup) {
1631
- let { props } = this;
1632
- let { theme } = this.context;
1633
- let children = [];
1634
- let isOnlyButtons = true;
1635
- for (let widget of widgetGroup) {
1636
- let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
1637
- if (buttonName === 'title') {
1638
- isOnlyButtons = false;
1639
- children.push(createElement("h2", { className: "fc-toolbar-title" }, props.title));
1640
- }
1641
- else {
1642
- let isPressed = buttonName === props.activeButton;
1643
- let isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
1644
- (!props.isPrevEnabled && buttonName === 'prev') ||
1645
- (!props.isNextEnabled && buttonName === 'next');
1646
- children.push(createElement("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: joinClassNames(`fc-${buttonName}-button`, theme.getClassName('button'), isPressed && theme.getClassName('buttonActive')), onClick: buttonClick }, buttonText || (buttonIcon ? createElement("span", { className: buttonIcon, role: "img" }) : '')));
1647
- }
1648
- }
1649
- if (children.length > 1) {
1650
- let groupClassName = (isOnlyButtons && theme.getClassName('buttonGroup')) || '';
1651
- return createElement('div', { className: groupClassName }, ...children);
1652
- }
1653
- return children[0];
1654
- }
1655
- }
1656
-
1657
- class Toolbar extends BaseComponent {
1658
- render() {
1659
- let { model, className } = this.props;
1660
- let forceLtr = false;
1661
- let startContent;
1662
- let endContent;
1663
- let sectionWidgets = model.sectionWidgets;
1664
- let centerContent = sectionWidgets.center;
1665
- if (sectionWidgets.left) {
1666
- forceLtr = true;
1667
- startContent = sectionWidgets.left;
1668
- }
1669
- else {
1670
- startContent = sectionWidgets.start;
1671
- }
1672
- if (sectionWidgets.right) {
1673
- forceLtr = true;
1674
- endContent = sectionWidgets.right;
1558
+ function filterKnownOptions(options, optionRefiners) {
1559
+ const knownOptions = {};
1560
+ for (const optionName in options) {
1561
+ if (optionRefiners[optionName]) {
1562
+ knownOptions[optionName] = options[optionName];
1675
1563
  }
1676
- else {
1677
- endContent = sectionWidgets.end;
1678
- }
1679
- return (createElement("div", { className: joinClassNames(className, 'fc-toolbar', forceLtr && 'fc-toolbar-ltr') },
1680
- this.renderSection('start', startContent || []),
1681
- this.renderSection('center', centerContent || []),
1682
- this.renderSection('end', endContent || [])));
1683
- }
1684
- renderSection(key, widgetGroups) {
1685
- let { props } = this;
1686
- return (createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
1687
1564
  }
1565
+ return knownOptions;
1688
1566
  }
1689
1567
 
1690
1568
  /*
@@ -1707,7 +1585,7 @@ class EventClicking extends Interaction {
1707
1585
  });
1708
1586
  }
1709
1587
  };
1710
- this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
1588
+ this.destroy = listenBySelector(settings.el, 'click', `.${classNames.internalEvent}`, // on both fg and bg events
1711
1589
  this.handleSegClick);
1712
1590
  }
1713
1591
  }
@@ -1737,7 +1615,7 @@ class EventHovering extends Interaction {
1737
1615
  this.triggerEvent('eventMouseLeave', ev, segEl);
1738
1616
  }
1739
1617
  };
1740
- this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events
1618
+ this.removeHoverListeners = listenToHoverBySelector(settings.el, `.${classNames.internalEvent}`, // on both fg and bg events
1741
1619
  this.handleSegEnter, this.handleSegLeave);
1742
1620
  }
1743
1621
  destroy() {
@@ -1758,20 +1636,123 @@ class EventHovering extends Interaction {
1758
1636
  }
1759
1637
  }
1760
1638
 
1761
- class ViewHarness extends Component {
1639
+ class ButtonIcon extends BaseComponent {
1762
1640
  render() {
1763
- const { props } = this;
1764
- return (createElement("div", { className: joinClassNames('fc-view-outer', props.height != null
1765
- ? 'fc-view-outer-static'
1766
- : props.heightLiquid
1767
- ? 'fc-view-outer-liquid'
1768
- : props.aspectRatio != null
1769
- && 'fc-view-outer-aspect-ratio'), style: {
1770
- height: props.height,
1771
- paddingBottom: props.aspectRatio != null
1772
- ? `${(1 / props.aspectRatio) * 100}%`
1773
- : undefined
1774
- } }, props.children));
1641
+ const { contentGenerator, className } = this.props;
1642
+ if (contentGenerator) {
1643
+ // TODO: somehow give className to the svg?
1644
+ return (createElement(ContentContainer, { tag: 'span', style: { display: 'contents' }, attrs: { 'aria-hidden': true }, renderProps: {}, generatorName: undefined, customGenerator: contentGenerator }));
1645
+ }
1646
+ if (className !== undefined) {
1647
+ return (createElement("span", { "aria-hidden": true, className: className }));
1648
+ }
1649
+ }
1650
+ }
1651
+
1652
+ class ToolbarSection extends BaseComponent {
1653
+ render() {
1654
+ let { props } = this;
1655
+ let { options } = this.context;
1656
+ let children = props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
1657
+ return createElement('div', {
1658
+ className: generateClassName(options.toolbarSectionClass, { name: props.name }),
1659
+ }, ...children);
1660
+ }
1661
+ renderWidgetGroup(widgetGroup) {
1662
+ var _a;
1663
+ let { props, context } = this;
1664
+ let { options } = context;
1665
+ let children = [];
1666
+ let isOnlyButtons = true;
1667
+ let isOnlyView = true;
1668
+ for (const widget of widgetGroup) {
1669
+ const { name, isView } = widget;
1670
+ if (name === 'title') {
1671
+ isOnlyButtons = false;
1672
+ }
1673
+ else if (!isView) {
1674
+ isOnlyView = false;
1675
+ }
1676
+ }
1677
+ for (let widget of widgetGroup) {
1678
+ let { name, customElement, buttonHint } = widget;
1679
+ if (name === 'title') {
1680
+ children.push(createElement("div", { role: 'heading', "aria-level": options.headingLevel, id: props.titleId, className: joinArrayishClassNames(options.toolbarTitleClass) }, props.title));
1681
+ }
1682
+ else if (customElement) {
1683
+ children.push(createElement(ContentContainer, { tag: 'span', style: { display: 'contents' }, renderProps: {}, generatorName: undefined, customGenerator: customElement }));
1684
+ }
1685
+ else {
1686
+ let isSelected = name === props.selectedButton;
1687
+ let isDisabled = (!props.isTodayEnabled && name === 'today') ||
1688
+ (!props.isPrevEnabled && name === 'prev') ||
1689
+ (!props.isNextEnabled && name === 'next');
1690
+ let buttonDisplay = (_a = widget.buttonDisplay) !== null && _a !== void 0 ? _a : options.buttonDisplay;
1691
+ if (buttonDisplay === 'auto') {
1692
+ buttonDisplay = (widget.buttonIconContent || widget.buttonIconClass)
1693
+ ? 'icon'
1694
+ : 'text';
1695
+ }
1696
+ let iconNode;
1697
+ if (buttonDisplay !== 'text') {
1698
+ iconNode = (createElement(ButtonIcon, { className: widget.buttonIconClass, contentGenerator: widget.buttonIconContent }));
1699
+ }
1700
+ let inGroup = widgetGroup.length > 1 && isOnlyButtons;
1701
+ let inViewGroup = inGroup && isOnlyView;
1702
+ let renderProps = {
1703
+ name,
1704
+ text: widget.buttonText,
1705
+ isPrimary: widget.buttonIsPrimary,
1706
+ isSelected,
1707
+ isDisabled,
1708
+ isIconOnly: buttonDisplay === 'icon',
1709
+ inGroup,
1710
+ inSelectGroup: inViewGroup,
1711
+ };
1712
+ children.push(createElement(ContentContainer, { tag: 'button', attrs: Object.assign(Object.assign({ type: 'button', disabled: isDisabled }, ((isOnlyButtons && isOnlyView)
1713
+ ? { 'role': 'tab', 'aria-selected': isSelected }
1714
+ : { 'aria-pressed': isSelected })), { 'aria-label': typeof buttonHint === 'function'
1715
+ ? buttonHint(props.navUnit)
1716
+ : buttonHint, onClick: widget.buttonClick }), className: joinClassNames(generateClassName(options.buttonClass, renderProps), !isDisabled && classNames.cursorPointer, inGroup && joinClassNames(isSelected ? classNames.z1 : classNames.z0, classNames.focusZ2)), renderProps: renderProps, generatorName: undefined, classNameGenerator: widget.buttonClass, didMount: widget.buttonDidMount, willUnmount: widget.buttonWillUnmount }, () => (buttonDisplay === 'text'
1717
+ ? widget.buttonText
1718
+ : buttonDisplay === 'icon'
1719
+ ? iconNode
1720
+ : buttonDisplay === 'icon-text'
1721
+ ? (createElement(Fragment, null,
1722
+ iconNode,
1723
+ widget.buttonText))
1724
+ : (createElement(Fragment, null,
1725
+ widget.buttonText,
1726
+ iconNode)) // text-icon
1727
+ )));
1728
+ }
1729
+ }
1730
+ if (children.length > 1) {
1731
+ return createElement('div', {
1732
+ role: (isOnlyButtons && isOnlyView) ? 'tablist' : undefined,
1733
+ 'aria-label': (isOnlyButtons && isOnlyView) ? options.viewChangeHint : undefined,
1734
+ className: joinClassNames(generateClassName(options.buttonGroupClass, { isSelectGroup: isOnlyView }), classNames.isolate),
1735
+ }, ...children);
1736
+ }
1737
+ return children[0];
1738
+ }
1739
+ }
1740
+
1741
+ class Toolbar extends BaseComponent {
1742
+ render() {
1743
+ let { props } = this;
1744
+ let options = this.context.options;
1745
+ let { sectionWidgets } = props.model;
1746
+ return (createElement("div", { className: joinClassNames(props.className, generateClassName(options.toolbarClass, {
1747
+ borderlessX: props.borderlessX,
1748
+ })) },
1749
+ this.renderSection('start', sectionWidgets.start),
1750
+ this.renderSection('center', sectionWidgets.center),
1751
+ this.renderSection('end', sectionWidgets.end)));
1752
+ }
1753
+ renderSection(key, widgetGroups) {
1754
+ let { props } = this;
1755
+ return (createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, titleId: props.titleId, navUnit: props.navUnit, selectedButton: props.selectedButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
1775
1756
  }
1776
1757
  }
1777
1758
 
@@ -1780,8 +1761,8 @@ class CalendarContent extends PureComponent {
1780
1761
  super(...arguments);
1781
1762
  this.buildViewContext = memoize(buildViewContext);
1782
1763
  this.buildViewPropTransformers = memoize(buildViewPropTransformers);
1783
- this.buildToolbarProps = memoize(buildToolbarProps);
1784
1764
  this.interactionsStore = {};
1765
+ this.viewTitleId = getUniqueDomId();
1785
1766
  // Component Registration
1786
1767
  // -----------------------------------------------------------------------------------------------------------------
1787
1768
  this.registerInteractiveComponent = (component, settingsInput) => {
@@ -1813,10 +1794,9 @@ class CalendarContent extends PureComponent {
1813
1794
  renders INSIDE of an outer div
1814
1795
  */
1815
1796
  render() {
1797
+ var _a;
1816
1798
  let { props } = this;
1817
- let { toolbarConfig, options } = props;
1818
- let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
1819
- props.viewTitle);
1799
+ let { toolbarProps, toolbarConfig, options } = props;
1820
1800
  let viewHeight;
1821
1801
  let viewHeightLiquid = false;
1822
1802
  let viewAspectRatio;
@@ -1830,13 +1810,19 @@ class CalendarContent extends PureComponent {
1830
1810
  else {
1831
1811
  viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
1832
1812
  }
1833
- let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
1813
+ let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
1814
+ let borderlessX = (_a = options.borderlessX) !== null && _a !== void 0 ? _a : options.borderless; // TODO: DRY
1834
1815
  return (createElement(ViewContextType.Provider, { value: viewContext },
1835
- toolbarConfig.header && (createElement(Toolbar, Object.assign({ className: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
1836
- createElement(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
1837
- this.renderView(props),
1816
+ toolbarConfig.header && (createElement(Toolbar, Object.assign({ className: generateClassName(options.headerToolbarClass, { borderlessX }), model: toolbarConfig.header, borderlessX: borderlessX, titleId: this.viewTitleId }, toolbarProps))),
1817
+ createElement("div", { className: joinClassNames(classNames.flexCol, classNames.rel, viewHeightLiquid && classNames.liquid), style: {
1818
+ height: viewHeight,
1819
+ paddingBottom: viewAspectRatio != null
1820
+ ? `${(1 / viewAspectRatio) * 100}%`
1821
+ : undefined
1822
+ } },
1823
+ this.renderView(joinClassNames((viewHeightLiquid || viewHeight) && classNames.liquid, viewAspectRatio != null && classNames.fill, classNames.internalView), toolbarProps.title),
1838
1824
  this.buildAppendContent()),
1839
- toolbarConfig.footer && (createElement(Toolbar, Object.assign({ className: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
1825
+ toolbarConfig.footer && (createElement(Toolbar, Object.assign({ className: generateClassName(options.footerToolbarClass, { borderlessX }), model: toolbarConfig.footer, borderlessX: borderlessX }, toolbarProps)))));
1840
1826
  }
1841
1827
  componentDidMount() {
1842
1828
  let { props } = this;
@@ -1867,10 +1853,17 @@ class CalendarContent extends PureComponent {
1867
1853
  let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
1868
1854
  return createElement(Fragment, {}, ...children);
1869
1855
  }
1870
- renderView(props) {
1871
- let { pluginHooks } = props;
1872
- let { viewSpec } = props;
1856
+ renderView(className, title) {
1857
+ var _a, _b, _c;
1858
+ let { props } = this;
1859
+ let { pluginHooks, viewSpec, toolbarConfig, options } = props;
1860
+ // TODO: DRY
1861
+ let { borderless } = options;
1862
+ let calendarBorderlessX = (_a = options.borderlessX) !== null && _a !== void 0 ? _a : borderless;
1863
+ let calendarBorderlessTop = (_b = options.borderlessTop) !== null && _b !== void 0 ? _b : borderless;
1864
+ let calendarBorderlessBottom = (_c = options.borderlessBottom) !== null && _c !== void 0 ? _c : borderless;
1873
1865
  let viewProps = {
1866
+ className,
1874
1867
  dateProfile: props.dateProfile,
1875
1868
  businessHours: props.businessHours,
1876
1869
  eventStore: props.renderableEventStore,
@@ -1880,6 +1873,12 @@ class CalendarContent extends PureComponent {
1880
1873
  eventDrag: props.eventDrag,
1881
1874
  eventResize: props.eventResize,
1882
1875
  forPrint: props.forPrint,
1876
+ labelId: toolbarConfig.header && toolbarConfig.header.hasTitle ? this.viewTitleId : undefined,
1877
+ labelStr: toolbarConfig.header && toolbarConfig.header.hasTitle ? undefined : title,
1878
+ borderlessX: calendarBorderlessX,
1879
+ borderlessTop: toolbarConfig.header ? false : calendarBorderlessTop,
1880
+ borderlessBottom: toolbarConfig.footer ? false : calendarBorderlessBottom,
1881
+ noEdgeEffects: calendarBorderlessX || calendarBorderlessTop || calendarBorderlessBottom,
1883
1882
  };
1884
1883
  let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
1885
1884
  for (let transformer of transformers) {
@@ -1889,20 +1888,6 @@ class CalendarContent extends PureComponent {
1889
1888
  return (createElement(ViewComponent, Object.assign({}, viewProps)));
1890
1889
  }
1891
1890
  }
1892
- function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
1893
- // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid
1894
- let todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason
1895
- let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);
1896
- let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);
1897
- return {
1898
- title,
1899
- activeButton: viewSpec.type,
1900
- navUnit: viewSpec.singleUnit,
1901
- isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
1902
- isPrevEnabled: prevInfo.isValid,
1903
- isNextEnabled: nextInfo.isValid,
1904
- };
1905
- }
1906
1891
  // Plugin
1907
1892
  // -----------------------------------------------------------------------------------------------------------------
1908
1893
  function buildViewPropTransformers(theClasses) {
@@ -1915,9 +1900,10 @@ Vanilla JS API
1915
1900
  class Calendar extends CalendarImpl {
1916
1901
  constructor(el, optionOverrides = {}) {
1917
1902
  super();
1903
+ this.buildToolbarProps = memoize(buildToolbarProps);
1918
1904
  this.isRendering = false;
1919
1905
  this.isRendered = false;
1920
- this.currentClassNames = [];
1906
+ this.currentClassName = '';
1921
1907
  this.customContentRenderId = 0;
1922
1908
  this.handleAction = (action) => {
1923
1909
  // actions we know we want to render immediately
@@ -1936,22 +1922,25 @@ class Calendar extends CalendarImpl {
1936
1922
  this.isRendered = true;
1937
1923
  let { currentData } = this;
1938
1924
  flushSync(() => {
1939
- render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, forPrint) => {
1940
- this.setClassNames(classNames);
1925
+ render(createElement(CalendarRoot, { options: currentData.calendarOptions, emitter: currentData.emitter }, (isRtl, className, height, forPrint) => {
1926
+ this.setIsRtl(isRtl);
1927
+ this.setClassName(className);
1941
1928
  this.setHeight(height);
1929
+ const toolbarProps = this.toolbarProps = this.buildToolbarProps(currentData.viewSpec, currentData.dateProfile, currentData.dateProfileGenerator, currentData.currentDate, getNow(currentData.options.now, currentData.dateEnv), // TODO: use NowTimer????
1930
+ currentData.viewTitle);
1942
1931
  return (createElement(RenderId.Provider, { value: this.customContentRenderId },
1943
- createElement(CalendarContent, Object.assign({ forPrint: forPrint }, currentData))));
1932
+ createElement(CalendarContent, Object.assign({ forPrint: forPrint, toolbarProps: toolbarProps }, currentData))));
1944
1933
  }), this.el);
1945
1934
  });
1946
1935
  }
1947
1936
  else if (this.isRendered) {
1948
1937
  this.isRendered = false;
1949
1938
  render(null, this.el);
1950
- this.setClassNames([]);
1939
+ this.setIsRtl(false);
1940
+ this.setClassName('');
1951
1941
  this.setHeight('');
1952
1942
  }
1953
1943
  };
1954
- ensureElHasStyles(el);
1955
1944
  this.el = el;
1956
1945
  this.renderRunner = new DelayedRunner(this.handleRenderRequest);
1957
1946
  new CalendarDataManager({
@@ -1980,11 +1969,6 @@ class Calendar extends CalendarImpl {
1980
1969
  this.renderRunner.request();
1981
1970
  }
1982
1971
  }
1983
- updateSize() {
1984
- flushSync(() => {
1985
- super.updateSize();
1986
- });
1987
- }
1988
1972
  batchRendering(func) {
1989
1973
  this.renderRunner.pause('batchRendering');
1990
1974
  func();
@@ -1999,21 +1983,170 @@ class Calendar extends CalendarImpl {
1999
1983
  resetOptions(optionOverrides, changedOptionNames) {
2000
1984
  this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);
2001
1985
  }
2002
- setClassNames(classNames) {
2003
- if (!isArraysEqual(classNames, this.currentClassNames)) {
1986
+ /*
1987
+ TODO: DRY with toolbar-parse.ts and ToolbarSection
1988
+ */
1989
+ getButtonState() {
1990
+ var _a;
1991
+ const { currentData, toolbarProps } = this;
1992
+ const options = currentData.calendarOptions;
1993
+ const buttonConfigs = options.buttons || {};
1994
+ const viewSpecs = currentData.viewSpecs;
1995
+ const buttonState = {
1996
+ today: {
1997
+ text: options.todayText,
1998
+ hint: options.todayHint,
1999
+ isDisabled: !toolbarProps.isTodayEnabled,
2000
+ },
2001
+ prev: {
2002
+ text: options.prevText,
2003
+ hint: options.prevHint,
2004
+ isDisabled: !toolbarProps.isPrevEnabled,
2005
+ },
2006
+ next: {
2007
+ text: options.nextText,
2008
+ hint: options.nextHint,
2009
+ isDisabled: !toolbarProps.isNextEnabled,
2010
+ },
2011
+ prevYear: {
2012
+ text: options.prevYearText,
2013
+ hint: formatWithOrdinals(options.prevHint, [options.yearText, 'year'], options.prevYearText),
2014
+ isDisabled: false,
2015
+ },
2016
+ nextYear: {
2017
+ text: options.prevYearText,
2018
+ hint: formatWithOrdinals(options.nextHint, [options.yearText, 'year'], options.nextYearText),
2019
+ isDisabled: false,
2020
+ },
2021
+ };
2022
+ for (const viewSpecName in viewSpecs) {
2023
+ const viewSpec = viewSpecs[viewSpecName];
2024
+ const buttonTextKey = viewSpec.optionDefaults.buttonTextKey;
2025
+ const buttonText = ((_a = buttonConfigs[viewSpecName]) === null || _a === void 0 ? void 0 : _a.text) ||
2026
+ (buttonTextKey ? options[buttonTextKey] : '') ||
2027
+ (viewSpec.singleUnit ? options[viewSpec.singleUnit + 'Text'] : '') ||
2028
+ viewSpecName;
2029
+ const buttonHint = formatWithOrdinals(options.viewHint, [buttonText, viewSpecName], // ordinal arguments
2030
+ buttonText);
2031
+ buttonState[viewSpecName] = {
2032
+ text: buttonText,
2033
+ hint: buttonHint,
2034
+ };
2035
+ }
2036
+ return buttonState;
2037
+ }
2038
+ setClassName(className) {
2039
+ if (className !== this.currentClassName) {
2004
2040
  let { classList } = this.el;
2005
- for (let className of this.currentClassNames) {
2006
- classList.remove(className);
2041
+ for (let singleClassName of this.currentClassName.split(' ')) {
2042
+ if (singleClassName) {
2043
+ classList.remove(singleClassName);
2044
+ }
2007
2045
  }
2008
- for (let className of classNames) {
2009
- classList.add(className);
2046
+ for (let singleClassName of className.split(' ')) {
2047
+ if (singleClassName) {
2048
+ classList.add(singleClassName);
2049
+ }
2010
2050
  }
2011
- this.currentClassNames = classNames;
2051
+ this.currentClassName = className;
2012
2052
  }
2013
2053
  }
2014
2054
  setHeight(height) {
2015
2055
  applyStyleProp(this.el, 'height', height);
2016
2056
  }
2057
+ setIsRtl(isRtl) {
2058
+ if (isRtl) {
2059
+ this.el.dir = 'rtl';
2060
+ }
2061
+ else {
2062
+ this.el.removeAttribute('dir');
2063
+ }
2064
+ }
2065
+ }
2066
+ function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
2067
+ // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid
2068
+ let todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason
2069
+ let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);
2070
+ let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);
2071
+ return {
2072
+ title,
2073
+ selectedButton: viewSpec.type,
2074
+ navUnit: viewSpec.singleUnit,
2075
+ isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
2076
+ isPrevEnabled: prevInfo.isValid,
2077
+ isNextEnabled: nextInfo.isValid,
2078
+ };
2079
+ }
2080
+
2081
+ const blankButtonState = {
2082
+ text: '', hint: '', isDisabled: false,
2083
+ };
2084
+ class CalendarController {
2085
+ constructor(handleDateChange) {
2086
+ this.handleDateChange = handleDateChange;
2087
+ }
2088
+ today() {
2089
+ var _a;
2090
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.today();
2091
+ }
2092
+ prev() {
2093
+ var _a;
2094
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.prev();
2095
+ }
2096
+ next() {
2097
+ var _a;
2098
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.next();
2099
+ }
2100
+ prevYear() {
2101
+ var _a;
2102
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.prevYear();
2103
+ }
2104
+ nextYear() {
2105
+ var _a;
2106
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.nextYear();
2107
+ }
2108
+ gotoDate(zonedDateInput) {
2109
+ var _a;
2110
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.gotoDate(zonedDateInput);
2111
+ }
2112
+ incrementDate(duration) {
2113
+ var _a;
2114
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.incrementDate(duration);
2115
+ }
2116
+ changeView(viewType) {
2117
+ var _a;
2118
+ (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.changeView(viewType);
2119
+ }
2120
+ get view() {
2121
+ var _a;
2122
+ return (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.view;
2123
+ }
2124
+ getDate() {
2125
+ var _a;
2126
+ return (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.getDate();
2127
+ }
2128
+ getButtonState() {
2129
+ const { calendarApi } = this;
2130
+ return (calendarApi && calendarApi.getButtonState()) || {
2131
+ today: blankButtonState,
2132
+ prev: blankButtonState,
2133
+ next: blankButtonState,
2134
+ prevYear: blankButtonState,
2135
+ nextYear: blankButtonState,
2136
+ };
2137
+ }
2138
+ _setApi(calendarApi) {
2139
+ if (this.calendarApi !== calendarApi) {
2140
+ if (this.calendarApi) {
2141
+ this.calendarApi.off('datesSet', this.handleDateChange);
2142
+ this.calendarApi = undefined;
2143
+ }
2144
+ if (calendarApi) {
2145
+ this.calendarApi = calendarApi;
2146
+ calendarApi.on('datesSet', this.handleDateChange);
2147
+ }
2148
+ }
2149
+ }
2017
2150
  }
2018
2151
 
2019
2152
  function formatDate(dateInput, options = {}) {
@@ -2025,7 +2158,7 @@ function formatDate(dateInput, options = {}) {
2025
2158
  }
2026
2159
  return dateEnv.format(dateMeta.marker, formatter, {
2027
2160
  forcedTzo: dateMeta.forcedTzo,
2028
- });
2161
+ })[0];
2029
2162
  }
2030
2163
  function formatRange(startInput, endInput, options) {
2031
2164
  let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object
@@ -2057,6 +2190,6 @@ function sliceEvents(props, allDay) {
2057
2190
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
2058
2191
  }
2059
2192
 
2060
- const version = '7.0.0-beta.3';
2193
+ const version = '7.0.0-beta.5';
2061
2194
 
2062
- export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
2195
+ export { Calendar, CalendarController, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };