@fullcalendar/core 7.0.0-beta.4 → 7.0.0-beta.6

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} +491 -365
  4. package/cjs/internal-classnames.cjs +11 -0
  5. package/{internal-common.cjs → cjs/internal-common.cjs} +5466 -5268
  6. package/{internal.cjs → cjs/internal.cjs} +25 -19
  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} +493 -369
  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} +726 -693
  92. package/{internal-common.js → esm/internal-common.js} +5438 -5245
  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} +5204 -4877
  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 -62
  368. package/locales/de-at.global.js +0 -68
  369. package/locales/de-at.global.min.js +0 -6
  370. package/locales/de-at.js +0 -58
  371. package/locales/de.cjs +0 -62
  372. package/locales/de.global.js +0 -68
  373. package/locales/de.global.min.js +0 -6
  374. package/locales/de.js +0 -58
  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 -45
  388. package/locales/es.global.js +0 -51
  389. package/locales/es.global.min.js +0 -6
  390. package/locales/es.js +0 -41
  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 -45
  411. package/locales/gl.global.js +0 -51
  412. package/locales/gl.global.min.js +0 -6
  413. package/locales/gl.js +0 -41
  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 -45
  467. package/locales/pt-br.global.js +0 -51
  468. package/locales/pt-br.global.min.js +0 -6
  469. package/locales/pt-br.js +0 -41
  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 -46
  491. package/locales/sv.global.js +0 -52
  492. package/locales/sv.global.min.js +0 -6
  493. package/locales/sv.js +0 -42
  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 -1927
  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 getUniqueDomId, a5 as parseInteractionSettings, a6 as interactionSettingsStore, a7 as getNow, a8 as getIsHeightAuto, a9 as CalendarImpl, aa as flushSync, ab as CalendarRoot, ac as RenderId, ad as ensureElHasStyles, ae as applyStyleProp, af as sliceEventStore } from './internal-common.js';
2
- export { ag 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
26
  eventsHint: 'Events',
31
- allDayText: 'all-day',
32
- timedText: 'timed',
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', viewChangeHint: 'Change 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,17 +641,17 @@ 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) {
649
+ function parseToolbar(sectionStrHash, calendarOptions, viewSpecs, calendarApi) {
719
650
  let isRtl = calendarOptions.direction === 'rtl';
720
651
  let viewsWithButtons = [];
721
652
  let hasTitle = false;
722
653
  function processSectionStr(sectionStr) {
723
- let sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi);
654
+ let sectionRes = parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi);
724
655
  viewsWithButtons.push(...sectionRes.viewsWithButtons);
725
656
  hasTitle = hasTitle || sectionRes.hasTitle;
726
657
  return sectionRes.widgets;
@@ -739,82 +670,92 @@ function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides,
739
670
  /*
740
671
  BAD: querying icons and text here. should be done at render time
741
672
  */
742
- function parseSection(sectionStr, calendarOptions, // defaults+overrides, then refined
743
- calendarOptionOverrides, // overrides only!, unrefined :(
744
- theme, viewSpecs, calendarApi) {
745
- let isRtl = calendarOptions.direction === 'rtl';
746
- let calendarCustomButtons = calendarOptions.customButtons || {};
747
- let calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {};
748
- let calendarButtonText = calendarOptions.buttonText || {};
749
- let calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {};
750
- let calendarButtonHints = calendarOptions.buttonHints || {};
673
+ function parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi) {
674
+ let calendarButtons = calendarOptions.buttons || {};
675
+ let customElements = calendarOptions.toolbarElements || {};
751
676
  let sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];
752
677
  let viewsWithButtons = [];
753
678
  let hasTitle = false;
754
- let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((buttonName) => {
755
- if (buttonName === 'title') {
679
+ let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((name) => {
680
+ var _a;
681
+ if (name === 'title') {
756
682
  hasTitle = true;
757
- return { buttonName };
683
+ return { name };
684
+ }
685
+ if (customElements[name]) {
686
+ return { name, customElement: customElements[name] };
758
687
  }
759
- let customButtonProps;
760
688
  let viewSpec;
761
- let buttonClick;
762
- let buttonIcon; // only one of these will be set
763
- let buttonText; // "
689
+ let buttonInput = calendarButtons[name] || {};
690
+ let buttonText;
764
691
  let buttonHint;
765
- let isView = false;
766
- // ^ for the title="" attribute, for accessibility
767
- 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);
768
706
  buttonClick = (ev) => {
769
- if (customButtonProps.click) {
770
- 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);
771
711
  }
772
712
  };
773
- (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||
774
- (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
775
- (buttonText = customButtonProps.text);
776
- buttonHint = customButtonProps.hint || customButtonProps.text;
777
- }
778
- else if ((viewSpec = viewSpecs[buttonName])) {
779
- isView = true;
780
- viewsWithButtons.push(buttonName);
781
- buttonClick = () => {
782
- calendarApi.changeView(buttonName);
783
- };
784
- (buttonText = viewSpec.buttonTextOverride) ||
785
- (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
786
- (buttonText = viewSpec.buttonTextDefault);
787
- let textFallback = viewSpec.buttonTextOverride ||
788
- viewSpec.buttonTextDefault;
789
- buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride ||
790
- viewSpec.buttonTitleDefault ||
791
- calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName
792
- textFallback);
793
- }
794
- else if (calendarApi[buttonName]) { // a calendarApi method
795
- buttonClick = () => {
796
- calendarApi[buttonName]();
797
- };
798
- (buttonText = calendarButtonTextOverrides[buttonName]) ||
799
- (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
800
- (buttonText = calendarButtonText[buttonName]); // everything else is considered default
801
- if (buttonName === 'prevYear' || buttonName === 'nextYear') {
802
- let prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next';
803
- buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] ||
804
- calendarButtonHints[prevOrNext], [
805
- calendarButtonText.year || 'year',
806
- 'year',
807
- ], 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);
808
729
  }
809
730
  else {
810
- buttonHint = (navUnit) => formatWithOrdinals(calendarButtonHintOverrides[buttonName] ||
811
- calendarButtonHints[buttonName], [
812
- calendarButtonText[navUnit] || navUnit,
813
- navUnit,
814
- ], 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
+ };
815
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
+ };
816
744
  }
817
- return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint, isView };
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
+ };
818
759
  })));
819
760
  return { widgets, viewsWithButtons, hasTitle };
820
761
  }
@@ -1031,6 +972,10 @@ function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
1031
972
  const changeHandlerPlugin = createPlugin({
1032
973
  name: 'change-handler',
1033
974
  optionChangeHandlers: {
975
+ controller(controller, context) {
976
+ // TODO: the initial setting is in CalendarDataManager
977
+ controller._setApi(context.calendarApi);
978
+ },
1034
979
  events(events, context) {
1035
980
  handleEventSources([events], context);
1036
981
  },
@@ -1162,14 +1107,14 @@ function buildTitle(dateProfile, viewOptions, dateEnv) {
1162
1107
  else { // for day units or smaller, use the actual day range
1163
1108
  range = dateProfile.activeRange;
1164
1109
  }
1165
- 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)), {
1166
1111
  isEndExclusive: dateProfile.isRangeAllDay,
1167
1112
  defaultSeparator: viewOptions.titleRangeSeparator,
1168
1113
  });
1169
1114
  }
1170
1115
  // Generates the format string that should be used to generate the title for the current date range.
1171
1116
  // Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
1172
- function buildTitleFormat(dateProfile) {
1117
+ function buildTitleFormat(dateProfile, dateEnv) {
1173
1118
  let { currentRangeUnit } = dateProfile;
1174
1119
  if (currentRangeUnit === 'year') {
1175
1120
  return { year: 'numeric' };
@@ -1179,8 +1124,12 @@ function buildTitleFormat(dateProfile) {
1179
1124
  }
1180
1125
  let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
1181
1126
  if (days !== null && days > 1) {
1182
- // multi-day range. shorter, like "Sep 9 - 10 2014"
1183
- 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
+ };
1184
1133
  }
1185
1134
  // one day. longer, like "September 9 2014"
1186
1135
  return { year: 'numeric', month: 'long', day: 'numeric' };
@@ -1195,13 +1144,12 @@ class CalendarDataManager {
1195
1144
  this.buildLocale = memoize(buildLocale);
1196
1145
  this.buildPluginHooks = buildBuildPluginHooks();
1197
1146
  this.buildDateEnv = memoize(buildDateEnv$1);
1198
- this.buildTheme = memoize(buildTheme);
1199
1147
  this.parseToolbars = memoize(parseToolbars);
1200
1148
  this.buildViewSpecs = memoize(buildViewSpecs);
1201
1149
  this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
1202
1150
  this.buildViewApi = memoize(buildViewApi);
1203
1151
  this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
1204
- this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);
1152
+ this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqualShallow);
1205
1153
  this.buildEventUiBases = memoize(buildEventUiBases);
1206
1154
  this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
1207
1155
  this.buildTitle = memoize(buildTitle);
@@ -1222,13 +1170,19 @@ class CalendarDataManager {
1222
1170
  this.actionRunner.pause();
1223
1171
  let dynamicOptionOverrides = {};
1224
1172
  let optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);
1225
- let currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView;
1173
+ let currentViewType = optionsData.calendarOptions.initialView ||
1174
+ optionsData.pluginHooks.initialView;
1226
1175
  let currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);
1227
1176
  // wire things up
1228
1177
  // TODO: not DRY
1229
1178
  props.calendarApi.currentDataManager = this;
1230
1179
  this.emitter.setThisContext(props.calendarApi);
1231
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
+ }
1232
1186
  let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
1233
1187
  let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
1234
1188
  if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
@@ -1370,7 +1324,8 @@ class CalendarDataManager {
1370
1324
  let oldData = this.data;
1371
1325
  let optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi);
1372
1326
  let currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides);
1373
- 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);
1374
1329
  let changeHandlers = optionsData.pluginHooks.optionChangeHandlers;
1375
1330
  let oldCalendarOptions = oldData && oldData.calendarOptions;
1376
1331
  let newCalendarOptions = optionsData.calendarOptions;
@@ -1400,18 +1355,15 @@ class CalendarDataManager {
1400
1355
  dynamicOptionOverrides === this.stableDynamicOptionOverrides) {
1401
1356
  return this.stableCalendarOptionsData;
1402
1357
  }
1403
- let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, extra, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);
1404
- warnUnknownOptions(extra);
1405
- let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
1406
- let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides, localeDefaults);
1407
- let theme = this.buildTheme(refinedOptions, pluginHooks);
1408
- 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);
1409
1362
  return this.stableCalendarOptionsData = {
1410
1363
  calendarOptions: refinedOptions,
1411
1364
  pluginHooks,
1412
1365
  dateEnv,
1413
1366
  viewSpecs,
1414
- theme,
1415
1367
  toolbarConfig,
1416
1368
  localeDefaults,
1417
1369
  availableRawLocales: availableLocaleData.map,
@@ -1419,23 +1371,13 @@ class CalendarDataManager {
1419
1371
  }
1420
1372
  // always called from behind a memoizer
1421
1373
  processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {
1422
- let { locales, locale } = mergeRawOptions([
1423
- BASE_OPTION_DEFAULTS,
1424
- optionOverrides,
1425
- dynamicOptionOverrides,
1426
- ]);
1374
+ let { locales, locale } = mergeCalendarOptions(BASE_OPTION_DEFAULTS, optionOverrides, dynamicOptionOverrides);
1427
1375
  let availableLocaleData = this.organizeRawLocales(locales);
1428
1376
  let availableRawLocales = availableLocaleData.map;
1429
1377
  let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
1430
1378
  let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
1431
- 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);
1432
- let extra = {};
1433
- let raw = mergeRawOptions([
1434
- BASE_OPTION_DEFAULTS,
1435
- localeDefaults,
1436
- optionOverrides,
1437
- dynamicOptionOverrides,
1438
- ]);
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));
1439
1381
  let refined = {};
1440
1382
  let currentRaw = this.currentCalendarOptionsInput;
1441
1383
  let currentRefined = this.currentCalendarOptionsRefined;
@@ -1443,16 +1385,17 @@ class CalendarDataManager {
1443
1385
  for (let optionName in raw) {
1444
1386
  if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
1445
1387
  (optionName in currentRaw) &&
1446
- 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)))) {
1447
1393
  refined[optionName] = currentRefined[optionName];
1448
1394
  }
1449
1395
  else if (refiners[optionName]) {
1450
1396
  refined[optionName] = refiners[optionName](raw[optionName]);
1451
1397
  anyChanges = true;
1452
1398
  }
1453
- else {
1454
- extra[optionName] = currentRaw[optionName];
1455
- }
1456
1399
  }
1457
1400
  if (anyChanges) {
1458
1401
  this.currentCalendarOptionsInput = raw;
@@ -1468,7 +1411,6 @@ class CalendarDataManager {
1468
1411
  pluginHooks,
1469
1412
  availableLocaleData,
1470
1413
  localeDefaults,
1471
- extra,
1472
1414
  };
1473
1415
  }
1474
1416
  _computeCurrentViewData(viewType, optionsData, optionOverrides, dynamicOptionOverrides) {
@@ -1476,8 +1418,7 @@ class CalendarDataManager {
1476
1418
  if (!viewSpec) {
1477
1419
  throw new Error(`viewType "${viewType}" is not available. Please make sure you've loaded all neccessary plugins`);
1478
1420
  }
1479
- let { refinedOptions, extra } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);
1480
- warnUnknownOptions(extra);
1421
+ let { refinedOptions } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);
1481
1422
  let dateProfileGenerator = this.buildDateProfileGenerator({
1482
1423
  dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,
1483
1424
  duration: viewSpec.duration,
@@ -1502,24 +1443,19 @@ class CalendarDataManager {
1502
1443
  return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };
1503
1444
  }
1504
1445
  processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
1505
- let raw = mergeRawOptions([
1506
- BASE_OPTION_DEFAULTS,
1507
- viewSpec.optionDefaults,
1508
- localeDefaults,
1509
- optionOverrides,
1510
- viewSpec.optionOverrides,
1511
- dynamicOptionOverrides,
1512
- ]);
1513
- 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));
1514
1448
  let refined = {};
1515
1449
  let currentRaw = this.currentViewOptionsInput;
1516
1450
  let currentRefined = this.currentViewOptionsRefined;
1517
1451
  let anyChanges = false;
1518
- let extra = {};
1519
1452
  for (let optionName in raw) {
1520
- if (raw[optionName] === currentRaw[optionName] ||
1521
- (COMPLEX_OPTION_COMPARATORS[optionName] &&
1522
- 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))) {
1523
1459
  refined[optionName] = currentRefined[optionName];
1524
1460
  }
1525
1461
  else {
@@ -1533,9 +1469,6 @@ class CalendarDataManager {
1533
1469
  else if (refiners[optionName]) {
1534
1470
  refined[optionName] = refiners[optionName](raw[optionName]);
1535
1471
  }
1536
- else {
1537
- extra[optionName] = raw[optionName];
1538
- }
1539
1472
  anyChanges = true;
1540
1473
  }
1541
1474
  }
@@ -1546,11 +1479,10 @@ class CalendarDataManager {
1546
1479
  return {
1547
1480
  rawOptions: this.currentViewOptionsInput,
1548
1481
  refinedOptions: this.currentViewOptionsRefined,
1549
- extra,
1550
1482
  };
1551
1483
  }
1552
1484
  }
1553
- function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
1485
+ function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, weekTextShort, pluginHooks, availableLocaleData, defaultSeparator) {
1554
1486
  let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
1555
1487
  return new DateEnv({
1556
1488
  calendarSystem: 'gregory',
@@ -1560,14 +1492,11 @@ function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDa
1560
1492
  weekNumberCalculation,
1561
1493
  firstDay,
1562
1494
  weekText,
1495
+ weekTextShort,
1563
1496
  cmdFormatter: pluginHooks.cmdFormatter,
1564
1497
  defaultSeparator,
1565
1498
  });
1566
1499
  }
1567
- function buildTheme(options, pluginHooks) {
1568
- let ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme;
1569
- return new ThemeClass(options);
1570
- }
1571
1500
  function buildDateProfileGenerator(props) {
1572
1501
  let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
1573
1502
  return new DateProfileGeneratorClass(props);
@@ -1578,8 +1507,13 @@ function buildViewApi(type, getCurrentData, dateEnv) {
1578
1507
  function buildEventUiBySource(eventSources) {
1579
1508
  return mapHash(eventSources, (eventSource) => eventSource.ui);
1580
1509
  }
1510
+ /*
1511
+ The result of this is processed by compileEventUi
1512
+ */
1581
1513
  function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
1582
- let eventUiBases = { '': eventUiSingleBase };
1514
+ let eventUiBases = {
1515
+ '': eventUiSingleBase, // fallback
1516
+ };
1583
1517
  for (let defId in eventDefs) {
1584
1518
  let def = eventDefs[defId];
1585
1519
  if (def.sourceId && eventUiBySource[def.sourceId]) {
@@ -1589,7 +1523,7 @@ function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
1589
1523
  return eventUiBases;
1590
1524
  }
1591
1525
  function buildViewUiProps(calendarContext) {
1592
- let { options } = calendarContext;
1526
+ const { options } = calendarContext;
1593
1527
  return {
1594
1528
  eventUiSingleBase: createEventUi({
1595
1529
  display: options.eventDisplay,
@@ -1599,11 +1533,9 @@ function buildViewUiProps(calendarContext) {
1599
1533
  constraint: options.eventConstraint,
1600
1534
  overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,
1601
1535
  allow: options.eventAllow,
1602
- backgroundColor: options.eventBackgroundColor,
1603
- borderColor: options.eventBorderColor,
1604
- textColor: options.eventTextColor,
1605
- color: options.eventColor,
1606
- // 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
1607
1539
  }, calendarContext),
1608
1540
  selectionConfig: createEventUi({
1609
1541
  constraint: options.selectConstraint,
@@ -1623,74 +1555,14 @@ function computeIsLoading(state, context) {
1623
1555
  function parseContextBusinessHours(calendarContext) {
1624
1556
  return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
1625
1557
  }
1626
- function warnUnknownOptions(options, viewName) {
1627
- for (let optionName in options) {
1628
- console.warn(`Unknown option '${optionName}'` +
1629
- (viewName ? ` for view '${viewName}'` : ''));
1630
- }
1631
- }
1632
-
1633
- class ToolbarSection extends BaseComponent {
1634
- render() {
1635
- let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
1636
- return createElement('div', {
1637
- className: 'fc-toolbar-section fc-toolbar-' + this.props.name
1638
- }, ...children);
1639
- }
1640
- renderWidgetGroup(widgetGroup) {
1641
- let { props, context } = this;
1642
- let { options, theme } = context;
1643
- let children = [];
1644
- let isOnlyButtons = true;
1645
- let isOnlyView = true;
1646
- for (const widget of widgetGroup) {
1647
- const { buttonName, isView } = widget;
1648
- if (buttonName === 'title') {
1649
- isOnlyButtons = false;
1650
- }
1651
- else if (!isView) {
1652
- isOnlyView = false;
1653
- }
1558
+ function filterKnownOptions(options, optionRefiners) {
1559
+ const knownOptions = {};
1560
+ for (const optionName in options) {
1561
+ if (optionRefiners[optionName]) {
1562
+ knownOptions[optionName] = options[optionName];
1654
1563
  }
1655
- for (let widget of widgetGroup) {
1656
- let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
1657
- if (buttonName === 'title') {
1658
- children.push(createElement("div", { role: 'heading', "aria-level": options.headingLevel, id: props.titleId, className: 'fc-toolbar-title' }, props.title));
1659
- }
1660
- else {
1661
- let isPressed = buttonName === props.activeButton;
1662
- let isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
1663
- (!props.isPrevEnabled && buttonName === 'prev') ||
1664
- (!props.isNextEnabled && buttonName === 'next');
1665
- children.push(createElement("button", Object.assign({ type: "button", disabled: isDisabled }, ((isOnlyButtons && isOnlyView)
1666
- ? { 'role': 'tab', 'aria-selected': isPressed }
1667
- : { 'aria-pressed': isPressed }), { "aria-label": typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, className: joinClassNames(`fc-${buttonName}-button`, theme.getClassName('button'), isPressed && theme.getClassName('buttonActive')), onClick: buttonClick }), buttonText || (buttonIcon ? createElement("span", { className: buttonIcon, "aria-hidden": true }) : '')));
1668
- }
1669
- }
1670
- if (children.length > 1) {
1671
- return createElement('div', {
1672
- role: (isOnlyButtons && isOnlyView) ? 'tablist' : undefined,
1673
- 'aria-label': (isOnlyButtons && isOnlyView) ? options.viewChangeHint : undefined,
1674
- className: isOnlyButtons ? theme.getClassName('buttonGroup') : undefined,
1675
- }, ...children);
1676
- }
1677
- return children[0];
1678
- }
1679
- }
1680
-
1681
- class Toolbar extends BaseComponent {
1682
- render() {
1683
- let { model, className } = this.props;
1684
- let { sectionWidgets } = model;
1685
- return (createElement("div", { className: joinClassNames(className, 'fc-toolbar') },
1686
- this.renderSection('start', sectionWidgets.start),
1687
- this.renderSection('center', sectionWidgets.center),
1688
- this.renderSection('end', sectionWidgets.end)));
1689
- }
1690
- renderSection(key, widgetGroups) {
1691
- let { props } = this;
1692
- return (createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, titleId: props.titleId, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
1693
1564
  }
1565
+ return knownOptions;
1694
1566
  }
1695
1567
 
1696
1568
  /*
@@ -1713,7 +1585,7 @@ class EventClicking extends Interaction {
1713
1585
  });
1714
1586
  }
1715
1587
  };
1716
- 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
1717
1589
  this.handleSegClick);
1718
1590
  }
1719
1591
  }
@@ -1743,7 +1615,7 @@ class EventHovering extends Interaction {
1743
1615
  this.triggerEvent('eventMouseLeave', ev, segEl);
1744
1616
  }
1745
1617
  };
1746
- 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
1747
1619
  this.handleSegEnter, this.handleSegLeave);
1748
1620
  }
1749
1621
  destroy() {
@@ -1764,20 +1636,123 @@ class EventHovering extends Interaction {
1764
1636
  }
1765
1637
  }
1766
1638
 
1767
- class ViewHarness extends Component {
1639
+ class ButtonIcon extends BaseComponent {
1640
+ render() {
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 {
1768
1742
  render() {
1769
- const { props } = this;
1770
- return (createElement("div", { className: joinClassNames('fc-view-outer', props.height != null
1771
- ? 'fc-view-outer-static'
1772
- : props.heightLiquid
1773
- ? 'fc-view-outer-liquid'
1774
- : props.aspectRatio != null
1775
- && 'fc-view-outer-aspect-ratio'), style: {
1776
- height: props.height,
1777
- paddingBottom: props.aspectRatio != null
1778
- ? `${(1 / props.aspectRatio) * 100}%`
1779
- : undefined
1780
- } }, props.children));
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 }));
1781
1756
  }
1782
1757
  }
1783
1758
 
@@ -1786,7 +1761,6 @@ class CalendarContent extends PureComponent {
1786
1761
  super(...arguments);
1787
1762
  this.buildViewContext = memoize(buildViewContext);
1788
1763
  this.buildViewPropTransformers = memoize(buildViewPropTransformers);
1789
- this.buildToolbarProps = memoize(buildToolbarProps);
1790
1764
  this.interactionsStore = {};
1791
1765
  this.viewTitleId = getUniqueDomId();
1792
1766
  // Component Registration
@@ -1820,10 +1794,9 @@ class CalendarContent extends PureComponent {
1820
1794
  renders INSIDE of an outer div
1821
1795
  */
1822
1796
  render() {
1797
+ var _a;
1823
1798
  let { props } = this;
1824
- let { toolbarConfig, options } = props;
1825
- let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
1826
- props.viewTitle);
1799
+ let { toolbarProps, toolbarConfig, options } = props;
1827
1800
  let viewHeight;
1828
1801
  let viewHeightLiquid = false;
1829
1802
  let viewAspectRatio;
@@ -1837,13 +1810,19 @@ class CalendarContent extends PureComponent {
1837
1810
  else {
1838
1811
  viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
1839
1812
  }
1840
- 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
1841
1815
  return (createElement(ViewContextType.Provider, { value: viewContext },
1842
- toolbarConfig.header && (createElement(Toolbar, Object.assign({ className: "fc-header-toolbar", model: toolbarConfig.header, titleId: this.viewTitleId }, toolbarProps))),
1843
- createElement(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
1844
- this.renderView(props, toolbarProps.title),
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),
1845
1824
  this.buildAppendContent()),
1846
- 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)))));
1847
1826
  }
1848
1827
  componentDidMount() {
1849
1828
  let { props } = this;
@@ -1874,10 +1853,17 @@ class CalendarContent extends PureComponent {
1874
1853
  let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
1875
1854
  return createElement(Fragment, {}, ...children);
1876
1855
  }
1877
- renderView(props, title) {
1878
- let { pluginHooks } = props;
1879
- let { viewSpec, toolbarConfig } = 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;
1880
1865
  let viewProps = {
1866
+ className,
1881
1867
  dateProfile: props.dateProfile,
1882
1868
  businessHours: props.businessHours,
1883
1869
  eventStore: props.renderableEventStore,
@@ -1889,6 +1875,10 @@ class CalendarContent extends PureComponent {
1889
1875
  forPrint: props.forPrint,
1890
1876
  labelId: toolbarConfig.header && toolbarConfig.header.hasTitle ? this.viewTitleId : undefined,
1891
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,
1892
1882
  };
1893
1883
  let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
1894
1884
  for (let transformer of transformers) {
@@ -1898,20 +1888,6 @@ class CalendarContent extends PureComponent {
1898
1888
  return (createElement(ViewComponent, Object.assign({}, viewProps)));
1899
1889
  }
1900
1890
  }
1901
- function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
1902
- // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid
1903
- let todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason
1904
- let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);
1905
- let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);
1906
- return {
1907
- title,
1908
- activeButton: viewSpec.type,
1909
- navUnit: viewSpec.singleUnit,
1910
- isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
1911
- isPrevEnabled: prevInfo.isValid,
1912
- isNextEnabled: nextInfo.isValid,
1913
- };
1914
- }
1915
1891
  // Plugin
1916
1892
  // -----------------------------------------------------------------------------------------------------------------
1917
1893
  function buildViewPropTransformers(theClasses) {
@@ -1924,9 +1900,10 @@ Vanilla JS API
1924
1900
  class Calendar extends CalendarImpl {
1925
1901
  constructor(el, optionOverrides = {}) {
1926
1902
  super();
1903
+ this.buildToolbarProps = memoize(buildToolbarProps);
1927
1904
  this.isRendering = false;
1928
1905
  this.isRendered = false;
1929
- this.currentClassNames = [];
1906
+ this.currentClassName = '';
1930
1907
  this.customContentRenderId = 0;
1931
1908
  this.handleAction = (action) => {
1932
1909
  // actions we know we want to render immediately
@@ -1945,22 +1922,25 @@ class Calendar extends CalendarImpl {
1945
1922
  this.isRendered = true;
1946
1923
  let { currentData } = this;
1947
1924
  flushSync(() => {
1948
- render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, forPrint) => {
1949
- 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);
1950
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);
1951
1931
  return (createElement(RenderId.Provider, { value: this.customContentRenderId },
1952
- createElement(CalendarContent, Object.assign({ forPrint: forPrint }, currentData))));
1932
+ createElement(CalendarContent, Object.assign({ forPrint: forPrint, toolbarProps: toolbarProps }, currentData))));
1953
1933
  }), this.el);
1954
1934
  });
1955
1935
  }
1956
1936
  else if (this.isRendered) {
1957
1937
  this.isRendered = false;
1958
1938
  render(null, this.el);
1959
- this.setClassNames([]);
1939
+ this.setIsRtl(false);
1940
+ this.setClassName('');
1960
1941
  this.setHeight('');
1961
1942
  }
1962
1943
  };
1963
- ensureElHasStyles(el);
1964
1944
  this.el = el;
1965
1945
  this.renderRunner = new DelayedRunner(this.handleRenderRequest);
1966
1946
  new CalendarDataManager({
@@ -1989,11 +1969,6 @@ class Calendar extends CalendarImpl {
1989
1969
  this.renderRunner.request();
1990
1970
  }
1991
1971
  }
1992
- updateSize() {
1993
- flushSync(() => {
1994
- super.updateSize();
1995
- });
1996
- }
1997
1972
  batchRendering(func) {
1998
1973
  this.renderRunner.pause('batchRendering');
1999
1974
  func();
@@ -2008,21 +1983,170 @@ class Calendar extends CalendarImpl {
2008
1983
  resetOptions(optionOverrides, changedOptionNames) {
2009
1984
  this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);
2010
1985
  }
2011
- setClassNames(classNames) {
2012
- 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) {
2013
2040
  let { classList } = this.el;
2014
- for (let className of this.currentClassNames) {
2015
- classList.remove(className);
2041
+ for (let singleClassName of this.currentClassName.split(' ')) {
2042
+ if (singleClassName) {
2043
+ classList.remove(singleClassName);
2044
+ }
2016
2045
  }
2017
- for (let className of classNames) {
2018
- classList.add(className);
2046
+ for (let singleClassName of className.split(' ')) {
2047
+ if (singleClassName) {
2048
+ classList.add(singleClassName);
2049
+ }
2019
2050
  }
2020
- this.currentClassNames = classNames;
2051
+ this.currentClassName = className;
2021
2052
  }
2022
2053
  }
2023
2054
  setHeight(height) {
2024
2055
  applyStyleProp(this.el, 'height', height);
2025
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
+ }
2026
2150
  }
2027
2151
 
2028
2152
  function formatDate(dateInput, options = {}) {
@@ -2034,7 +2158,7 @@ function formatDate(dateInput, options = {}) {
2034
2158
  }
2035
2159
  return dateEnv.format(dateMeta.marker, formatter, {
2036
2160
  forcedTzo: dateMeta.forcedTzo,
2037
- });
2161
+ })[0];
2038
2162
  }
2039
2163
  function formatRange(startInput, endInput, options) {
2040
2164
  let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object
@@ -2066,6 +2190,6 @@ function sliceEvents(props, allDay) {
2066
2190
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
2067
2191
  }
2068
2192
 
2069
- const version = '7.0.0-beta.4';
2193
+ const version = '7.0.0-beta.6';
2070
2194
 
2071
- export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
2195
+ export { Calendar, CalendarController, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };