@fullcalendar/core 6.1.15 → 7.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +42 -104
- package/index.d.ts +2 -1
- package/index.global.js +1338 -1656
- package/index.global.min.js +2 -2
- package/index.js +45 -107
- package/internal-common.cjs +2237 -2493
- package/internal-common.d.ts +137 -272
- package/internal-common.js +2227 -2478
- package/internal.cjs +12 -17
- package/internal.d.ts +2 -1
- package/internal.js +1 -1
- package/locales/af.global.js +1 -1
- package/locales/af.global.min.js +1 -1
- package/locales/ar-dz.global.js +1 -1
- package/locales/ar-dz.global.min.js +1 -1
- package/locales/ar-kw.global.js +1 -1
- package/locales/ar-kw.global.min.js +1 -1
- package/locales/ar-ly.global.js +1 -1
- package/locales/ar-ly.global.min.js +1 -1
- package/locales/ar-ma.global.js +1 -1
- package/locales/ar-ma.global.min.js +1 -1
- package/locales/ar-sa.global.js +1 -1
- package/locales/ar-sa.global.min.js +1 -1
- package/locales/ar-tn.global.js +1 -1
- package/locales/ar-tn.global.min.js +1 -1
- package/locales/ar.global.js +1 -1
- package/locales/ar.global.min.js +1 -1
- package/locales/az.global.js +1 -1
- package/locales/az.global.min.js +1 -1
- package/locales/bg.global.js +1 -1
- package/locales/bg.global.min.js +1 -1
- package/locales/bn.global.js +1 -1
- package/locales/bn.global.min.js +1 -1
- package/locales/bs.global.js +1 -1
- package/locales/bs.global.min.js +1 -1
- package/locales/ca.global.js +1 -1
- package/locales/ca.global.min.js +1 -1
- package/locales/cs.global.js +1 -1
- package/locales/cs.global.min.js +1 -1
- package/locales/cy.global.js +1 -1
- package/locales/cy.global.min.js +1 -1
- package/locales/da.global.js +1 -1
- package/locales/da.global.min.js +1 -1
- package/locales/de-at.global.js +1 -1
- package/locales/de-at.global.min.js +1 -1
- package/locales/de.global.js +1 -1
- package/locales/de.global.min.js +1 -1
- package/locales/el.global.js +1 -1
- package/locales/el.global.min.js +1 -1
- package/locales/en-au.global.js +1 -1
- package/locales/en-au.global.min.js +1 -1
- package/locales/en-gb.global.js +1 -1
- package/locales/en-gb.global.min.js +1 -1
- package/locales/en-nz.global.js +1 -1
- package/locales/en-nz.global.min.js +1 -1
- package/locales/eo.global.js +1 -1
- package/locales/eo.global.min.js +1 -1
- package/locales/es-us.global.js +1 -1
- package/locales/es-us.global.min.js +1 -1
- package/locales/es.global.js +1 -1
- package/locales/es.global.min.js +1 -1
- package/locales/et.global.js +1 -1
- package/locales/et.global.min.js +1 -1
- package/locales/eu.global.js +1 -1
- package/locales/eu.global.min.js +1 -1
- package/locales/fa.global.js +1 -1
- package/locales/fa.global.min.js +1 -1
- package/locales/fi.global.js +1 -1
- package/locales/fi.global.min.js +1 -1
- package/locales/fr-ca.global.js +1 -1
- package/locales/fr-ca.global.min.js +1 -1
- package/locales/fr-ch.global.js +1 -1
- package/locales/fr-ch.global.min.js +1 -1
- package/locales/fr.global.js +1 -1
- package/locales/fr.global.min.js +1 -1
- package/locales/gl.global.js +1 -1
- package/locales/gl.global.min.js +1 -1
- package/locales/he.global.js +1 -1
- package/locales/he.global.min.js +1 -1
- package/locales/hi.global.js +1 -1
- package/locales/hi.global.min.js +1 -1
- package/locales/hr.global.js +1 -1
- package/locales/hr.global.min.js +1 -1
- package/locales/hu.global.js +1 -1
- package/locales/hu.global.min.js +1 -1
- package/locales/hy-am.global.js +1 -1
- package/locales/hy-am.global.min.js +1 -1
- package/locales/id.global.js +1 -1
- package/locales/id.global.min.js +1 -1
- package/locales/is.global.js +1 -1
- package/locales/is.global.min.js +1 -1
- package/locales/it.global.js +1 -1
- package/locales/it.global.min.js +1 -1
- package/locales/ja.global.js +1 -1
- package/locales/ja.global.min.js +1 -1
- package/locales/ka.global.js +1 -1
- package/locales/ka.global.min.js +1 -1
- package/locales/kk.global.js +1 -1
- package/locales/kk.global.min.js +1 -1
- package/locales/km.global.js +1 -1
- package/locales/km.global.min.js +1 -1
- package/locales/ko.global.js +1 -1
- package/locales/ko.global.min.js +1 -1
- package/locales/ku.global.js +1 -1
- package/locales/ku.global.min.js +1 -1
- package/locales/lb.global.js +1 -1
- package/locales/lb.global.min.js +1 -1
- package/locales/lt.global.js +1 -1
- package/locales/lt.global.min.js +1 -1
- package/locales/lv.global.js +1 -1
- package/locales/lv.global.min.js +1 -1
- package/locales/mk.global.js +1 -1
- package/locales/mk.global.min.js +1 -1
- package/locales/ms.global.js +1 -1
- package/locales/ms.global.min.js +1 -1
- package/locales/nb.global.js +1 -1
- package/locales/nb.global.min.js +1 -1
- package/locales/ne.global.js +1 -1
- package/locales/ne.global.min.js +1 -1
- package/locales/nl.global.js +1 -1
- package/locales/nl.global.min.js +1 -1
- package/locales/nn.global.js +1 -1
- package/locales/nn.global.min.js +1 -1
- package/locales/pl.global.js +1 -1
- package/locales/pl.global.min.js +1 -1
- package/locales/pt-br.global.js +1 -1
- package/locales/pt-br.global.min.js +1 -1
- package/locales/pt.global.js +1 -1
- package/locales/pt.global.min.js +1 -1
- package/locales/ro.global.js +1 -1
- package/locales/ro.global.min.js +1 -1
- package/locales/ru.global.js +1 -1
- package/locales/ru.global.min.js +1 -1
- package/locales/si-lk.global.js +1 -1
- package/locales/si-lk.global.min.js +1 -1
- package/locales/sk.global.js +1 -1
- package/locales/sk.global.min.js +1 -1
- package/locales/sl.global.js +1 -1
- package/locales/sl.global.min.js +1 -1
- package/locales/sm.global.js +1 -1
- package/locales/sm.global.min.js +1 -1
- package/locales/sq.global.js +1 -1
- package/locales/sq.global.min.js +1 -1
- package/locales/sr-cyrl.global.js +1 -1
- package/locales/sr-cyrl.global.min.js +1 -1
- package/locales/sr.global.js +1 -1
- package/locales/sr.global.min.js +1 -1
- package/locales/sv.global.js +1 -1
- package/locales/sv.global.min.js +1 -1
- package/locales/ta-in.global.js +1 -1
- package/locales/ta-in.global.min.js +1 -1
- package/locales/th.global.js +1 -1
- package/locales/th.global.min.js +1 -1
- package/locales/tr.global.js +1 -1
- package/locales/tr.global.min.js +1 -1
- package/locales/ug.global.js +1 -1
- package/locales/ug.global.min.js +1 -1
- package/locales/uk.global.js +1 -1
- package/locales/uk.global.min.js +1 -1
- package/locales/uz-cy.global.js +1 -1
- package/locales/uz-cy.global.min.js +1 -1
- package/locales/uz.global.js +1 -1
- package/locales/uz.global.min.js +1 -1
- package/locales/vi.global.js +1 -1
- package/locales/vi.global.min.js +1 -1
- package/locales/zh-cn.global.js +1 -1
- package/locales/zh-cn.global.min.js +1 -1
- package/locales/zh-tw.global.js +1 -1
- package/locales/zh-tw.global.min.js +1 -1
- package/locales-all.global.js +1 -1
- package/locales-all.global.min.js +1 -1
- package/package.json +2 -2
- package/preact.js +1 -1
package/index.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Core
|
|
2
|
+
FullCalendar Core v7.0.0-beta.0
|
|
3
3
|
Docs & License: https://fullcalendar.io
|
|
4
4
|
(c) 2024 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -86,7 +86,7 @@ var FullCalendar = (function (exports) {
|
|
|
86
86
|
registerStylesRoot(document);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}";
|
|
89
|
+
var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc{display:flex;flex-direction:column;gap:1.5em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-flex-row{display:flex;flex-direction:row}.fc-flex-column{display:flex;flex-direction:column}.fc-grow{flex-grow:1}.fc-basis0,.fc-liquid{flex-basis:0}.fc-liquid{flex-grow:1;min-height:0;min-width:0}.fc-row{display:flex;flex-direction:row}.fc-rowgroup{display:flex;flex-direction:column}.fc-row,.fc-rowdivider,.fc-rowgroup{border-color:var(--fc-border-color);border-style:solid;border-width:1px 0 0}.fc-row:first-child:not(.fc-not-first),.fc-rowdivider+.fc-row,.fc-rowdivider+.fc-rowgroup,.fc-rowdivider:first-child,.fc-rowgroup:first-child,.fc-sticky-header+.fc-row,.fc-sticky-header+.fc-rowgroup{border-top-width:0}.fc-cell,.fc-celldivider{border:0 solid var(--fc-border-color)}.fc-cell{margin:0!important;padding:0!important}.fc-cell-inner{overflow:hidden;white-space:nowrap}.fc-direction-ltr .fc-cell,.fc-direction-ltr .fc-celldivider{border-left-width:1px}.fc-direction-ltr .fc-cell:first-child:not(.fc-not-first),.fc-direction-ltr .fc-celldivider+.fc-cell{border-left-width:0}.fc-direction-ltr .fc-celldivider,.fc-direction-rtl .fc-cell,.fc-direction-rtl .fc-celldivider{border-right-width:1px}.fc-direction-rtl .fc-cell:first-child:not(.fc-not-first),.fc-direction-rtl .fc-celldivider+.fc-cell{border-right-width:0}.fc-direction-rtl .fc-celldivider{border-left-width:1px}.fc-cell:only-child{flex-basis:0;flex-grow:1;min-width:0}.fc-celldivider,.fc-rowdivider{background:var(--fc-neutral-bg-color)}.fc-celldivider{padding-left:2px}.fc-rowdivider{padding-bottom:2px}.fc-rowdivider,.fc-sticky-header{border-bottom-width:1px}.fc-rel{position:relative}.fc-abs{position:absolute}.fc-fill{bottom:0;top:0}.fc-fill,.fc-fill-x{left:0;position:absolute;right:0}.fc-fill-y{bottom:0;position:absolute;top:0}.fc-sticky-y{bottom:0;position:sticky;top:0}.fc-sticky-x{left:0;position:sticky;right:0}.fc-sticky-header{background:var(--fc-page-bg-color);position:sticky;top:0;z-index:9999}.fc-sticky-footer{bottom:0;position:sticky;z-index:9999}.fc-content-box{box-sizing:content-box}.fc-border{border:1px solid var(--fc-border-color)}.fc-offscreen{left:-10000px;position:absolute}.fc-shaded{background-color:var(--fc-neutral-bg-color)}.fc-padding-sm{padding:2px 4px}.fc-padding-md{padding:4px 5px}.fc-padding-lg{padding:8px}.fc-justify-center{justify-content:center}.fc-align-center{align-items:center}.fc-align-start{align-items:flex-start}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-view-harness{position:relative}.fc-view-harness-fixedheight,.fc-view-harness-liquid{display:flex;flex-direction:column}.fc-view-harness-fixedheight>.fc-view,.fc-view-harness-liquid,.fc-view-harness-liquid>.fc-view{flex-basis:0;flex-grow:1;min-height:0}.fc-view-harness-aspectratio>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-event-inner{position:relative;z-index:2}.fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-bg-event,.fc-highlight,.fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc-non-business{background:var(--fc-non-business-color)}.fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc-highlight{background:var(--fc-highlight-color)}.fc-day-disabled{background:var(--fc-neutral-bg-color)}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:flex;flex-direction:column;position:relative}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-h-event .fc-event-inner{color:var(--fc-event-text-color);display:flex;flex-direction:row;flex-grow:1;min-width:0}.fc-h-event .fc-event-time,.fc-h-event .fc-event-title{overflow:hidden;white-space:nowrap}.fc-h-event .fc-event-title-outer{display:flex;flex-basis:0;flex-direction:row;flex-grow:1;min-width:0}.fc-h-event .fc-event-title{left:0;position:sticky;right:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc-popover-title{margin:0 2px}.fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}.fc-scroller-nobars{-ms-overflow-style:none;scrollbar-width:none}.fc-scroller-nobars::-webkit-scrollbar{display:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc-button{-webkit-appearance:button}.fc-button:not(:disabled){cursor:pointer}.fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc-button:hover{text-decoration:none}.fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc-button:disabled{opacity:.65}.fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button-primary:not(:disabled).fc-button-active,.fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc-button-primary:not(:disabled).fc-button-active:focus,.fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc-button-group>.fc-button.fc-button-active,.fc-button-group>.fc-button:active,.fc-button-group>.fc-button:focus,.fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc-toolbar{align-items:center;display:flex;flex-direction:row;gap:.75em;justify-content:space-between}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc-toolbar-chunk{display:flex;flex-direction:row;flex-shrink:0;gap:.75em}.fc-toolbar-title{font-size:1.75em;margin:0;white-space:nowrap}";
|
|
90
90
|
injectStyles(css_248z);
|
|
91
91
|
|
|
92
92
|
function removeElement(el) {
|
|
@@ -375,20 +375,6 @@ var FullCalendar = (function (exports) {
|
|
|
375
375
|
function isInt(n) {
|
|
376
376
|
return n % 1 === 0;
|
|
377
377
|
}
|
|
378
|
-
/* FC-specific DOM dimension stuff
|
|
379
|
-
----------------------------------------------------------------------------------------------------------------------*/
|
|
380
|
-
function computeSmallestCellWidth(cellEl) {
|
|
381
|
-
let allWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-frame');
|
|
382
|
-
let contentWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-cushion');
|
|
383
|
-
if (!allWidthEl) {
|
|
384
|
-
throw new Error('needs fc-scrollgrid-shrink-frame className'); // TODO: use const
|
|
385
|
-
}
|
|
386
|
-
if (!contentWidthEl) {
|
|
387
|
-
throw new Error('needs fc-scrollgrid-shrink-cushion className');
|
|
388
|
-
}
|
|
389
|
-
return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + // the cell padding+border
|
|
390
|
-
contentWidthEl.getBoundingClientRect().width;
|
|
391
|
-
}
|
|
392
378
|
|
|
393
379
|
const INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds'];
|
|
394
380
|
const PARSE_RE = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;
|
|
@@ -1463,8 +1449,6 @@ var FullCalendar = (function (exports) {
|
|
|
1463
1449
|
dropAccept: identity,
|
|
1464
1450
|
eventOrder: parseFieldSpecs,
|
|
1465
1451
|
eventOrderStrict: Boolean,
|
|
1466
|
-
handleWindowResize: Boolean,
|
|
1467
|
-
windowResizeDelay: Number,
|
|
1468
1452
|
longPressDelay: Number,
|
|
1469
1453
|
eventDragMinDistance: Number,
|
|
1470
1454
|
expandRows: Boolean,
|
|
@@ -1614,8 +1598,6 @@ var FullCalendar = (function (exports) {
|
|
|
1614
1598
|
dropAccept: '*',
|
|
1615
1599
|
eventOrder: 'start,-duration,allDay,title',
|
|
1616
1600
|
dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },
|
|
1617
|
-
handleWindowResize: true,
|
|
1618
|
-
windowResizeDelay: 100,
|
|
1619
1601
|
longPressDelay: 1000,
|
|
1620
1602
|
eventDragMinDistance: 5,
|
|
1621
1603
|
expandRows: false,
|
|
@@ -1634,7 +1616,6 @@ var FullCalendar = (function (exports) {
|
|
|
1634
1616
|
eventAdd: identity,
|
|
1635
1617
|
eventChange: identity,
|
|
1636
1618
|
eventRemove: identity,
|
|
1637
|
-
windowResize: identity,
|
|
1638
1619
|
eventClick: identity,
|
|
1639
1620
|
eventMouseEnter: identity,
|
|
1640
1621
|
eventMouseLeave: identity,
|
|
@@ -1647,8 +1628,7 @@ var FullCalendar = (function (exports) {
|
|
|
1647
1628
|
_afterprint: identity,
|
|
1648
1629
|
_noEventDrop: identity,
|
|
1649
1630
|
_noEventResize: identity,
|
|
1650
|
-
|
|
1651
|
-
_scrollRequest: identity,
|
|
1631
|
+
_timeScrollRequest: identity,
|
|
1652
1632
|
};
|
|
1653
1633
|
// calendar-specific options
|
|
1654
1634
|
// -------------------------
|
|
@@ -1897,6 +1877,9 @@ var FullCalendar = (function (exports) {
|
|
|
1897
1877
|
}
|
|
1898
1878
|
return [];
|
|
1899
1879
|
}
|
|
1880
|
+
function fracToCssDim(frac) {
|
|
1881
|
+
return frac * 100 + '%';
|
|
1882
|
+
}
|
|
1900
1883
|
|
|
1901
1884
|
// TODO: better called "EventSettings" or "EventConfig"
|
|
1902
1885
|
// TODO: move this file into structs
|
|
@@ -2232,33 +2215,6 @@ var FullCalendar = (function (exports) {
|
|
|
2232
2215
|
};
|
|
2233
2216
|
}
|
|
2234
2217
|
|
|
2235
|
-
let canVGrowWithinCell;
|
|
2236
|
-
function getCanVGrowWithinCell() {
|
|
2237
|
-
if (canVGrowWithinCell == null) {
|
|
2238
|
-
canVGrowWithinCell = computeCanVGrowWithinCell();
|
|
2239
|
-
}
|
|
2240
|
-
return canVGrowWithinCell;
|
|
2241
|
-
}
|
|
2242
|
-
function computeCanVGrowWithinCell() {
|
|
2243
|
-
// for SSR, because this function is call immediately at top-level
|
|
2244
|
-
// TODO: just make this logic execute top-level, immediately, instead of doing lazily
|
|
2245
|
-
if (typeof document === 'undefined') {
|
|
2246
|
-
return true;
|
|
2247
|
-
}
|
|
2248
|
-
let el = document.createElement('div');
|
|
2249
|
-
el.style.position = 'absolute';
|
|
2250
|
-
el.style.top = '0px';
|
|
2251
|
-
el.style.left = '0px';
|
|
2252
|
-
el.innerHTML = '<table><tr><td><div></div></td></tr></table>';
|
|
2253
|
-
el.querySelector('table').style.height = '100px';
|
|
2254
|
-
el.querySelector('div').style.height = '100%';
|
|
2255
|
-
document.body.appendChild(el);
|
|
2256
|
-
let div = el.querySelector('div');
|
|
2257
|
-
let possible = div.offsetHeight > 0;
|
|
2258
|
-
document.body.removeChild(el);
|
|
2259
|
-
return possible;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
2218
|
const EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere
|
|
2263
2219
|
class Splitter {
|
|
2264
2220
|
constructor() {
|
|
@@ -2289,9 +2245,9 @@ var FullCalendar = (function (exports) {
|
|
|
2289
2245
|
dateSelection: dateSelections[key] || null,
|
|
2290
2246
|
eventStore,
|
|
2291
2247
|
eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),
|
|
2292
|
-
eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',
|
|
2293
2248
|
eventDrag: eventDrags[key] || null,
|
|
2294
2249
|
eventResize: eventResizes[key] || null,
|
|
2250
|
+
eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',
|
|
2295
2251
|
};
|
|
2296
2252
|
}
|
|
2297
2253
|
return splitProps;
|
|
@@ -2505,7 +2461,6 @@ var FullCalendar = (function (exports) {
|
|
|
2505
2461
|
else {
|
|
2506
2462
|
if (meta.isToday) {
|
|
2507
2463
|
classNames.push('fc-day-today');
|
|
2508
|
-
classNames.push(theme.getClass('today'));
|
|
2509
2464
|
}
|
|
2510
2465
|
if (meta.isPast) {
|
|
2511
2466
|
classNames.push('fc-day-past');
|
|
@@ -2530,7 +2485,6 @@ var FullCalendar = (function (exports) {
|
|
|
2530
2485
|
else {
|
|
2531
2486
|
if (meta.isToday) {
|
|
2532
2487
|
classNames.push('fc-slot-today');
|
|
2533
|
-
classNames.push(theme.getClass('today'));
|
|
2534
2488
|
}
|
|
2535
2489
|
if (meta.isPast) {
|
|
2536
2490
|
classNames.push('fc-slot-past');
|
|
@@ -2542,6 +2496,101 @@ var FullCalendar = (function (exports) {
|
|
|
2542
2496
|
return classNames;
|
|
2543
2497
|
}
|
|
2544
2498
|
|
|
2499
|
+
// TODO: kill Component::safeSetState
|
|
2500
|
+
// TODO: kill
|
|
2501
|
+
function setStateDimMap(component, key, newMap) {
|
|
2502
|
+
const currentMap = component.state[key];
|
|
2503
|
+
if (!currentMap || !isDimMapsEqual(currentMap, newMap)) {
|
|
2504
|
+
component.setState({ [key]: newMap });
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
// TODO: kill
|
|
2508
|
+
function isDimMapsEqual(oldMap, newMap) {
|
|
2509
|
+
for (const key in newMap) {
|
|
2510
|
+
if (!isDimsEqual(oldMap[key], newMap[key])) {
|
|
2511
|
+
return false;
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
return true;
|
|
2515
|
+
}
|
|
2516
|
+
// TODO: kill
|
|
2517
|
+
function isDimsEqual(v0, v1) {
|
|
2518
|
+
return v0 != null && (v0 === v1 || Math.abs(v0 - v1) < 0.01);
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
const callbackMap = new Map();
|
|
2522
|
+
let flushedCallbackSet = new Set();
|
|
2523
|
+
let isHandling = false;
|
|
2524
|
+
/*
|
|
2525
|
+
Performant from multiple perspectives:
|
|
2526
|
+
- less memory with one ResizeObserver
|
|
2527
|
+
- batches firing
|
|
2528
|
+
*/
|
|
2529
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
2530
|
+
isHandling = true;
|
|
2531
|
+
for (let entry of entries) {
|
|
2532
|
+
const callback = callbackMap.get(entry.target);
|
|
2533
|
+
if (entry.contentBoxSize) {
|
|
2534
|
+
// The standard makes contentBoxSize an array...
|
|
2535
|
+
if (entry.contentBoxSize[0]) {
|
|
2536
|
+
callback(entry.contentBoxSize[0].inlineSize, entry.contentBoxSize[0].blockSize);
|
|
2537
|
+
}
|
|
2538
|
+
else {
|
|
2539
|
+
// ...but old versions of Firefox treat it as a single item
|
|
2540
|
+
callback(entry.contentBoxSize.inlineSize, entry.contentBoxSize.blockSize);
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
else {
|
|
2544
|
+
callback(entry.contentRect.width, entry.contentRect.height);
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
for (const flushedCallback of flushedCallbackSet.values()) {
|
|
2548
|
+
flushedCallback();
|
|
2549
|
+
flushedCallbackSet.delete(flushedCallback);
|
|
2550
|
+
}
|
|
2551
|
+
isHandling = false;
|
|
2552
|
+
});
|
|
2553
|
+
/*
|
|
2554
|
+
PRECONDITIONS:
|
|
2555
|
+
- element can only have one listener attached ever
|
|
2556
|
+
- element cannot have border or padding
|
|
2557
|
+
|
|
2558
|
+
TODO:
|
|
2559
|
+
- always force border/padding on these elements to `0 !important` ???
|
|
2560
|
+
*/
|
|
2561
|
+
function watchSize(el, callback) {
|
|
2562
|
+
callbackMap.set(el, callback);
|
|
2563
|
+
resizeObserver.observe(el);
|
|
2564
|
+
return () => {
|
|
2565
|
+
callbackMap.delete(el);
|
|
2566
|
+
resizeObserver.unobserve(el);
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
function watchWidth(el, callback) {
|
|
2570
|
+
let currentWidth;
|
|
2571
|
+
return watchSize(el, (width) => {
|
|
2572
|
+
if (currentWidth == null || currentWidth !== width) {
|
|
2573
|
+
callback(currentWidth = width);
|
|
2574
|
+
}
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2577
|
+
function watchHeight(el, callback) {
|
|
2578
|
+
let currentHeight;
|
|
2579
|
+
return watchSize(el, (_width, height) => {
|
|
2580
|
+
if (currentHeight == null || currentHeight !== height) {
|
|
2581
|
+
callback(currentHeight = height);
|
|
2582
|
+
}
|
|
2583
|
+
});
|
|
2584
|
+
}
|
|
2585
|
+
function afterSize(callback) {
|
|
2586
|
+
if (isHandling) {
|
|
2587
|
+
flushedCallbackSet.add(callback);
|
|
2588
|
+
}
|
|
2589
|
+
else {
|
|
2590
|
+
callback(); // TODO: should we queue microtask?
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2545
2594
|
const DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });
|
|
2546
2595
|
const WEEK_FORMAT = createFormatter({ week: 'long' });
|
|
2547
2596
|
function buildNavLinkAttrs(context, dateMarker, viewType = 'day', isTabbable = true) {
|
|
@@ -3024,16 +3073,19 @@ var FullCalendar = (function (exports) {
|
|
|
3024
3073
|
Theme.prototype.baseIconClass = '';
|
|
3025
3074
|
Theme.prototype.iconOverridePrefix = '';
|
|
3026
3075
|
|
|
3027
|
-
var n,l$1,u$1,i$1,t,r$1,o,f$1,e$1,c$1={},s=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u$1:o};return null==o&&null!=l$1.vnode&&l$1.vnode(f),f}function d(){return {current:null}}function _(n){return n.children}function k$1(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||g$2(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||g$2(n,r,l[r],u[r],i);}function b$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function g$2(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||b$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||b$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?w$2:m$1,r):n.removeEventListener(l,r?w$2:m$1,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function m$1(n){t=!0;try{return this.l[n.type+!1](l$1.event?l$1.event(n):n)}finally{t=!1;}}function w$2(n){t=!0;try{return this.l[n.type+!0](l$1.event?l$1.event(n):n)}finally{t=!1;}}function x$1(n,l){this.props=n,this.context=l;}function A(n,l){if(null==l)return n.__?A(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?A(n):null}function P$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return P$1(n)}}function C$1(n){t?setTimeout(n):f$1(n);}function T$1(n){(!n.__d&&(n.__d=!0)&&r$1.push(n)&&!$$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||C$1)($$1);}function $$1(){var n,l,u,i,t,o,f,e;for(r$1.sort(function(n,l){return n.__v.__b-l.__v.__b});n=r$1.shift();)n.__d&&(l=r$1.length,i=void 0,t=void 0,f=(o=(u=n).__v).__e,(e=u.__P)&&(i=[],(t=h({},o)).__v=o.__v+1,M(e,o,t,u.__n,void 0!==e.ownerSVGElement,null!=o.__h?[f]:null,i,null==f?A(o):f,o.__h),N(i,o),o.__e!=f&&P$1(o)),r$1.length>l&&r$1.sort(function(n,l){return n.__v.__b-l.__v.__b}));$$1.__r=0;}function H$1(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,b,g,m=i&&i.__k||s,w=m.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(d=u.__k[h]=null==(d=l[h])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?p(null,d,null,null,d):Array.isArray(d)?p(_,{children:d},null,null,null):d.__b>0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=m[h])||y&&d.key==y.key&&d.type===y.type)m[h]=void 0;else for(v=0;v<w;v++){if((y=m[v])&&d.key==y.key&&d.type===y.type){m[v]=void 0;break}y=null;}M(n,d,y=y||c$1,t,r,o,f,e,a),k=d.__e,(v=d.ref)&&y.ref!=v&&(g||(g=[]),y.ref&&g.push(y.ref,null,d),g.push(v,d.__c||k,d)),null!=k?(null==b&&(b=k),"function"==typeof d.type&&d.__k===y.__k?d.__d=e=I$1(d,e,n):e=z$1(n,d,y,m,k,e),"function"==typeof u.type&&(u.__d=e)):e&&y.__e==e&&e.parentNode!=n&&(e=A(y));}for(u.__e=b,h=w;h--;)null!=m[h]&&("function"==typeof u.type&&null!=m[h].__e&&m[h].__e==u.__d&&(u.__d=L$1(i).nextSibling),q(m[h],m[h]));if(g)for(h=0;h<g.length;h++)S(g[h],g[++h],g[++h]);}function I$1(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?I$1(i,l,u):z$1(u,i,i,t,i.__e,l));return l}function j$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){j$2(n,l);}):l.push(n)),l}function z$1(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else {for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,r),o=r;}return void 0!==o?o:t.nextSibling}function L$1(n){var l,u,i;if(null==n.type||"string"==typeof n.type)return n.__e;if(n.__k)for(l=n.__k.length-1;l>=0;l--)if((u=n.__k[l])&&(i=L$1(u)))return i;return null}function M(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,k,b,g,m,w,A,P,C,T,$=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof $){if(b=u.props,g=(s=$.contextType)&&t[s.__c],m=s?g?g.props.value:s.__:t,i.__c?k=(a=u.__c=i.__c).__=a.__E:("prototype"in $&&$.prototype.render?u.__c=a=new $(b,m):(u.__c=a=new x$1(b,m),a.constructor=$,a.render=B$1),g&&g.sub(a),a.props=b,a.state||(a.state={}),a.context=m,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=$.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,$.getDerivedStateFromProps(b,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==$.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else {if(null==$.getDerivedStateFromProps&&b!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,m),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(b,a.__s,m)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=b,a.state=a.__s,a.__d=!1),u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),w=0;w<a._sb.length;w++)a.__h.push(a._sb[w]);a._sb=[],a.__h.length&&f.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(b,a.__s,m),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,p,d);});}if(a.context=m,a.props=b,a.__P=n,A=l$1.__r,P=0,"prototype"in $&&$.prototype.render){for(a.state=a.__s,a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),C=0;C<a._sb.length;C++)a.__h.push(a._sb[C]);a._sb=[];}else do{a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),a.state=a.__s;}while(a.__d&&++P<25);a.state=a.__s,null!=a.getChildContext&&(t=h(h({},t),a.getChildContext())),v||null==a.getSnapshotBeforeUpdate||(d=a.getSnapshotBeforeUpdate(y,p)),T=null!=s&&s.type===_&&null==s.key?s.props.children:s,H$1(n,Array.isArray(T)?T:[T],u,i,t,r,o,f,e,c),a.base=u.__e,u.__h=null,a.__h.length&&f.push(a),k&&(a.__E=a.__=null),a.__e=!1;}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=O(i.__e,u,i,t,r,o,f,c);(s=l$1.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l$1.__e(n,u,i);}}function N(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function O(l,u,i,t,r,o,f,e){var s,a,h,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,e=!1;}if(null===d)y===p||e&&l.data===p||(l.data=p);else {if(o=o&&n.call(l.childNodes),a=(y=i.props||c$1).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!e){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""));}if(k$1(l,p,y,r,e),h)u.__k=[];else if(_=u.props.children,H$1(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&A(i,0),e),null!=o)for(_=o.length;_--;)null!=o[_]&&v$1(o[_]);e||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&g$2(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&g$2(l,"checked",_,y.checked,!1));}return l}function S(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function q(n,u,i){var t,r;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||S(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&q(t[r],u,i||"function"!=typeof n.type);i||null==n.__e||v$1(n.__e),n.__=n.__e=n.__d=void 0;}function B$1(n,l,u){return this.constructor(n,u)}function D$1(u,i,t){var r,o,f;l$1.__&&l$1.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],M(i,u=(!r&&t||i).__k=y(_,null,[u]),o||c$1,c$1,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),N(f,u);}function E(n,l){D$1(n,l,E);}function F$1(l,u,i){var t,r,o,f=h({},l.props);for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function G$1(n,l){var u={__c:l="__cC"+e$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,T$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l$1={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,i$1=function(n){return null!=n&&void 0===n.constructor},t=!1,x$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),T$1(this));},x$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),T$1(this));},x$1.prototype.render=_,r$1=[],f$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$$1.__r=0,e$1=0;
|
|
3076
|
+
var n,l$1,u$1,t,i$1,o,r$1,f$1,e$1,c$1,s$1,a$1,h={},p=[],v$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w$1(n){var l=n.parentNode;l&&l.removeChild(n);}function _(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g$1(l,f,i,o,null)}function g$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function m$1(){return {current:null}}function k$1(n){return n.children}function b(n,l){this.props=n,this.context=l;}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?x(n):null}function C$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$1(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!P$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||r$1)(P$1);}function P$1(){var n,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),O$1(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j$2(c,o,s),o.__e!=e&&C$1(o)),i$1.length>u&&i$1.sort(f$1));P$1.__r=0;}function S(n,l,u,t,i,o,r,f,e,c,s){var a,v,y,d,w,_=t&&t.__k||p,g=l.length;for(u.__d=e,$$1(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&"boolean"!=typeof y&&"function"!=typeof y&&(v=-1===y.__i?h:_[y.__i]||h,y.__i=a,O$1(n,y,v,i,o,r,f,e,c,s),d=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&N(v.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||v.__k===y.__k?e=I(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w;}function $$1(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g$1(null,i,null,null,null):y(i)?g$1(k$1,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=L$1(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a=f-r:f==r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r&&a++,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o));}function I(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(y(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function T$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||v$1.test(l)?u:u+"px";}function A$1(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e$1,n.addEventListener(l,o?s$1:c$1,o)):n.removeEventListener(l,o?s$1:c$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,o,r,f,e,c,s){var a,h,p,v,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof T)try{if(m=u.props,x="prototype"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new b(m,M),h.constructor=T,h.render=q),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),v=h.props,w=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(x&&null==T.getDerivedStateFromProps&&m!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,w,_);});}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l$1.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,w)),S(n,y(L=null!=a&&a.type===k$1&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:32;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e;}else u.__e=t.__e,u.__k=t.__k;l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z$2(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$2(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function z$2(l,u,t,i,o,r,f,e,c){var s,a,p,v,d,_,g,m=t.props,k=u.props,b=u.type;if("svg"===b?o="http://www.w3.org/2000/svg":"math"===b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(s=0;s<r.length;s++)if((d=r[s])&&"setAttribute"in d==!!b&&(b?d.localName===b:3===d.nodeType)){l=d,r[s]=null;break}if(null==l){if(null===b)return document.createTextNode(k);l=document.createElementNS(o,b,k.is&&k),r=null,e=!1;}if(null===b)m===k||e&&l.data===k||(l.data=k);else {if(r=r&&n.call(l.childNodes),m=t.props||h,!e&&null!=r)for(m={},s=0;s<l.attributes.length;s++)m[(d=l.attributes[s]).name]=d.value;for(s in m)if(d=m[s],"children"==s);else if("dangerouslySetInnerHTML"==s)p=d;else if("key"!==s&&!(s in k)){if("value"==s&&"defaultValue"in k||"checked"==s&&"defaultChecked"in k)continue;A$1(l,s,null,d,o);}for(s in k)d=k[s],"children"==s?v=d:"dangerouslySetInnerHTML"==s?a=d:"value"==s?_=d:"checked"==s?g=d:"key"===s||e&&"function"!=typeof d||m[s]===d||A$1(l,s,d,m[s],o);if(a)e||p&&(a.__html===p.__html||a.__html===l.innerHTML)||(l.innerHTML=a.__html),u.__k=[];else if(p&&(l.innerHTML=""),S(l,y(v)?v:[v],u,t,i,"foreignObject"===b?"http://www.w3.org/1999/xhtml":o,r,f,r?r[0]:t.__k&&x(t,0),e,c),null!=r)for(s=r.length;s--;)null!=r[s]&&w$1(r[s]);e||(s="value",void 0!==_&&(_!==l[s]||"progress"===b&&!_||"option"===b&&_!==m[s])&&A$1(l,s,_,m[s],o),s="checked",void 0!==g&&g!==l[s]&&A$1(l,s,g,m[s],o));}return l}function N(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function V$1(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V$1(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||w$1(n.__e),n.__c=n.__=n.__e=n.__d=void 0;}function q(n,l,u){return this.constructor(n,u)}function B$2(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O$1(t,u=(!o&&i||t).__k=_(k$1,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j$2(f,u,e);}function D$1(n,l){B$2(n,l,D$1);}function E$1(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g$1(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l="__cC"+a$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=p.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},b.prototype.render=k$1,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},P$1.__r=0,e$1=0,c$1=F(!1),s$1=F(!0),a$1=0;
|
|
3028
3077
|
|
|
3029
|
-
var r,u,i,f=[],c=
|
|
3078
|
+
var r,u,i,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function j$1(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$1),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0;})):(i.__h.forEach(z$1),i.__h.forEach(B$1),i.__h=[],0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z$1),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z$1(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}
|
|
3030
3079
|
|
|
3031
|
-
function g(n,t){for(var e in t)n[e]=t[e];return n}function
|
|
3080
|
+
function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function C(n,t){this.props=n,this.context=t;}(C.prototype=new b).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var M=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);M(n,t,e,r);};var T=l$1.unmount;function A(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return A(n,t,e)})),n}function D(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return D(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null;}function O(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function U(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n);},(L.prototype=new b).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=O(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(c):c());};e.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=D(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},L.prototype.componentWillUnmount=function(){this.t=[];},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=A(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&_(k$1,null,n.fallback);return i&&(i.__u&=-33),[_(k$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){B$2(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],contains:function(){return !0},appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),B$2(_(W,{context:e.context},n.__v),e.l);}function j(n,e){var r=_(P,{__v:n,i:e});return r.containerInfo=e,r}(U.prototype=new b).__a=function(n){var t=this,e=O(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},U.prototype.render=function(n){this.u=null,this.o=new Map;var t=H$1(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y="undefined"!=typeof document,$=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};b.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(b.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var J=l$1.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}l$1.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=l$1.vnode;l$1.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Y&&"children"===o&&"noscript"===e||"class"===o||"className"===o)){var c=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"ondoubleclick"===c?o="ondblclick":"onchange"!==c||"input"!==e&&"textarea"!==e||$(t.type)?"onfocus"===c?o="onfocusin":"onblur"===c?o="onfocusout":H.test(o)?o=c:-1===e.indexOf("-")&&B.test(o)?o=o.replace(Z,"-$&").toLowerCase():null===i&&(i=void 0):c=o="oninput","oninput"===c&&u[o=c]&&(o="oninputCapture"),u[o]=i;}}"select"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==e&&null!=u.defaultValue&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u;}(n),n.$$typeof=z,en&&en(n);};var rn=l$1.__r;l$1.__r=function(n){rn&&rn(n),n.__c;};var un=l$1.diffed;l$1.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value);};
|
|
3032
3081
|
|
|
3033
3082
|
/*
|
|
3034
3083
|
NOTE: this can be a public API, especially createElement for hooks.
|
|
3035
3084
|
See examples/typescript-scheduler/src/index.ts
|
|
3036
3085
|
*/
|
|
3086
|
+
/*
|
|
3087
|
+
TODO: rethink this
|
|
3088
|
+
*/
|
|
3037
3089
|
function flushSync(runBeforeFlush) {
|
|
3038
3090
|
runBeforeFlush();
|
|
3039
3091
|
let oldDebounceRendering = l$1.debounceRendering; // orig
|
|
@@ -3042,19 +3094,19 @@ var FullCalendar = (function (exports) {
|
|
|
3042
3094
|
callbackQ.push(callback);
|
|
3043
3095
|
}
|
|
3044
3096
|
l$1.debounceRendering = execCallbackSync;
|
|
3045
|
-
|
|
3097
|
+
B$2(_(FakeComponent, {}), document.createElement('div'));
|
|
3046
3098
|
while (callbackQ.length) {
|
|
3047
3099
|
callbackQ.shift()();
|
|
3048
3100
|
}
|
|
3049
3101
|
l$1.debounceRendering = oldDebounceRendering;
|
|
3050
3102
|
}
|
|
3051
|
-
class FakeComponent extends
|
|
3052
|
-
render() { return
|
|
3103
|
+
class FakeComponent extends b {
|
|
3104
|
+
render() { return _('div', {}); }
|
|
3053
3105
|
componentDidMount() { this.setState({}); }
|
|
3054
3106
|
}
|
|
3055
3107
|
// TODO: use preact/compat instead?
|
|
3056
3108
|
function createContext(defaultValue) {
|
|
3057
|
-
let ContextType = G
|
|
3109
|
+
let ContextType = G(defaultValue);
|
|
3058
3110
|
let origProvider = ContextType.Provider;
|
|
3059
3111
|
ContextType.Provider = function () {
|
|
3060
3112
|
let isNew = !this.getChildContext;
|
|
@@ -3088,55 +3140,19 @@ var FullCalendar = (function (exports) {
|
|
|
3088
3140
|
flushSync: flushSync,
|
|
3089
3141
|
createContext: createContext,
|
|
3090
3142
|
createPortal: j,
|
|
3091
|
-
Component:
|
|
3092
|
-
Fragment:
|
|
3093
|
-
cloneElement:
|
|
3094
|
-
createElement:
|
|
3095
|
-
createRef:
|
|
3096
|
-
h:
|
|
3097
|
-
hydrate:
|
|
3098
|
-
get isValidElement () { return
|
|
3143
|
+
Component: b,
|
|
3144
|
+
Fragment: k$1,
|
|
3145
|
+
cloneElement: E$1,
|
|
3146
|
+
createElement: _,
|
|
3147
|
+
createRef: m$1,
|
|
3148
|
+
h: _,
|
|
3149
|
+
hydrate: D$1,
|
|
3150
|
+
get isValidElement () { return t; },
|
|
3099
3151
|
get options () { return l$1; },
|
|
3100
|
-
render:
|
|
3101
|
-
toChildArray:
|
|
3152
|
+
render: B$2,
|
|
3153
|
+
toChildArray: H$1
|
|
3102
3154
|
};
|
|
3103
3155
|
|
|
3104
|
-
class ScrollResponder {
|
|
3105
|
-
constructor(execFunc, emitter, scrollTime, scrollTimeReset) {
|
|
3106
|
-
this.execFunc = execFunc;
|
|
3107
|
-
this.emitter = emitter;
|
|
3108
|
-
this.scrollTime = scrollTime;
|
|
3109
|
-
this.scrollTimeReset = scrollTimeReset;
|
|
3110
|
-
this.handleScrollRequest = (request) => {
|
|
3111
|
-
this.queuedRequest = Object.assign({}, this.queuedRequest || {}, request);
|
|
3112
|
-
this.drain();
|
|
3113
|
-
};
|
|
3114
|
-
emitter.on('_scrollRequest', this.handleScrollRequest);
|
|
3115
|
-
this.fireInitialScroll();
|
|
3116
|
-
}
|
|
3117
|
-
detach() {
|
|
3118
|
-
this.emitter.off('_scrollRequest', this.handleScrollRequest);
|
|
3119
|
-
}
|
|
3120
|
-
update(isDatesNew) {
|
|
3121
|
-
if (isDatesNew && this.scrollTimeReset) {
|
|
3122
|
-
this.fireInitialScroll(); // will drain
|
|
3123
|
-
}
|
|
3124
|
-
else {
|
|
3125
|
-
this.drain();
|
|
3126
|
-
}
|
|
3127
|
-
}
|
|
3128
|
-
fireInitialScroll() {
|
|
3129
|
-
this.handleScrollRequest({
|
|
3130
|
-
time: this.scrollTime,
|
|
3131
|
-
});
|
|
3132
|
-
}
|
|
3133
|
-
drain() {
|
|
3134
|
-
if (this.queuedRequest && this.execFunc(this.queuedRequest)) {
|
|
3135
|
-
this.queuedRequest = null;
|
|
3136
|
-
}
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
|
|
3140
3156
|
const ViewContextType = createContext({}); // for Components
|
|
3141
3157
|
function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) {
|
|
3142
3158
|
return {
|
|
@@ -3152,22 +3168,13 @@ var FullCalendar = (function (exports) {
|
|
|
3152
3168
|
dateProfileGenerator,
|
|
3153
3169
|
theme,
|
|
3154
3170
|
isRtl: viewOptions.direction === 'rtl',
|
|
3155
|
-
addResizeHandler(handler) {
|
|
3156
|
-
emitter.on('_resize', handler);
|
|
3157
|
-
},
|
|
3158
|
-
removeResizeHandler(handler) {
|
|
3159
|
-
emitter.off('_resize', handler);
|
|
3160
|
-
},
|
|
3161
|
-
createScrollResponder(execFunc) {
|
|
3162
|
-
return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime), viewOptions.scrollTimeReset);
|
|
3163
|
-
},
|
|
3164
3171
|
registerInteractiveComponent,
|
|
3165
3172
|
unregisterInteractiveComponent,
|
|
3166
3173
|
};
|
|
3167
3174
|
}
|
|
3168
3175
|
|
|
3169
3176
|
/* eslint max-classes-per-file: off */
|
|
3170
|
-
class PureComponent extends
|
|
3177
|
+
class PureComponent extends b {
|
|
3171
3178
|
shouldComponentUpdate(nextProps, nextState) {
|
|
3172
3179
|
if (this.debug) {
|
|
3173
3180
|
// eslint-disable-next-line no-console
|
|
@@ -4818,708 +4825,866 @@ var FullCalendar = (function (exports) {
|
|
|
4818
4825
|
}
|
|
4819
4826
|
}
|
|
4820
4827
|
|
|
4821
|
-
class
|
|
4822
|
-
constructor(
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
this.
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
this.
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
this.insertEntry(input, hiddenEntries);
|
|
4840
|
-
}
|
|
4841
|
-
return hiddenEntries;
|
|
4828
|
+
class ContentInjector extends BaseComponent {
|
|
4829
|
+
constructor() {
|
|
4830
|
+
super(...arguments);
|
|
4831
|
+
this.id = guid();
|
|
4832
|
+
this.queuedDomNodes = [];
|
|
4833
|
+
this.currentDomNodes = [];
|
|
4834
|
+
this.handleEl = (el) => {
|
|
4835
|
+
const { options } = this.context;
|
|
4836
|
+
const { generatorName } = this.props;
|
|
4837
|
+
if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) {
|
|
4838
|
+
this.updateElRef(el);
|
|
4839
|
+
}
|
|
4840
|
+
};
|
|
4841
|
+
this.updateElRef = (el) => {
|
|
4842
|
+
if (this.props.elRef) {
|
|
4843
|
+
setRef(this.props.elRef, el);
|
|
4844
|
+
}
|
|
4845
|
+
};
|
|
4842
4846
|
}
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
+
render() {
|
|
4848
|
+
const { props, context } = this;
|
|
4849
|
+
const { options } = context;
|
|
4850
|
+
const { customGenerator, defaultGenerator, renderProps } = props;
|
|
4851
|
+
const attrs = buildElAttrs(props, [], this.handleEl);
|
|
4852
|
+
let useDefault = false;
|
|
4853
|
+
let innerContent;
|
|
4854
|
+
let queuedDomNodes = [];
|
|
4855
|
+
let currentGeneratorMeta;
|
|
4856
|
+
if (customGenerator != null) {
|
|
4857
|
+
const customGeneratorRes = typeof customGenerator === 'function' ?
|
|
4858
|
+
customGenerator(renderProps, _) :
|
|
4859
|
+
customGenerator;
|
|
4860
|
+
if (customGeneratorRes === true) {
|
|
4861
|
+
useDefault = true;
|
|
4862
|
+
}
|
|
4863
|
+
else {
|
|
4864
|
+
const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null
|
|
4865
|
+
if (isObject && ('html' in customGeneratorRes)) {
|
|
4866
|
+
attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };
|
|
4867
|
+
}
|
|
4868
|
+
else if (isObject && ('domNodes' in customGeneratorRes)) {
|
|
4869
|
+
queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);
|
|
4870
|
+
}
|
|
4871
|
+
else if (isObject
|
|
4872
|
+
? t(customGeneratorRes) // vdom node
|
|
4873
|
+
: typeof customGeneratorRes !== 'function' // primitive value (like string or number)
|
|
4874
|
+
) {
|
|
4875
|
+
// use in vdom
|
|
4876
|
+
innerContent = customGeneratorRes;
|
|
4877
|
+
}
|
|
4878
|
+
else {
|
|
4879
|
+
// an exotic object for handleCustomRendering
|
|
4880
|
+
currentGeneratorMeta = customGeneratorRes;
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4847
4883
|
}
|
|
4848
4884
|
else {
|
|
4849
|
-
|
|
4885
|
+
useDefault = !hasCustomRenderingHandler(props.generatorName, options);
|
|
4886
|
+
}
|
|
4887
|
+
if (useDefault && defaultGenerator) {
|
|
4888
|
+
innerContent = defaultGenerator(renderProps);
|
|
4850
4889
|
}
|
|
4890
|
+
this.queuedDomNodes = queuedDomNodes;
|
|
4891
|
+
this.currentGeneratorMeta = currentGeneratorMeta;
|
|
4892
|
+
return _(props.elTag, attrs, innerContent);
|
|
4851
4893
|
}
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4894
|
+
componentDidMount() {
|
|
4895
|
+
this.applyQueueudDomNodes();
|
|
4896
|
+
this.triggerCustomRendering(true);
|
|
4855
4897
|
}
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
hiddenEntries.push(hiddenEntry);
|
|
4860
|
-
this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
|
|
4861
|
-
}
|
|
4862
|
-
else {
|
|
4863
|
-
hiddenEntries.push(entry);
|
|
4864
|
-
}
|
|
4898
|
+
componentDidUpdate() {
|
|
4899
|
+
this.applyQueueudDomNodes();
|
|
4900
|
+
this.triggerCustomRendering(true);
|
|
4865
4901
|
}
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
*/
|
|
4869
|
-
splitEntry(entry, barrier, hiddenEntries) {
|
|
4870
|
-
let entrySpan = entry.span;
|
|
4871
|
-
let barrierSpan = barrier.span;
|
|
4872
|
-
if (entrySpan.start < barrierSpan.start) {
|
|
4873
|
-
this.insertEntry({
|
|
4874
|
-
index: entry.index,
|
|
4875
|
-
thickness: entry.thickness,
|
|
4876
|
-
span: { start: entrySpan.start, end: barrierSpan.start },
|
|
4877
|
-
}, hiddenEntries);
|
|
4878
|
-
}
|
|
4879
|
-
if (entrySpan.end > barrierSpan.end) {
|
|
4880
|
-
this.insertEntry({
|
|
4881
|
-
index: entry.index,
|
|
4882
|
-
thickness: entry.thickness,
|
|
4883
|
-
span: { start: barrierSpan.end, end: entrySpan.end },
|
|
4884
|
-
}, hiddenEntries);
|
|
4885
|
-
}
|
|
4902
|
+
componentWillUnmount() {
|
|
4903
|
+
this.triggerCustomRendering(false); // TODO: different API for removal?
|
|
4886
4904
|
}
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4905
|
+
triggerCustomRendering(isActive) {
|
|
4906
|
+
var _a;
|
|
4907
|
+
const { props, context } = this;
|
|
4908
|
+
const { handleCustomRendering, customRenderingMetaMap } = context.options;
|
|
4909
|
+
if (handleCustomRendering) {
|
|
4910
|
+
const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
|
|
4911
|
+
if (generatorMeta) {
|
|
4912
|
+
handleCustomRendering(Object.assign(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els
|
|
4913
|
+
generatorMeta }, props), { elClasses: (props.elClasses || []).filter(isTruthy) }));
|
|
4914
|
+
}
|
|
4897
4915
|
}
|
|
4898
|
-
this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
|
|
4899
4916
|
}
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
let touchingLevel = -1;
|
|
4908
|
-
let touchingLateral = -1;
|
|
4909
|
-
let touchingEntry = null;
|
|
4910
|
-
let stackCnt = 0;
|
|
4911
|
-
for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
|
|
4912
|
-
const trackingCoord = levelCoords[trackingLevel];
|
|
4913
|
-
// if the current level is past the placed entry, we have found a good empty space and can stop.
|
|
4914
|
-
// if strictOrder, keep finding more lateral intersections.
|
|
4915
|
-
if (!strictOrder && trackingCoord >= candidateCoord + this.getEntryThickness(newEntry)) {
|
|
4916
|
-
break;
|
|
4917
|
-
}
|
|
4918
|
-
let trackingEntries = entriesByLevel[trackingLevel];
|
|
4919
|
-
let trackingEntry;
|
|
4920
|
-
let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
|
|
4921
|
-
let lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
|
|
4922
|
-
while ( // loop through entries that horizontally intersect
|
|
4923
|
-
(trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
|
|
4924
|
-
trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
|
|
4925
|
-
) {
|
|
4926
|
-
let trackingEntryBottom = trackingCoord + this.getEntryThickness(trackingEntry);
|
|
4927
|
-
// intersects into the top of the candidate?
|
|
4928
|
-
if (trackingEntryBottom > candidateCoord) {
|
|
4929
|
-
candidateCoord = trackingEntryBottom;
|
|
4930
|
-
touchingEntry = trackingEntry;
|
|
4931
|
-
touchingLevel = trackingLevel;
|
|
4932
|
-
touchingLateral = lateralIndex;
|
|
4933
|
-
}
|
|
4934
|
-
// butts up against top of candidate? (will happen if just intersected as well)
|
|
4935
|
-
if (trackingEntryBottom === candidateCoord) {
|
|
4936
|
-
// accumulate the highest possible stackCnt of the trackingEntries that butt up
|
|
4937
|
-
stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
|
|
4938
|
-
}
|
|
4939
|
-
lateralIndex += 1;
|
|
4940
|
-
}
|
|
4941
|
-
}
|
|
4942
|
-
// the destination level will be after touchingEntry's level. find it
|
|
4943
|
-
let destLevel = 0;
|
|
4944
|
-
if (touchingEntry) {
|
|
4945
|
-
destLevel = touchingLevel + 1;
|
|
4946
|
-
while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
|
|
4947
|
-
destLevel += 1;
|
|
4948
|
-
}
|
|
4949
|
-
}
|
|
4950
|
-
// if adding to an existing level, find where to insert
|
|
4951
|
-
let destLateral = -1;
|
|
4952
|
-
if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
|
|
4953
|
-
destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
|
|
4954
|
-
}
|
|
4955
|
-
return {
|
|
4956
|
-
touchingLevel,
|
|
4957
|
-
touchingLateral,
|
|
4958
|
-
touchingEntry,
|
|
4959
|
-
stackCnt,
|
|
4960
|
-
levelCoord: candidateCoord,
|
|
4961
|
-
level: destLevel,
|
|
4962
|
-
lateral: destLateral,
|
|
4963
|
-
};
|
|
4964
|
-
}
|
|
4965
|
-
// sorted by levelCoord (lowest to highest)
|
|
4966
|
-
toRects() {
|
|
4967
|
-
let { entriesByLevel, levelCoords } = this;
|
|
4968
|
-
let levelCnt = entriesByLevel.length;
|
|
4969
|
-
let rects = [];
|
|
4970
|
-
for (let level = 0; level < levelCnt; level += 1) {
|
|
4971
|
-
let entries = entriesByLevel[level];
|
|
4972
|
-
let levelCoord = levelCoords[level];
|
|
4973
|
-
for (let entry of entries) {
|
|
4974
|
-
rects.push(Object.assign(Object.assign({}, entry), { thickness: this.getEntryThickness(entry), levelCoord }));
|
|
4917
|
+
applyQueueudDomNodes() {
|
|
4918
|
+
const { queuedDomNodes, currentDomNodes } = this;
|
|
4919
|
+
const el = this.base;
|
|
4920
|
+
if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {
|
|
4921
|
+
currentDomNodes.forEach(removeElement);
|
|
4922
|
+
for (let newNode of queuedDomNodes) {
|
|
4923
|
+
el.appendChild(newNode);
|
|
4975
4924
|
}
|
|
4925
|
+
this.currentDomNodes = queuedDomNodes;
|
|
4976
4926
|
}
|
|
4977
|
-
return rects;
|
|
4978
4927
|
}
|
|
4979
4928
|
}
|
|
4980
|
-
|
|
4981
|
-
|
|
4929
|
+
ContentInjector.addPropsEquality({
|
|
4930
|
+
elClasses: isArraysEqual,
|
|
4931
|
+
elStyle: isPropsEqual,
|
|
4932
|
+
elAttrs: isNonHandlerPropsEqual,
|
|
4933
|
+
renderProps: isPropsEqual,
|
|
4934
|
+
});
|
|
4935
|
+
// Util
|
|
4936
|
+
/*
|
|
4937
|
+
Does UI-framework provide custom way of rendering that does not use Preact VDOM
|
|
4938
|
+
AND does the calendar's options define custom rendering?
|
|
4939
|
+
AKA. Should we NOT render the default content?
|
|
4940
|
+
*/
|
|
4941
|
+
function hasCustomRenderingHandler(generatorName, options) {
|
|
4942
|
+
var _a;
|
|
4943
|
+
return Boolean(options.handleCustomRendering &&
|
|
4944
|
+
generatorName &&
|
|
4945
|
+
((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName]));
|
|
4982
4946
|
}
|
|
4983
|
-
function
|
|
4984
|
-
|
|
4947
|
+
function buildElAttrs(props, extraClassNames, elRef) {
|
|
4948
|
+
const attrs = Object.assign(Object.assign({}, props.elAttrs), { ref: elRef });
|
|
4949
|
+
if (props.elClasses || extraClassNames) {
|
|
4950
|
+
attrs.className = (props.elClasses || [])
|
|
4951
|
+
.concat(extraClassNames || [])
|
|
4952
|
+
.concat(attrs.className || [])
|
|
4953
|
+
.filter(Boolean)
|
|
4954
|
+
.join(' ');
|
|
4955
|
+
}
|
|
4956
|
+
if (props.elStyle) {
|
|
4957
|
+
attrs.style = props.elStyle;
|
|
4958
|
+
}
|
|
4959
|
+
return attrs;
|
|
4985
4960
|
}
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4961
|
+
function isTruthy(val) {
|
|
4962
|
+
return Boolean(val);
|
|
4963
|
+
}
|
|
4964
|
+
|
|
4965
|
+
const RenderId = createContext(0);
|
|
4966
|
+
|
|
4967
|
+
class ContentContainer extends b {
|
|
4968
|
+
constructor() {
|
|
4969
|
+
super(...arguments);
|
|
4970
|
+
this.InnerContent = InnerContentInjector.bind(undefined, this);
|
|
4971
|
+
this.handleEl = (el) => {
|
|
4972
|
+
this.el = el;
|
|
4973
|
+
if (this.props.elRef) {
|
|
4974
|
+
setRef(this.props.elRef, el);
|
|
4975
|
+
if (el && this.didMountMisfire) {
|
|
4976
|
+
this.componentDidMount();
|
|
4977
|
+
}
|
|
4978
|
+
}
|
|
4994
4979
|
};
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4980
|
+
}
|
|
4981
|
+
render() {
|
|
4982
|
+
const { props } = this;
|
|
4983
|
+
const generatedClassNames = generateClassNames(props.classNameGenerator, props.renderProps);
|
|
4984
|
+
if (props.children) {
|
|
4985
|
+
const elAttrs = buildElAttrs(props, generatedClassNames, this.handleEl);
|
|
4986
|
+
const children = props.children(this.InnerContent, props.renderProps, elAttrs);
|
|
4987
|
+
if (props.elTag) {
|
|
4988
|
+
return _(props.elTag, elAttrs, children);
|
|
5001
4989
|
}
|
|
5002
4990
|
else {
|
|
5003
|
-
|
|
4991
|
+
return children;
|
|
5004
4992
|
}
|
|
5005
4993
|
}
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
}
|
|
5009
|
-
return merges;
|
|
5010
|
-
}
|
|
5011
|
-
function joinSpans(span0, span1) {
|
|
5012
|
-
return {
|
|
5013
|
-
start: Math.min(span0.start, span1.start),
|
|
5014
|
-
end: Math.max(span0.end, span1.end),
|
|
5015
|
-
};
|
|
5016
|
-
}
|
|
5017
|
-
function intersectSpans(span0, span1) {
|
|
5018
|
-
let start = Math.max(span0.start, span1.start);
|
|
5019
|
-
let end = Math.min(span0.end, span1.end);
|
|
5020
|
-
if (start < end) {
|
|
5021
|
-
return { start, end };
|
|
5022
|
-
}
|
|
5023
|
-
return null;
|
|
5024
|
-
}
|
|
5025
|
-
// general util
|
|
5026
|
-
// ---------------------------------------------------------------------------------------------------------------------
|
|
5027
|
-
function insertAt(arr, index, item) {
|
|
5028
|
-
arr.splice(index, 0, item);
|
|
5029
|
-
}
|
|
5030
|
-
function binarySearch(a, searchVal, getItemVal) {
|
|
5031
|
-
let startIndex = 0;
|
|
5032
|
-
let endIndex = a.length; // exclusive
|
|
5033
|
-
if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item
|
|
5034
|
-
return [0, 0];
|
|
5035
|
-
}
|
|
5036
|
-
if (searchVal > getItemVal(a[endIndex - 1])) { // after last item
|
|
5037
|
-
return [endIndex, 0];
|
|
5038
|
-
}
|
|
5039
|
-
while (startIndex < endIndex) {
|
|
5040
|
-
let middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2);
|
|
5041
|
-
let middleVal = getItemVal(a[middleIndex]);
|
|
5042
|
-
if (searchVal < middleVal) {
|
|
5043
|
-
endIndex = middleIndex;
|
|
4994
|
+
else {
|
|
4995
|
+
return _((ContentInjector), Object.assign(Object.assign({}, props), { elRef: this.handleEl, elTag: props.elTag || 'div', elClasses: (props.elClasses || []).concat(generatedClassNames), renderId: this.context }));
|
|
5044
4996
|
}
|
|
5045
|
-
|
|
5046
|
-
|
|
4997
|
+
}
|
|
4998
|
+
componentDidMount() {
|
|
4999
|
+
var _a, _b;
|
|
5000
|
+
if (this.el) {
|
|
5001
|
+
(_b = (_a = this.props).didMount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
|
|
5047
5002
|
}
|
|
5048
|
-
else {
|
|
5049
|
-
|
|
5003
|
+
else {
|
|
5004
|
+
this.didMountMisfire = true;
|
|
5050
5005
|
}
|
|
5051
5006
|
}
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
class Interaction {
|
|
5056
|
-
constructor(settings) {
|
|
5057
|
-
this.component = settings.component;
|
|
5058
|
-
this.isHitComboAllowed = settings.isHitComboAllowed || null;
|
|
5059
|
-
}
|
|
5060
|
-
destroy() {
|
|
5007
|
+
componentWillUnmount() {
|
|
5008
|
+
var _a, _b;
|
|
5009
|
+
(_b = (_a = this.props).willUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
|
|
5061
5010
|
}
|
|
5062
5011
|
}
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,
|
|
5068
|
-
isHitComboAllowed: input.isHitComboAllowed || null,
|
|
5069
|
-
};
|
|
5012
|
+
ContentContainer.contextType = RenderId;
|
|
5013
|
+
function InnerContentInjector(containerComponent, props) {
|
|
5014
|
+
const parentProps = containerComponent.props;
|
|
5015
|
+
return _((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props));
|
|
5070
5016
|
}
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5017
|
+
// Utils
|
|
5018
|
+
function generateClassNames(classNameGenerator, renderProps) {
|
|
5019
|
+
const classNames = typeof classNameGenerator === 'function' ?
|
|
5020
|
+
classNameGenerator(renderProps) :
|
|
5021
|
+
classNameGenerator || [];
|
|
5022
|
+
return typeof classNames === 'string' ? [classNames] : classNames;
|
|
5075
5023
|
}
|
|
5076
|
-
// global state
|
|
5077
|
-
const interactionSettingsStore = {};
|
|
5078
|
-
|
|
5079
|
-
/*
|
|
5080
|
-
An abstraction for a dragging interaction originating on an event.
|
|
5081
|
-
Does higher-level things than PointerDragger, such as possibly:
|
|
5082
|
-
- a "mirror" that moves with the pointer
|
|
5083
|
-
- a minimum number of pixels or other criteria for a true drag to begin
|
|
5084
5024
|
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
- dragend
|
|
5091
|
-
*/
|
|
5092
|
-
class ElementDragging {
|
|
5093
|
-
constructor(el, selector) {
|
|
5094
|
-
this.emitter = new Emitter();
|
|
5095
|
-
}
|
|
5096
|
-
destroy() {
|
|
5097
|
-
}
|
|
5098
|
-
setMirrorIsVisible(bool) {
|
|
5099
|
-
// optional if subclass doesn't want to support a mirror
|
|
5100
|
-
}
|
|
5101
|
-
setMirrorNeedsRevert(bool) {
|
|
5102
|
-
// optional if subclass doesn't want to support a mirror
|
|
5025
|
+
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
5026
|
+
class DayCellContainer extends BaseComponent {
|
|
5027
|
+
constructor() {
|
|
5028
|
+
super(...arguments);
|
|
5029
|
+
this.refineRenderProps = memoizeObjArg(refineRenderProps);
|
|
5103
5030
|
}
|
|
5104
|
-
|
|
5105
|
-
|
|
5031
|
+
render() {
|
|
5032
|
+
let { props, context } = this;
|
|
5033
|
+
let { options } = context;
|
|
5034
|
+
let renderProps = this.refineRenderProps({
|
|
5035
|
+
date: props.date,
|
|
5036
|
+
dateProfile: props.dateProfile,
|
|
5037
|
+
todayRange: props.todayRange,
|
|
5038
|
+
isMonthStart: props.isMonthStart || false,
|
|
5039
|
+
showDayNumber: props.showDayNumber,
|
|
5040
|
+
extraRenderProps: props.extraRenderProps,
|
|
5041
|
+
viewApi: context.viewApi,
|
|
5042
|
+
dateEnv: context.dateEnv,
|
|
5043
|
+
monthStartFormat: options.monthStartFormat,
|
|
5044
|
+
});
|
|
5045
|
+
return (_(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
|
|
5046
|
+
...getDayClassNames(renderProps, context.theme),
|
|
5047
|
+
...(props.elClasses || []),
|
|
5048
|
+
], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
|
|
5049
|
+
// don't use custom classNames if disabled
|
|
5050
|
+
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
|
|
5106
5051
|
}
|
|
5107
5052
|
}
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
const DRAG_META_REFINERS = {
|
|
5118
|
-
startTime: createDuration,
|
|
5119
|
-
duration: createDuration,
|
|
5120
|
-
create: Boolean,
|
|
5121
|
-
sourceId: String,
|
|
5122
|
-
};
|
|
5123
|
-
function parseDragMeta(raw) {
|
|
5124
|
-
let { refined, extra } = refineProps(raw, DRAG_META_REFINERS);
|
|
5125
|
-
return {
|
|
5126
|
-
startTime: refined.startTime || null,
|
|
5127
|
-
duration: refined.duration || null,
|
|
5128
|
-
create: refined.create != null ? refined.create : true,
|
|
5129
|
-
sourceId: refined.sourceId,
|
|
5130
|
-
leftoverProps: extra,
|
|
5131
|
-
};
|
|
5053
|
+
function hasCustomDayCellContent(options) {
|
|
5054
|
+
return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
|
|
5055
|
+
}
|
|
5056
|
+
function refineRenderProps(raw) {
|
|
5057
|
+
let { date, dateEnv, dateProfile, isMonthStart } = raw;
|
|
5058
|
+
let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
|
|
5059
|
+
let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
|
|
5060
|
+
return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
|
|
5061
|
+
dayNumberText }), raw.extraRenderProps);
|
|
5132
5062
|
}
|
|
5133
5063
|
|
|
5134
|
-
|
|
5064
|
+
const PADDING_FROM_VIEWPORT = 10;
|
|
5065
|
+
class Popover extends BaseComponent {
|
|
5135
5066
|
constructor() {
|
|
5136
5067
|
super(...arguments);
|
|
5137
5068
|
this.state = {
|
|
5138
|
-
|
|
5069
|
+
titleId: getUniqueDomId(),
|
|
5139
5070
|
};
|
|
5140
|
-
this.
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5071
|
+
this.handleRootEl = (el) => {
|
|
5072
|
+
this.rootEl = el;
|
|
5073
|
+
if (this.props.elRef) {
|
|
5074
|
+
setRef(this.props.elRef, el);
|
|
5075
|
+
}
|
|
5144
5076
|
};
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5077
|
+
// Triggered when the user clicks *anywhere* in the document, for the autoHide feature
|
|
5078
|
+
this.handleDocumentMouseDown = (ev) => {
|
|
5079
|
+
// only hide the popover if the click happened outside the popover
|
|
5080
|
+
const target = getEventTargetViaRoot(ev);
|
|
5081
|
+
if (!this.rootEl.contains(target)) {
|
|
5082
|
+
this.handleCloseClick();
|
|
5083
|
+
}
|
|
5084
|
+
};
|
|
5085
|
+
this.handleDocumentKeyDown = (ev) => {
|
|
5086
|
+
if (ev.key === 'Escape') {
|
|
5087
|
+
this.handleCloseClick();
|
|
5088
|
+
}
|
|
5089
|
+
};
|
|
5090
|
+
this.handleCloseClick = () => {
|
|
5091
|
+
let { onClose } = this.props;
|
|
5092
|
+
if (onClose) {
|
|
5093
|
+
onClose();
|
|
5094
|
+
}
|
|
5149
5095
|
};
|
|
5150
5096
|
}
|
|
5151
5097
|
render() {
|
|
5152
|
-
let {
|
|
5153
|
-
let {
|
|
5154
|
-
let { forPrint } = this.state;
|
|
5155
|
-
let isHeightAuto = forPrint || options.height === 'auto' || options.contentHeight === 'auto';
|
|
5156
|
-
let height = (!isHeightAuto && options.height != null) ? options.height : '';
|
|
5098
|
+
let { theme, options } = this.context;
|
|
5099
|
+
let { props, state } = this;
|
|
5157
5100
|
let classNames = [
|
|
5158
|
-
'fc',
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
return props.children(classNames, height, isHeightAuto, forPrint);
|
|
5101
|
+
'fc-popover',
|
|
5102
|
+
theme.getClass('popover'),
|
|
5103
|
+
].concat(props.extraClassNames || []);
|
|
5104
|
+
return j(_("div", Object.assign({}, props.extraAttrs, { id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId, ref: this.handleRootEl }),
|
|
5105
|
+
_("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
|
|
5106
|
+
_("span", { className: "fc-popover-title", id: state.titleId }, props.title),
|
|
5107
|
+
_("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
|
|
5108
|
+
_("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
|
|
5167
5109
|
}
|
|
5168
5110
|
componentDidMount() {
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5111
|
+
document.addEventListener('mousedown', this.handleDocumentMouseDown);
|
|
5112
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown);
|
|
5113
|
+
this.updateSize();
|
|
5172
5114
|
}
|
|
5173
5115
|
componentWillUnmount() {
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5116
|
+
document.removeEventListener('mousedown', this.handleDocumentMouseDown);
|
|
5117
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
|
5118
|
+
}
|
|
5119
|
+
updateSize() {
|
|
5120
|
+
let { isRtl } = this.context;
|
|
5121
|
+
let { alignmentEl, alignGridTop } = this.props;
|
|
5122
|
+
let { rootEl } = this;
|
|
5123
|
+
let alignmentRect = computeClippedClientRect(alignmentEl);
|
|
5124
|
+
if (alignmentRect) {
|
|
5125
|
+
let popoverDims = rootEl.getBoundingClientRect();
|
|
5126
|
+
if (alignGridTop) {
|
|
5127
|
+
throw new Error('alignGridTop not supported yet');
|
|
5128
|
+
}
|
|
5129
|
+
// position relative to viewport
|
|
5130
|
+
let popoverTop = alignGridTop
|
|
5131
|
+
? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top // BAD!!!
|
|
5132
|
+
: alignmentRect.top;
|
|
5133
|
+
let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;
|
|
5134
|
+
// constrain
|
|
5135
|
+
popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);
|
|
5136
|
+
popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);
|
|
5137
|
+
popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);
|
|
5138
|
+
let origin = rootEl.offsetParent.getBoundingClientRect();
|
|
5139
|
+
applyStyle(rootEl, {
|
|
5140
|
+
top: popoverTop - origin.top,
|
|
5141
|
+
left: popoverLeft - origin.left,
|
|
5142
|
+
});
|
|
5143
|
+
}
|
|
5177
5144
|
}
|
|
5178
5145
|
}
|
|
5179
5146
|
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5147
|
+
class MorePopover extends DateComponent {
|
|
5148
|
+
constructor() {
|
|
5149
|
+
super(...arguments);
|
|
5150
|
+
this.handleRootEl = (rootEl) => {
|
|
5151
|
+
this.rootEl = rootEl;
|
|
5152
|
+
if (rootEl) {
|
|
5153
|
+
this.context.registerInteractiveComponent(this, {
|
|
5154
|
+
el: rootEl,
|
|
5155
|
+
useEventCenter: false,
|
|
5156
|
+
});
|
|
5157
|
+
}
|
|
5158
|
+
else {
|
|
5159
|
+
this.context.unregisterInteractiveComponent(this);
|
|
5160
|
+
}
|
|
5161
|
+
};
|
|
5162
|
+
}
|
|
5163
|
+
render() {
|
|
5164
|
+
let { options, dateEnv } = this.context;
|
|
5165
|
+
let { props } = this;
|
|
5166
|
+
let { startDate, todayRange, dateProfile } = props;
|
|
5167
|
+
let title = dateEnv.format(startDate, options.dayPopoverFormat);
|
|
5168
|
+
return (_(DayCellContainer, { elRef: this.handleRootEl, date: startDate, dateProfile: dateProfile, todayRange: todayRange }, (InnerContent, renderProps, elAttrs) => (_(Popover, { elRef: elAttrs.ref, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(elAttrs.className || []), extraAttrs: elAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
|
|
5169
|
+
hasCustomDayCellContent(options) && (_(InnerContent, { elTag: "div", elClasses: ['fc-more-popover-misc'] })),
|
|
5170
|
+
props.children))));
|
|
5186
5171
|
}
|
|
5187
|
-
|
|
5188
|
-
|
|
5172
|
+
queryHit(positionLeft, positionTop, elWidth, elHeight) {
|
|
5173
|
+
let { rootEl, props } = this;
|
|
5174
|
+
if (positionLeft >= 0 && positionLeft < elWidth &&
|
|
5175
|
+
positionTop >= 0 && positionTop < elHeight) {
|
|
5176
|
+
return {
|
|
5177
|
+
dateProfile: props.dateProfile,
|
|
5178
|
+
dateSpan: Object.assign({ allDay: !props.forceTimed, range: {
|
|
5179
|
+
start: props.startDate,
|
|
5180
|
+
end: props.endDate,
|
|
5181
|
+
} }, props.extraDateSpan),
|
|
5182
|
+
dayEl: rootEl,
|
|
5183
|
+
rect: {
|
|
5184
|
+
left: 0,
|
|
5185
|
+
top: 0,
|
|
5186
|
+
right: elWidth,
|
|
5187
|
+
bottom: elHeight,
|
|
5188
|
+
},
|
|
5189
|
+
layer: 1, // important when comparing with hits from other components
|
|
5190
|
+
};
|
|
5191
|
+
}
|
|
5192
|
+
return null;
|
|
5189
5193
|
}
|
|
5190
|
-
return createFormatter({ weekday: 'long' }); // "Saturday"
|
|
5191
|
-
}
|
|
5192
|
-
|
|
5193
|
-
const CLASS_NAME = 'fc-col-header-cell'; // do the cushion too? no
|
|
5194
|
-
function renderInner$1(renderProps) {
|
|
5195
|
-
return renderProps.text;
|
|
5196
5194
|
}
|
|
5197
5195
|
|
|
5198
|
-
class
|
|
5196
|
+
class MoreLinkContainer extends BaseComponent {
|
|
5199
5197
|
constructor() {
|
|
5200
5198
|
super(...arguments);
|
|
5201
|
-
this.
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
this.handleEl = (el) => {
|
|
5205
|
-
const { options } = this.context;
|
|
5206
|
-
const { generatorName } = this.props;
|
|
5207
|
-
if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) {
|
|
5208
|
-
this.updateElRef(el);
|
|
5209
|
-
}
|
|
5199
|
+
this.state = {
|
|
5200
|
+
isPopoverOpen: false,
|
|
5201
|
+
popoverId: getUniqueDomId(),
|
|
5210
5202
|
};
|
|
5211
|
-
this.
|
|
5203
|
+
this.handleLinkEl = (linkEl) => {
|
|
5204
|
+
this.linkEl = linkEl;
|
|
5212
5205
|
if (this.props.elRef) {
|
|
5213
|
-
setRef(this.props.elRef,
|
|
5206
|
+
setRef(this.props.elRef, linkEl);
|
|
5214
5207
|
}
|
|
5215
5208
|
};
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
customGenerator;
|
|
5230
|
-
if (customGeneratorRes === true) {
|
|
5231
|
-
useDefault = true;
|
|
5209
|
+
this.handleClick = (ev) => {
|
|
5210
|
+
let { props, context } = this;
|
|
5211
|
+
let { moreLinkClick } = context.options;
|
|
5212
|
+
let date = computeRange(props).start;
|
|
5213
|
+
function buildPublicSeg(seg) {
|
|
5214
|
+
let { def, instance, range } = seg.eventRange;
|
|
5215
|
+
return {
|
|
5216
|
+
event: new EventImpl(context, def, instance),
|
|
5217
|
+
start: context.dateEnv.toDate(range.start),
|
|
5218
|
+
end: context.dateEnv.toDate(range.end),
|
|
5219
|
+
isStart: seg.isStart,
|
|
5220
|
+
isEnd: seg.isEnd,
|
|
5221
|
+
};
|
|
5232
5222
|
}
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
? i$1(customGeneratorRes) // vdom node
|
|
5243
|
-
: typeof customGeneratorRes !== 'function' // primitive value (like string or number)
|
|
5244
|
-
) {
|
|
5245
|
-
// use in vdom
|
|
5246
|
-
innerContent = customGeneratorRes;
|
|
5247
|
-
}
|
|
5248
|
-
else {
|
|
5249
|
-
// an exotic object for handleCustomRendering
|
|
5250
|
-
currentGeneratorMeta = customGeneratorRes;
|
|
5251
|
-
}
|
|
5223
|
+
if (typeof moreLinkClick === 'function') {
|
|
5224
|
+
moreLinkClick = moreLinkClick({
|
|
5225
|
+
date,
|
|
5226
|
+
allDay: Boolean(props.allDayDate),
|
|
5227
|
+
allSegs: props.segs.map(buildPublicSeg),
|
|
5228
|
+
hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
|
|
5229
|
+
jsEvent: ev,
|
|
5230
|
+
view: context.viewApi,
|
|
5231
|
+
});
|
|
5252
5232
|
}
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
}
|
|
5260
|
-
this.
|
|
5261
|
-
|
|
5262
|
-
|
|
5233
|
+
if (!moreLinkClick || moreLinkClick === 'popover') {
|
|
5234
|
+
this.setState({ isPopoverOpen: true });
|
|
5235
|
+
}
|
|
5236
|
+
else if (typeof moreLinkClick === 'string') { // a view name
|
|
5237
|
+
context.calendarApi.zoomTo(date, moreLinkClick);
|
|
5238
|
+
}
|
|
5239
|
+
};
|
|
5240
|
+
this.handlePopoverClose = () => {
|
|
5241
|
+
this.setState({ isPopoverOpen: false });
|
|
5242
|
+
};
|
|
5243
|
+
}
|
|
5244
|
+
render() {
|
|
5245
|
+
let { props, state } = this;
|
|
5246
|
+
return (_(ViewContextType.Consumer, null, (context) => {
|
|
5247
|
+
let { viewApi, options, calendarApi } = context;
|
|
5248
|
+
let { moreLinkText } = options;
|
|
5249
|
+
let moreCnt = props.hiddenSegs.length;
|
|
5250
|
+
let range = computeRange(props);
|
|
5251
|
+
let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
|
|
5252
|
+
? moreLinkText.call(calendarApi, moreCnt)
|
|
5253
|
+
: `+${moreCnt} ${moreLinkText}`;
|
|
5254
|
+
let hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
|
|
5255
|
+
let renderProps = {
|
|
5256
|
+
num: moreCnt,
|
|
5257
|
+
shortText: `+${moreCnt}`,
|
|
5258
|
+
text,
|
|
5259
|
+
view: viewApi,
|
|
5260
|
+
};
|
|
5261
|
+
return (_(k$1, null,
|
|
5262
|
+
Boolean(moreCnt) && (_(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [
|
|
5263
|
+
...(props.elClasses || []),
|
|
5264
|
+
'fc-more-link',
|
|
5265
|
+
], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
|
|
5266
|
+
state.isPopoverOpen && (_(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ?
|
|
5267
|
+
props.alignmentElRef.current :
|
|
5268
|
+
this.linkEl, alignGridTop: props.alignGridTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent()))));
|
|
5269
|
+
}));
|
|
5263
5270
|
}
|
|
5264
5271
|
componentDidMount() {
|
|
5265
|
-
this.
|
|
5266
|
-
this.triggerCustomRendering(true);
|
|
5272
|
+
this.updateParentEl();
|
|
5267
5273
|
}
|
|
5268
5274
|
componentDidUpdate() {
|
|
5269
|
-
this.
|
|
5270
|
-
this.triggerCustomRendering(true);
|
|
5271
|
-
}
|
|
5272
|
-
componentWillUnmount() {
|
|
5273
|
-
this.triggerCustomRendering(false); // TODO: different API for removal?
|
|
5274
|
-
}
|
|
5275
|
-
triggerCustomRendering(isActive) {
|
|
5276
|
-
var _a;
|
|
5277
|
-
const { props, context } = this;
|
|
5278
|
-
const { handleCustomRendering, customRenderingMetaMap } = context.options;
|
|
5279
|
-
if (handleCustomRendering) {
|
|
5280
|
-
const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
|
|
5281
|
-
if (generatorMeta) {
|
|
5282
|
-
handleCustomRendering(Object.assign(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els
|
|
5283
|
-
generatorMeta }, props), { elClasses: (props.elClasses || []).filter(isTruthy) }));
|
|
5284
|
-
}
|
|
5285
|
-
}
|
|
5275
|
+
this.updateParentEl();
|
|
5286
5276
|
}
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {
|
|
5291
|
-
currentDomNodes.forEach(removeElement);
|
|
5292
|
-
for (let newNode of queuedDomNodes) {
|
|
5293
|
-
el.appendChild(newNode);
|
|
5294
|
-
}
|
|
5295
|
-
this.currentDomNodes = queuedDomNodes;
|
|
5277
|
+
updateParentEl() {
|
|
5278
|
+
if (this.linkEl) {
|
|
5279
|
+
this.parentEl = elementClosest(this.linkEl, '.fc-view-harness'); // HACK. reconsider
|
|
5296
5280
|
}
|
|
5297
5281
|
}
|
|
5298
5282
|
}
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
elStyle: isPropsEqual,
|
|
5302
|
-
elAttrs: isNonHandlerPropsEqual,
|
|
5303
|
-
renderProps: isPropsEqual,
|
|
5304
|
-
});
|
|
5305
|
-
// Util
|
|
5306
|
-
/*
|
|
5307
|
-
Does UI-framework provide custom way of rendering that does not use Preact VDOM
|
|
5308
|
-
AND does the calendar's options define custom rendering?
|
|
5309
|
-
AKA. Should we NOT render the default content?
|
|
5310
|
-
*/
|
|
5311
|
-
function hasCustomRenderingHandler(generatorName, options) {
|
|
5312
|
-
var _a;
|
|
5313
|
-
return Boolean(options.handleCustomRendering &&
|
|
5314
|
-
generatorName &&
|
|
5315
|
-
((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName]));
|
|
5283
|
+
function renderMoreLinkInner(props) {
|
|
5284
|
+
return props.text;
|
|
5316
5285
|
}
|
|
5317
|
-
function
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
.
|
|
5322
|
-
|
|
5323
|
-
.filter(Boolean)
|
|
5324
|
-
.join(' ');
|
|
5325
|
-
}
|
|
5326
|
-
if (props.elStyle) {
|
|
5327
|
-
attrs.style = props.elStyle;
|
|
5286
|
+
function computeRange(props) {
|
|
5287
|
+
if (props.allDayDate) {
|
|
5288
|
+
return {
|
|
5289
|
+
start: props.allDayDate,
|
|
5290
|
+
end: addDays(props.allDayDate, 1),
|
|
5291
|
+
};
|
|
5328
5292
|
}
|
|
5329
|
-
return
|
|
5293
|
+
return {
|
|
5294
|
+
start: computeEarliestSegStart(props.hiddenSegs),
|
|
5295
|
+
end: computeLatestSegEnd(props.hiddenSegs),
|
|
5296
|
+
};
|
|
5330
5297
|
}
|
|
5331
|
-
function
|
|
5332
|
-
return
|
|
5298
|
+
function computeEarliestSegStart(segs) {
|
|
5299
|
+
return segs.reduce(pickEarliestStart).eventRange.range.start;
|
|
5300
|
+
}
|
|
5301
|
+
function pickEarliestStart(seg0, seg1) {
|
|
5302
|
+
return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;
|
|
5303
|
+
}
|
|
5304
|
+
function computeLatestSegEnd(segs) {
|
|
5305
|
+
return segs.reduce(pickLatestEnd).eventRange.range.end;
|
|
5306
|
+
}
|
|
5307
|
+
function pickLatestEnd(seg0, seg1) {
|
|
5308
|
+
return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;
|
|
5333
5309
|
}
|
|
5334
5310
|
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
this.
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5311
|
+
class SegHierarchy {
|
|
5312
|
+
constructor(getEntryThickness = (entry) => {
|
|
5313
|
+
// if no thickness known, assume 1 (if 0, so small it always fits)
|
|
5314
|
+
return entry.thickness;
|
|
5315
|
+
}) {
|
|
5316
|
+
this.getEntryThickness = getEntryThickness;
|
|
5317
|
+
// settings
|
|
5318
|
+
this.strictOrder = false;
|
|
5319
|
+
this.allowReslicing = false;
|
|
5320
|
+
this.maxCoord = -1; // -1 means no max
|
|
5321
|
+
this.maxStackCnt = -1; // -1 means no max
|
|
5322
|
+
this.levelCoords = []; // ordered
|
|
5323
|
+
this.entriesByLevel = []; // parallel with levelCoords
|
|
5324
|
+
this.stackCnts = {}; // TODO: use better technique!?
|
|
5325
|
+
}
|
|
5326
|
+
addSegs(inputs) {
|
|
5327
|
+
let hiddenEntries = [];
|
|
5328
|
+
for (let input of inputs) {
|
|
5329
|
+
this.insertEntry(input, hiddenEntries);
|
|
5330
|
+
}
|
|
5331
|
+
return hiddenEntries;
|
|
5332
|
+
}
|
|
5333
|
+
insertEntry(entry, hiddenEntries) {
|
|
5334
|
+
let entryThickness = this.getEntryThickness(entry);
|
|
5335
|
+
if (entryThickness == null) {
|
|
5336
|
+
hiddenEntries.push(entry);
|
|
5337
|
+
}
|
|
5338
|
+
else {
|
|
5339
|
+
let insertion = this.findInsertion(entry, entryThickness);
|
|
5340
|
+
if (this.isInsertionValid(insertion, entry, entryThickness)) {
|
|
5341
|
+
this.insertEntryAt(entry, insertion);
|
|
5342
|
+
}
|
|
5343
|
+
else {
|
|
5344
|
+
this.handleInvalidInsertion(insertion, entry, hiddenEntries);
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
}
|
|
5348
|
+
isInsertionValid(insertion, entry, entryThickness) {
|
|
5349
|
+
return (this.maxCoord === -1 || insertion.levelCoord + entryThickness <= this.maxCoord) &&
|
|
5350
|
+
(this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt);
|
|
5351
|
+
}
|
|
5352
|
+
handleInvalidInsertion(insertion, entry, hiddenEntries) {
|
|
5353
|
+
if (this.allowReslicing && insertion.touchingEntry) {
|
|
5354
|
+
const hiddenEntry = Object.assign(Object.assign({}, entry), { span: intersectSpans(entry.span, insertion.touchingEntry.span) });
|
|
5355
|
+
hiddenEntries.push(hiddenEntry);
|
|
5356
|
+
this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
|
|
5357
|
+
}
|
|
5358
|
+
else {
|
|
5359
|
+
hiddenEntries.push(entry);
|
|
5360
|
+
}
|
|
5361
|
+
}
|
|
5362
|
+
/*
|
|
5363
|
+
Does NOT add what hit the `barrier` into hiddenEntries. Should already be done.
|
|
5364
|
+
*/
|
|
5365
|
+
splitEntry(entry, barrier, hiddenEntries) {
|
|
5366
|
+
let entrySpan = entry.span;
|
|
5367
|
+
let barrierSpan = barrier.span;
|
|
5368
|
+
if (entrySpan.start < barrierSpan.start) {
|
|
5369
|
+
this.insertEntry({
|
|
5370
|
+
index: entry.index,
|
|
5371
|
+
seg: entry.seg,
|
|
5372
|
+
thickness: entry.thickness,
|
|
5373
|
+
span: { start: entrySpan.start, end: barrierSpan.start },
|
|
5374
|
+
}, hiddenEntries);
|
|
5375
|
+
}
|
|
5376
|
+
if (entrySpan.end > barrierSpan.end) {
|
|
5377
|
+
this.insertEntry({
|
|
5378
|
+
index: entry.index,
|
|
5379
|
+
seg: entry.seg,
|
|
5380
|
+
thickness: entry.thickness,
|
|
5381
|
+
span: { start: barrierSpan.end, end: entrySpan.end },
|
|
5382
|
+
}, hiddenEntries);
|
|
5383
|
+
}
|
|
5384
|
+
}
|
|
5385
|
+
insertEntryAt(entry, insertion) {
|
|
5386
|
+
let { entriesByLevel, levelCoords } = this;
|
|
5387
|
+
if (insertion.lateral === -1) {
|
|
5388
|
+
// create a new level
|
|
5389
|
+
insertAt(levelCoords, insertion.level, insertion.levelCoord);
|
|
5390
|
+
insertAt(entriesByLevel, insertion.level, [entry]);
|
|
5391
|
+
}
|
|
5392
|
+
else {
|
|
5393
|
+
// insert into existing level
|
|
5394
|
+
insertAt(entriesByLevel[insertion.level], insertion.lateral, entry);
|
|
5395
|
+
}
|
|
5396
|
+
this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
|
|
5397
|
+
}
|
|
5398
|
+
/*
|
|
5399
|
+
does not care about limits
|
|
5400
|
+
*/
|
|
5401
|
+
findInsertion(newEntry, newEntryThickness) {
|
|
5402
|
+
let { levelCoords, entriesByLevel, strictOrder, stackCnts } = this;
|
|
5403
|
+
let levelCnt = levelCoords.length;
|
|
5404
|
+
let candidateCoord = 0;
|
|
5405
|
+
let touchingLevel = -1;
|
|
5406
|
+
let touchingLateral = -1;
|
|
5407
|
+
let touchingEntry = null;
|
|
5408
|
+
let stackCnt = 0;
|
|
5409
|
+
for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
|
|
5410
|
+
const trackingCoord = levelCoords[trackingLevel];
|
|
5411
|
+
// if the current level is past the placed entry, we have found a good empty space and can stop.
|
|
5412
|
+
// if strictOrder, keep finding more lateral intersections.
|
|
5413
|
+
if (!strictOrder && trackingCoord >= candidateCoord + newEntryThickness) {
|
|
5414
|
+
break;
|
|
5415
|
+
}
|
|
5416
|
+
let trackingEntries = entriesByLevel[trackingLevel];
|
|
5417
|
+
let trackingEntry;
|
|
5418
|
+
let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
|
|
5419
|
+
let lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
|
|
5420
|
+
while ( // loop through entries that horizontally intersect
|
|
5421
|
+
(trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
|
|
5422
|
+
trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
|
|
5423
|
+
) {
|
|
5424
|
+
let trackingEntryBottom = trackingCoord + this.getEntryThickness(trackingEntry);
|
|
5425
|
+
// intersects into the top of the candidate?
|
|
5426
|
+
if (trackingEntryBottom > candidateCoord) {
|
|
5427
|
+
candidateCoord = trackingEntryBottom;
|
|
5428
|
+
touchingEntry = trackingEntry;
|
|
5429
|
+
touchingLevel = trackingLevel;
|
|
5430
|
+
touchingLateral = lateralIndex;
|
|
5431
|
+
}
|
|
5432
|
+
// butts up against top of candidate? (will happen if just intersected as well)
|
|
5433
|
+
if (trackingEntryBottom === candidateCoord) {
|
|
5434
|
+
// accumulate the highest possible stackCnt of the trackingEntries that butt up
|
|
5435
|
+
stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
|
|
5347
5436
|
}
|
|
5437
|
+
lateralIndex += 1;
|
|
5438
|
+
}
|
|
5439
|
+
}
|
|
5440
|
+
// the destination level will be after touchingEntry's level. find it
|
|
5441
|
+
let destLevel = 0;
|
|
5442
|
+
if (touchingEntry) {
|
|
5443
|
+
destLevel = touchingLevel + 1;
|
|
5444
|
+
while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
|
|
5445
|
+
destLevel += 1;
|
|
5446
|
+
}
|
|
5447
|
+
}
|
|
5448
|
+
// if adding to an existing level, find where to insert
|
|
5449
|
+
let destLateral = -1;
|
|
5450
|
+
if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
|
|
5451
|
+
destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
|
|
5452
|
+
}
|
|
5453
|
+
return {
|
|
5454
|
+
touchingLevel,
|
|
5455
|
+
touchingLateral,
|
|
5456
|
+
touchingEntry,
|
|
5457
|
+
stackCnt,
|
|
5458
|
+
levelCoord: candidateCoord,
|
|
5459
|
+
level: destLevel,
|
|
5460
|
+
lateral: destLateral,
|
|
5461
|
+
};
|
|
5462
|
+
}
|
|
5463
|
+
// sorted by levelCoord (lowest to highest)
|
|
5464
|
+
toRects() {
|
|
5465
|
+
let { entriesByLevel, levelCoords } = this;
|
|
5466
|
+
let levelCnt = entriesByLevel.length;
|
|
5467
|
+
let rects = [];
|
|
5468
|
+
for (let level = 0; level < levelCnt; level += 1) {
|
|
5469
|
+
let entries = entriesByLevel[level];
|
|
5470
|
+
let levelCoord = levelCoords[level];
|
|
5471
|
+
for (let entry of entries) {
|
|
5472
|
+
rects.push(Object.assign(Object.assign({}, entry), { thickness: this.getEntryThickness(entry), levelCoord }));
|
|
5348
5473
|
}
|
|
5349
|
-
}
|
|
5474
|
+
}
|
|
5475
|
+
return rects;
|
|
5350
5476
|
}
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5477
|
+
}
|
|
5478
|
+
function getEntrySpanEnd(entry) {
|
|
5479
|
+
return entry.span.end;
|
|
5480
|
+
}
|
|
5481
|
+
/*
|
|
5482
|
+
Generates a unique ID whose lifespan is a single run of SegHierarchy, so can be really specific
|
|
5483
|
+
without fear of accidentally busting the cache on subsequent rerenders
|
|
5484
|
+
*/
|
|
5485
|
+
function buildEntryKey(entry) {
|
|
5486
|
+
return entry.index + ':' + entry.span.start;
|
|
5487
|
+
}
|
|
5488
|
+
/*
|
|
5489
|
+
returns groups with entries sorted by input order
|
|
5490
|
+
*/
|
|
5491
|
+
function groupIntersectingEntries(entries) {
|
|
5492
|
+
let merges = [];
|
|
5493
|
+
for (let entry of entries) {
|
|
5494
|
+
let filteredMerges = [];
|
|
5495
|
+
let hungryMerge = {
|
|
5496
|
+
span: entry.span,
|
|
5497
|
+
entries: [entry],
|
|
5498
|
+
};
|
|
5499
|
+
for (let merge of merges) {
|
|
5500
|
+
if (intersectSpans(merge.span, hungryMerge.span)) {
|
|
5501
|
+
hungryMerge = {
|
|
5502
|
+
span: joinSpans(merge.span, hungryMerge.span),
|
|
5503
|
+
entries: merge.entries.concat(hungryMerge.entries), // keep preexisting merge's items first. maintains order
|
|
5504
|
+
};
|
|
5359
5505
|
}
|
|
5360
5506
|
else {
|
|
5361
|
-
|
|
5507
|
+
filteredMerges.push(merge);
|
|
5362
5508
|
}
|
|
5363
5509
|
}
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
}
|
|
5510
|
+
filteredMerges.push(hungryMerge);
|
|
5511
|
+
merges = filteredMerges;
|
|
5367
5512
|
}
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5513
|
+
return merges.map((merge) => {
|
|
5514
|
+
const segs = merge.entries.map(extractEntrySeg);
|
|
5515
|
+
return {
|
|
5516
|
+
key: buildIsoString(computeEarliestSegStart(segs)),
|
|
5517
|
+
span: merge.span,
|
|
5518
|
+
segs,
|
|
5519
|
+
};
|
|
5520
|
+
});
|
|
5521
|
+
}
|
|
5522
|
+
function extractEntrySeg(entry) {
|
|
5523
|
+
return entry.seg;
|
|
5524
|
+
}
|
|
5525
|
+
function joinSpans(span0, span1) {
|
|
5526
|
+
return {
|
|
5527
|
+
start: Math.min(span0.start, span1.start),
|
|
5528
|
+
end: Math.max(span0.end, span1.end),
|
|
5529
|
+
};
|
|
5530
|
+
}
|
|
5531
|
+
function intersectSpans(span0, span1) {
|
|
5532
|
+
let start = Math.max(span0.start, span1.start);
|
|
5533
|
+
let end = Math.min(span0.end, span1.end);
|
|
5534
|
+
if (start < end) {
|
|
5535
|
+
return { start, end };
|
|
5536
|
+
}
|
|
5537
|
+
return null;
|
|
5538
|
+
}
|
|
5539
|
+
// general util
|
|
5540
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
5541
|
+
function insertAt(arr, index, item) {
|
|
5542
|
+
arr.splice(index, 0, item);
|
|
5543
|
+
}
|
|
5544
|
+
function binarySearch(a, searchVal, getItemVal) {
|
|
5545
|
+
let startIndex = 0;
|
|
5546
|
+
let endIndex = a.length; // exclusive
|
|
5547
|
+
if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item
|
|
5548
|
+
return [0, 0];
|
|
5549
|
+
}
|
|
5550
|
+
if (searchVal > getItemVal(a[endIndex - 1])) { // after last item
|
|
5551
|
+
return [endIndex, 0];
|
|
5552
|
+
}
|
|
5553
|
+
while (startIndex < endIndex) {
|
|
5554
|
+
let middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2);
|
|
5555
|
+
let middleVal = getItemVal(a[middleIndex]);
|
|
5556
|
+
if (searchVal < middleVal) {
|
|
5557
|
+
endIndex = middleIndex;
|
|
5372
5558
|
}
|
|
5373
|
-
else {
|
|
5374
|
-
|
|
5559
|
+
else if (searchVal > middleVal) {
|
|
5560
|
+
startIndex = middleIndex + 1;
|
|
5561
|
+
}
|
|
5562
|
+
else { // equal!
|
|
5563
|
+
return [middleIndex, 1];
|
|
5375
5564
|
}
|
|
5376
5565
|
}
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5566
|
+
return [startIndex, 0];
|
|
5567
|
+
}
|
|
5568
|
+
|
|
5569
|
+
class Interaction {
|
|
5570
|
+
constructor(settings) {
|
|
5571
|
+
this.component = settings.component;
|
|
5572
|
+
this.isHitComboAllowed = settings.isHitComboAllowed || null;
|
|
5573
|
+
}
|
|
5574
|
+
destroy() {
|
|
5380
5575
|
}
|
|
5381
5576
|
}
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5577
|
+
function parseInteractionSettings(component, input) {
|
|
5578
|
+
return {
|
|
5579
|
+
component,
|
|
5580
|
+
el: input.el,
|
|
5581
|
+
useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,
|
|
5582
|
+
isHitComboAllowed: input.isHitComboAllowed || null,
|
|
5583
|
+
};
|
|
5386
5584
|
}
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
classNameGenerator || [];
|
|
5392
|
-
return typeof classNames === 'string' ? [classNames] : classNames;
|
|
5585
|
+
function interactionSettingsToStore(settings) {
|
|
5586
|
+
return {
|
|
5587
|
+
[settings.component.uid]: settings,
|
|
5588
|
+
};
|
|
5393
5589
|
}
|
|
5590
|
+
// global state
|
|
5591
|
+
const interactionSettingsStore = {};
|
|
5394
5592
|
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
props.isSticky && 'fc-sticky',
|
|
5412
|
-
] }))))));
|
|
5413
|
-
}
|
|
5414
|
-
}
|
|
5415
|
-
|
|
5416
|
-
const WEEKDAY_FORMAT = createFormatter({ weekday: 'long' });
|
|
5417
|
-
class TableDowCell extends BaseComponent {
|
|
5418
|
-
render() {
|
|
5419
|
-
let { props } = this;
|
|
5420
|
-
let { dateEnv, theme, viewApi, options } = this.context;
|
|
5421
|
-
let date = addDays(new Date(259200000), props.dow); // start with Sun, 04 Jan 1970 00:00:00 GMT
|
|
5422
|
-
let dateMeta = {
|
|
5423
|
-
dow: props.dow,
|
|
5424
|
-
isDisabled: false,
|
|
5425
|
-
isFuture: false,
|
|
5426
|
-
isPast: false,
|
|
5427
|
-
isToday: false,
|
|
5428
|
-
isOther: false,
|
|
5429
|
-
};
|
|
5430
|
-
let text = dateEnv.format(date, props.dayHeaderFormat);
|
|
5431
|
-
let renderProps = Object.assign(Object.assign(Object.assign(Object.assign({ // TODO: make this public?
|
|
5432
|
-
date }, dateMeta), { view: viewApi }), props.extraRenderProps), { text });
|
|
5433
|
-
return (y(ContentContainer, { elTag: "th", elClasses: [
|
|
5434
|
-
CLASS_NAME,
|
|
5435
|
-
...getDayClassNames(dateMeta, theme),
|
|
5436
|
-
...(props.extraClassNames || []),
|
|
5437
|
-
], elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContent) => (y("div", { className: "fc-scrollgrid-sync-inner" },
|
|
5438
|
-
y(InnerContent, { elTag: "a", elClasses: [
|
|
5439
|
-
'fc-col-header-cell-cushion',
|
|
5440
|
-
props.isSticky && 'fc-sticky',
|
|
5441
|
-
], elAttrs: {
|
|
5442
|
-
'aria-label': dateEnv.format(date, WEEKDAY_FORMAT),
|
|
5443
|
-
} })))));
|
|
5444
|
-
}
|
|
5445
|
-
}
|
|
5446
|
-
|
|
5447
|
-
class NowTimer extends x$1 {
|
|
5448
|
-
constructor(props, context) {
|
|
5449
|
-
super(props, context);
|
|
5450
|
-
this.initialNowDate = getNow(context.options.now, context.dateEnv);
|
|
5451
|
-
this.initialNowQueriedMs = new Date().valueOf();
|
|
5452
|
-
this.state = this.computeTiming().currentState;
|
|
5453
|
-
}
|
|
5454
|
-
render() {
|
|
5455
|
-
let { props, state } = this;
|
|
5456
|
-
return props.children(state.nowDate, state.todayRange);
|
|
5457
|
-
}
|
|
5458
|
-
componentDidMount() {
|
|
5459
|
-
this.setTimeout();
|
|
5460
|
-
}
|
|
5461
|
-
componentDidUpdate(prevProps) {
|
|
5462
|
-
if (prevProps.unit !== this.props.unit) {
|
|
5463
|
-
this.clearTimeout();
|
|
5464
|
-
this.setTimeout();
|
|
5465
|
-
}
|
|
5593
|
+
/*
|
|
5594
|
+
An abstraction for a dragging interaction originating on an event.
|
|
5595
|
+
Does higher-level things than PointerDragger, such as possibly:
|
|
5596
|
+
- a "mirror" that moves with the pointer
|
|
5597
|
+
- a minimum number of pixels or other criteria for a true drag to begin
|
|
5598
|
+
|
|
5599
|
+
subclasses must emit:
|
|
5600
|
+
- pointerdown
|
|
5601
|
+
- dragstart
|
|
5602
|
+
- dragmove
|
|
5603
|
+
- pointerup
|
|
5604
|
+
- dragend
|
|
5605
|
+
*/
|
|
5606
|
+
class ElementDragging {
|
|
5607
|
+
constructor(el, selector) {
|
|
5608
|
+
this.emitter = new Emitter();
|
|
5466
5609
|
}
|
|
5467
|
-
|
|
5468
|
-
this.clearTimeout();
|
|
5610
|
+
destroy() {
|
|
5469
5611
|
}
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
let unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs);
|
|
5473
|
-
let currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit);
|
|
5474
|
-
let nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit));
|
|
5475
|
-
let waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf();
|
|
5476
|
-
// there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)
|
|
5477
|
-
// ensure no longer than a day
|
|
5478
|
-
waitMs = Math.min(1000 * 60 * 60 * 24, waitMs);
|
|
5479
|
-
return {
|
|
5480
|
-
currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) },
|
|
5481
|
-
nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) },
|
|
5482
|
-
waitMs,
|
|
5483
|
-
};
|
|
5612
|
+
setMirrorIsVisible(bool) {
|
|
5613
|
+
// optional if subclass doesn't want to support a mirror
|
|
5484
5614
|
}
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
this.timeoutId = setTimeout(() => {
|
|
5488
|
-
this.setState(nextState, () => {
|
|
5489
|
-
this.setTimeout();
|
|
5490
|
-
});
|
|
5491
|
-
}, waitMs);
|
|
5615
|
+
setMirrorNeedsRevert(bool) {
|
|
5616
|
+
// optional if subclass doesn't want to support a mirror
|
|
5492
5617
|
}
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
clearTimeout(this.timeoutId);
|
|
5496
|
-
}
|
|
5618
|
+
setAutoScrollEnabled(bool) {
|
|
5619
|
+
// optional
|
|
5497
5620
|
}
|
|
5498
5621
|
}
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5622
|
+
|
|
5623
|
+
// TODO: get rid of this in favor of options system,
|
|
5624
|
+
// tho it's really easy to access this globally rather than pass thru options.
|
|
5625
|
+
const config = {};
|
|
5626
|
+
|
|
5627
|
+
/*
|
|
5628
|
+
Information about what will happen when an external element is dragged-and-dropped
|
|
5629
|
+
onto a calendar. Contains information for creating an event.
|
|
5630
|
+
*/
|
|
5631
|
+
const DRAG_META_REFINERS = {
|
|
5632
|
+
startTime: createDuration,
|
|
5633
|
+
duration: createDuration,
|
|
5634
|
+
create: Boolean,
|
|
5635
|
+
sourceId: String,
|
|
5636
|
+
};
|
|
5637
|
+
function parseDragMeta(raw) {
|
|
5638
|
+
let { refined, extra } = refineProps(raw, DRAG_META_REFINERS);
|
|
5639
|
+
return {
|
|
5640
|
+
startTime: refined.startTime || null,
|
|
5641
|
+
duration: refined.duration || null,
|
|
5642
|
+
create: refined.create != null ? refined.create : true,
|
|
5643
|
+
sourceId: refined.sourceId,
|
|
5644
|
+
leftoverProps: extra,
|
|
5645
|
+
};
|
|
5504
5646
|
}
|
|
5505
5647
|
|
|
5506
|
-
class
|
|
5648
|
+
class CalendarRoot extends BaseComponent {
|
|
5507
5649
|
constructor() {
|
|
5508
5650
|
super(...arguments);
|
|
5509
|
-
this.
|
|
5651
|
+
this.state = {
|
|
5652
|
+
forPrint: false,
|
|
5653
|
+
};
|
|
5654
|
+
this.handleBeforePrint = () => {
|
|
5655
|
+
flushSync(() => {
|
|
5656
|
+
this.setState({ forPrint: true });
|
|
5657
|
+
});
|
|
5658
|
+
};
|
|
5659
|
+
this.handleAfterPrint = () => {
|
|
5660
|
+
flushSync(() => {
|
|
5661
|
+
this.setState({ forPrint: false });
|
|
5662
|
+
});
|
|
5663
|
+
};
|
|
5510
5664
|
}
|
|
5511
5665
|
render() {
|
|
5512
|
-
let {
|
|
5513
|
-
let {
|
|
5514
|
-
let
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5666
|
+
let { props, state } = this;
|
|
5667
|
+
let { options } = props;
|
|
5668
|
+
let { forPrint } = state;
|
|
5669
|
+
let classNames = [
|
|
5670
|
+
'fc',
|
|
5671
|
+
forPrint ? 'fc-media-print' : 'fc-media-screen',
|
|
5672
|
+
`fc-direction-${options.direction}`,
|
|
5673
|
+
props.theme.getClass('root'),
|
|
5674
|
+
];
|
|
5675
|
+
return props.children(classNames, options.height, forPrint);
|
|
5676
|
+
}
|
|
5677
|
+
componentDidMount() {
|
|
5678
|
+
let { emitter } = this.props;
|
|
5679
|
+
emitter.on('_beforeprint', this.handleBeforePrint);
|
|
5680
|
+
emitter.on('_afterprint', this.handleAfterPrint);
|
|
5681
|
+
}
|
|
5682
|
+
componentWillUnmount() {
|
|
5683
|
+
let { emitter } = this.props;
|
|
5684
|
+
emitter.off('_beforeprint', this.handleBeforePrint);
|
|
5685
|
+
emitter.off('_afterprint', this.handleAfterPrint);
|
|
5518
5686
|
}
|
|
5519
5687
|
}
|
|
5520
|
-
function createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) {
|
|
5521
|
-
return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt);
|
|
5522
|
-
}
|
|
5523
5688
|
|
|
5524
5689
|
class DaySeriesModel {
|
|
5525
5690
|
constructor(range, dateProfileGenerator) {
|
|
@@ -5602,7 +5767,7 @@ var FullCalendar = (function (exports) {
|
|
|
5602
5767
|
this.rowCnt = rowCnt;
|
|
5603
5768
|
this.colCnt = daysPerRow;
|
|
5604
5769
|
this.daySeries = daySeries;
|
|
5605
|
-
this.
|
|
5770
|
+
this.cellRows = this.buildCells();
|
|
5606
5771
|
this.headerDates = this.buildHeaderDates();
|
|
5607
5772
|
}
|
|
5608
5773
|
buildCells() {
|
|
@@ -5626,7 +5791,7 @@ var FullCalendar = (function (exports) {
|
|
|
5626
5791
|
buildHeaderDates() {
|
|
5627
5792
|
let dates = [];
|
|
5628
5793
|
for (let col = 0; col < this.colCnt; col += 1) {
|
|
5629
|
-
dates.push(this.
|
|
5794
|
+
dates.push(this.cellRows[0][col].date);
|
|
5630
5795
|
}
|
|
5631
5796
|
return dates;
|
|
5632
5797
|
}
|
|
@@ -5654,6 +5819,153 @@ var FullCalendar = (function (exports) {
|
|
|
5654
5819
|
}
|
|
5655
5820
|
}
|
|
5656
5821
|
|
|
5822
|
+
class Scroller extends DateComponent {
|
|
5823
|
+
constructor() {
|
|
5824
|
+
super(...arguments);
|
|
5825
|
+
// ref
|
|
5826
|
+
this.elRef = m$1();
|
|
5827
|
+
}
|
|
5828
|
+
render() {
|
|
5829
|
+
const { props } = this;
|
|
5830
|
+
// if there's only one axis that needs scrolling, the other axis will unintentionally have
|
|
5831
|
+
// scrollbars too, so we must force to 'hidden'
|
|
5832
|
+
const fallbackOverflow = (props.horizontal || props.vertical) ? 'hidden' : '';
|
|
5833
|
+
return (_("div", { ref: this.elRef, className: [
|
|
5834
|
+
'fc-scroller',
|
|
5835
|
+
props.hideScrollbars ? 'fc-scroller-nobars' : '',
|
|
5836
|
+
...(props.elClassNames || []),
|
|
5837
|
+
].join(' '), style: Object.assign(Object.assign({}, props.elStyle), { overflowX: props.horizontal ? 'auto' : fallbackOverflow, overflowY: props.vertical ? 'auto' : fallbackOverflow }) }, props.children));
|
|
5838
|
+
}
|
|
5839
|
+
componentDidMount() {
|
|
5840
|
+
const el = this.elRef.current; // TODO: make dynamic with useEffect
|
|
5841
|
+
this.disconnectSize = watchSize(el, (contentWidth, contentHeight) => {
|
|
5842
|
+
const { props, context } = this;
|
|
5843
|
+
const bottomScrollbarWidth = el.offsetHeight - el.clientHeight;
|
|
5844
|
+
const horizontalScrollbarWidth = el.offsetWidth - el.clientWidth;
|
|
5845
|
+
let rightScrollbarWidth = 0;
|
|
5846
|
+
let leftScrollbarWidth = 0;
|
|
5847
|
+
if (context.isRtl && getRtlScrollerConfig().leftScrollbars) {
|
|
5848
|
+
leftScrollbarWidth = horizontalScrollbarWidth;
|
|
5849
|
+
}
|
|
5850
|
+
else {
|
|
5851
|
+
rightScrollbarWidth = horizontalScrollbarWidth;
|
|
5852
|
+
}
|
|
5853
|
+
if (!isDimsEqual(this.currentWidth, contentWidth)) {
|
|
5854
|
+
setRef(props.widthRef, this.currentWidth = contentWidth);
|
|
5855
|
+
}
|
|
5856
|
+
if (!isDimsEqual(this.currentHeight, contentHeight)) {
|
|
5857
|
+
setRef(props.heightRef, this.currentHeight = contentHeight);
|
|
5858
|
+
}
|
|
5859
|
+
if (!isDimsEqual(this.currentBottomScrollbarWidth, bottomScrollbarWidth)) {
|
|
5860
|
+
setRef(props.bottomScrollbarWidthRef, this.currentBottomScrollbarWidth = bottomScrollbarWidth);
|
|
5861
|
+
}
|
|
5862
|
+
if (!isDimsEqual(this.currentRightScrollbarWidth, rightScrollbarWidth)) {
|
|
5863
|
+
setRef(props.rightScrollbarWidthRef, this.currentRightScrollbarWidth = rightScrollbarWidth);
|
|
5864
|
+
}
|
|
5865
|
+
if (!isDimsEqual(this.currentLeftScrollbarWidth, leftScrollbarWidth)) {
|
|
5866
|
+
setRef(props.leftScrollbarWidthRef, this.currentLeftScrollbarWidth = leftScrollbarWidth);
|
|
5867
|
+
}
|
|
5868
|
+
});
|
|
5869
|
+
}
|
|
5870
|
+
componentWillUnmount() {
|
|
5871
|
+
this.disconnectSize();
|
|
5872
|
+
}
|
|
5873
|
+
// Public API
|
|
5874
|
+
// -----------------------------------------------------------------------------------------------
|
|
5875
|
+
get el() {
|
|
5876
|
+
return this.elRef.current;
|
|
5877
|
+
}
|
|
5878
|
+
get x() {
|
|
5879
|
+
const { isRtl } = this.context;
|
|
5880
|
+
const el = this.elRef.current;
|
|
5881
|
+
return getNormalizedScrollX(el, isRtl);
|
|
5882
|
+
}
|
|
5883
|
+
get y() {
|
|
5884
|
+
const el = this.elRef.current;
|
|
5885
|
+
return el.scrollTop;
|
|
5886
|
+
}
|
|
5887
|
+
scrollTo({ x, y }) {
|
|
5888
|
+
const { isRtl } = this.context;
|
|
5889
|
+
const el = this.elRef.current;
|
|
5890
|
+
if (y != null) {
|
|
5891
|
+
el.scrollTop = y;
|
|
5892
|
+
}
|
|
5893
|
+
if (x != null) {
|
|
5894
|
+
setNormalizedScrollX(el, isRtl, x);
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
}
|
|
5898
|
+
// Public API
|
|
5899
|
+
// -------------------------------------------------------------------------------------------------
|
|
5900
|
+
// TODO: consolidate with scroll-left-norm.ts
|
|
5901
|
+
function getNormalizedScrollX(el, isRtl) {
|
|
5902
|
+
const { scrollLeft } = el;
|
|
5903
|
+
return isRtl ? getNormalizedRtlScrollX(scrollLeft, el) : scrollLeft;
|
|
5904
|
+
}
|
|
5905
|
+
function setNormalizedScrollX(el, isRtl, x) {
|
|
5906
|
+
el.scrollLeft = isRtl ? getNormalizedRtlScrollLeft(x, el) : x;
|
|
5907
|
+
}
|
|
5908
|
+
/*
|
|
5909
|
+
Returns a value in the 'reverse' system
|
|
5910
|
+
*/
|
|
5911
|
+
function getNormalizedRtlScrollX(scrollLeft, el) {
|
|
5912
|
+
switch (getRtlScrollerConfig().system) {
|
|
5913
|
+
case 'positive':
|
|
5914
|
+
return el.scrollWidth - el.clientWidth - scrollLeft;
|
|
5915
|
+
case 'negative':
|
|
5916
|
+
return -scrollLeft;
|
|
5917
|
+
}
|
|
5918
|
+
return scrollLeft;
|
|
5919
|
+
}
|
|
5920
|
+
/*
|
|
5921
|
+
Receives a value in the 'reverse' system
|
|
5922
|
+
TODO: is this really the same equations as getNormalizedRtlScrollX??? I think so
|
|
5923
|
+
If so, consolidate. With isRtl check too
|
|
5924
|
+
*/
|
|
5925
|
+
function getNormalizedRtlScrollLeft(x, el) {
|
|
5926
|
+
switch (getRtlScrollerConfig().system) {
|
|
5927
|
+
case 'positive':
|
|
5928
|
+
return el.scrollWidth - el.clientWidth - x;
|
|
5929
|
+
case 'negative':
|
|
5930
|
+
return -x;
|
|
5931
|
+
}
|
|
5932
|
+
return x;
|
|
5933
|
+
}
|
|
5934
|
+
let _rtlScrollerConfig;
|
|
5935
|
+
function getRtlScrollerConfig() {
|
|
5936
|
+
return _rtlScrollerConfig || (_rtlScrollerConfig = detectRtlScrollerConfig());
|
|
5937
|
+
}
|
|
5938
|
+
function detectRtlScrollerConfig() {
|
|
5939
|
+
let el = document.createElement('div');
|
|
5940
|
+
el.style.position = 'absolute';
|
|
5941
|
+
el.style.top = '-1000px';
|
|
5942
|
+
el.style.width = '100px'; // must be at least the side of scrollbars or you get inaccurate values (#7335)
|
|
5943
|
+
el.style.height = '100px'; // "
|
|
5944
|
+
el.style.overflow = 'scroll';
|
|
5945
|
+
el.style.direction = 'rtl';
|
|
5946
|
+
let innerEl = document.createElement('div');
|
|
5947
|
+
innerEl.style.width = '200px';
|
|
5948
|
+
innerEl.style.height = '200px';
|
|
5949
|
+
el.appendChild(innerEl);
|
|
5950
|
+
document.body.appendChild(el);
|
|
5951
|
+
let system;
|
|
5952
|
+
if (el.scrollLeft > 0) {
|
|
5953
|
+
system = 'positive'; // scroll is a positive number from the left edge
|
|
5954
|
+
}
|
|
5955
|
+
else {
|
|
5956
|
+
el.scrollLeft = 50;
|
|
5957
|
+
if (el.scrollLeft > 0) {
|
|
5958
|
+
system = 'reverse'; // scroll is a positive number from the right edge
|
|
5959
|
+
}
|
|
5960
|
+
else {
|
|
5961
|
+
system = 'negative'; // scroll is a negative number from the right edge
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5964
|
+
let rightScrollbars = innerEl.getBoundingClientRect().right < el.getBoundingClientRect().right;
|
|
5965
|
+
removeElement(el);
|
|
5966
|
+
return { system, leftScrollbars: !rightScrollbars };
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5657
5969
|
class Slicer {
|
|
5658
5970
|
constructor() {
|
|
5659
5971
|
this.sliceBusinessHours = memoize(this._sliceBusinessHours);
|
|
@@ -6154,863 +6466,297 @@ var FullCalendar = (function (exports) {
|
|
|
6154
6466
|
let { pauseDepths } = this;
|
|
6155
6467
|
if (scope in pauseDepths) {
|
|
6156
6468
|
if (force) {
|
|
6157
|
-
delete pauseDepths[scope];
|
|
6158
|
-
}
|
|
6159
|
-
else {
|
|
6160
|
-
pauseDepths[scope] -= 1;
|
|
6161
|
-
let depth = pauseDepths[scope];
|
|
6162
|
-
if (depth <= 0) {
|
|
6163
|
-
delete pauseDepths[scope];
|
|
6164
|
-
}
|
|
6165
|
-
}
|
|
6166
|
-
this.tryDrain();
|
|
6167
|
-
}
|
|
6168
|
-
}
|
|
6169
|
-
isPaused() {
|
|
6170
|
-
return Object.keys(this.pauseDepths).length;
|
|
6171
|
-
}
|
|
6172
|
-
tryDrain() {
|
|
6173
|
-
if (!this.isRunning && !this.isPaused()) {
|
|
6174
|
-
this.isRunning = true;
|
|
6175
|
-
while (this.isDirty) {
|
|
6176
|
-
this.isDirty = false;
|
|
6177
|
-
this.drained(); // might set isDirty to true again
|
|
6178
|
-
}
|
|
6179
|
-
this.isRunning = false;
|
|
6180
|
-
}
|
|
6181
|
-
}
|
|
6182
|
-
clear() {
|
|
6183
|
-
this.clearTimeout();
|
|
6184
|
-
this.isDirty = false;
|
|
6185
|
-
this.pauseDepths = {};
|
|
6186
|
-
}
|
|
6187
|
-
clearTimeout() {
|
|
6188
|
-
if (this.timeoutId) {
|
|
6189
|
-
clearTimeout(this.timeoutId);
|
|
6190
|
-
this.timeoutId = 0;
|
|
6191
|
-
}
|
|
6192
|
-
}
|
|
6193
|
-
drained() {
|
|
6194
|
-
if (this.drainedOption) {
|
|
6195
|
-
this.drainedOption();
|
|
6196
|
-
}
|
|
6197
|
-
}
|
|
6198
|
-
}
|
|
6199
|
-
|
|
6200
|
-
const VISIBLE_HIDDEN_RE = /^(visible|hidden)$/;
|
|
6201
|
-
class Scroller extends BaseComponent {
|
|
6202
|
-
constructor() {
|
|
6203
|
-
super(...arguments);
|
|
6204
|
-
this.handleEl = (el) => {
|
|
6205
|
-
this.el = el;
|
|
6206
|
-
setRef(this.props.elRef, el);
|
|
6207
|
-
};
|
|
6208
|
-
}
|
|
6209
|
-
render() {
|
|
6210
|
-
let { props } = this;
|
|
6211
|
-
let { liquid, liquidIsAbsolute } = props;
|
|
6212
|
-
let isAbsolute = liquid && liquidIsAbsolute;
|
|
6213
|
-
let className = ['fc-scroller'];
|
|
6214
|
-
if (liquid) {
|
|
6215
|
-
if (liquidIsAbsolute) {
|
|
6216
|
-
className.push('fc-scroller-liquid-absolute');
|
|
6217
|
-
}
|
|
6218
|
-
else {
|
|
6219
|
-
className.push('fc-scroller-liquid');
|
|
6220
|
-
}
|
|
6221
|
-
}
|
|
6222
|
-
return (y("div", { ref: this.handleEl, className: className.join(' '), style: {
|
|
6223
|
-
overflowX: props.overflowX,
|
|
6224
|
-
overflowY: props.overflowY,
|
|
6225
|
-
left: (isAbsolute && -(props.overcomeLeft || 0)) || '',
|
|
6226
|
-
right: (isAbsolute && -(props.overcomeRight || 0)) || '',
|
|
6227
|
-
bottom: (isAbsolute && -(props.overcomeBottom || 0)) || '',
|
|
6228
|
-
marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || '',
|
|
6229
|
-
marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || '',
|
|
6230
|
-
marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || '',
|
|
6231
|
-
maxHeight: props.maxHeight || '',
|
|
6232
|
-
} }, props.children));
|
|
6233
|
-
}
|
|
6234
|
-
needsXScrolling() {
|
|
6235
|
-
if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {
|
|
6236
|
-
return false;
|
|
6237
|
-
}
|
|
6238
|
-
// testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers.
|
|
6239
|
-
// much more reliable to see if children are taller than the scroller, even tho doesn't account for
|
|
6240
|
-
// inner-child margins and absolute positioning
|
|
6241
|
-
let { el } = this;
|
|
6242
|
-
let realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth();
|
|
6243
|
-
let { children } = el;
|
|
6244
|
-
for (let i = 0; i < children.length; i += 1) {
|
|
6245
|
-
let childEl = children[i];
|
|
6246
|
-
if (childEl.getBoundingClientRect().width > realClientWidth) {
|
|
6247
|
-
return true;
|
|
6248
|
-
}
|
|
6249
|
-
}
|
|
6250
|
-
return false;
|
|
6251
|
-
}
|
|
6252
|
-
needsYScrolling() {
|
|
6253
|
-
if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {
|
|
6254
|
-
return false;
|
|
6255
|
-
}
|
|
6256
|
-
// testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers.
|
|
6257
|
-
// much more reliable to see if children are taller than the scroller, even tho doesn't account for
|
|
6258
|
-
// inner-child margins and absolute positioning
|
|
6259
|
-
let { el } = this;
|
|
6260
|
-
let realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth();
|
|
6261
|
-
let { children } = el;
|
|
6262
|
-
for (let i = 0; i < children.length; i += 1) {
|
|
6263
|
-
let childEl = children[i];
|
|
6264
|
-
if (childEl.getBoundingClientRect().height > realClientHeight) {
|
|
6265
|
-
return true;
|
|
6266
|
-
}
|
|
6267
|
-
}
|
|
6268
|
-
return false;
|
|
6269
|
-
}
|
|
6270
|
-
getXScrollbarWidth() {
|
|
6271
|
-
if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {
|
|
6272
|
-
return 0;
|
|
6273
|
-
}
|
|
6274
|
-
return this.el.offsetHeight - this.el.clientHeight; // only works because we guarantee no borders. TODO: add to CSS with important?
|
|
6275
|
-
}
|
|
6276
|
-
getYScrollbarWidth() {
|
|
6277
|
-
if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {
|
|
6278
|
-
return 0;
|
|
6279
|
-
}
|
|
6280
|
-
return this.el.offsetWidth - this.el.clientWidth; // only works because we guarantee no borders. TODO: add to CSS with important?
|
|
6281
|
-
}
|
|
6282
|
-
}
|
|
6283
|
-
|
|
6284
|
-
/*
|
|
6285
|
-
TODO: somehow infer OtherArgs from masterCallback?
|
|
6286
|
-
TODO: infer RefType from masterCallback if provided
|
|
6287
|
-
*/
|
|
6288
|
-
class RefMap {
|
|
6289
|
-
constructor(masterCallback) {
|
|
6290
|
-
this.masterCallback = masterCallback;
|
|
6291
|
-
this.currentMap = {};
|
|
6292
|
-
this.depths = {};
|
|
6293
|
-
this.callbackMap = {};
|
|
6294
|
-
this.handleValue = (val, key) => {
|
|
6295
|
-
let { depths, currentMap } = this;
|
|
6296
|
-
let removed = false;
|
|
6297
|
-
let added = false;
|
|
6298
|
-
if (val !== null) {
|
|
6299
|
-
// for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore
|
|
6300
|
-
removed = (key in currentMap);
|
|
6301
|
-
currentMap[key] = val;
|
|
6302
|
-
depths[key] = (depths[key] || 0) + 1;
|
|
6303
|
-
added = true;
|
|
6304
|
-
}
|
|
6305
|
-
else {
|
|
6306
|
-
depths[key] -= 1;
|
|
6307
|
-
if (!depths[key]) {
|
|
6308
|
-
delete currentMap[key];
|
|
6309
|
-
delete this.callbackMap[key];
|
|
6310
|
-
removed = true;
|
|
6311
|
-
}
|
|
6312
|
-
}
|
|
6313
|
-
if (this.masterCallback) {
|
|
6314
|
-
if (removed) {
|
|
6315
|
-
this.masterCallback(null, String(key));
|
|
6316
|
-
}
|
|
6317
|
-
if (added) {
|
|
6318
|
-
this.masterCallback(val, String(key));
|
|
6319
|
-
}
|
|
6320
|
-
}
|
|
6321
|
-
};
|
|
6322
|
-
}
|
|
6323
|
-
createRef(key) {
|
|
6324
|
-
let refCallback = this.callbackMap[key];
|
|
6325
|
-
if (!refCallback) {
|
|
6326
|
-
refCallback = this.callbackMap[key] = (val) => {
|
|
6327
|
-
this.handleValue(val, String(key));
|
|
6328
|
-
};
|
|
6329
|
-
}
|
|
6330
|
-
return refCallback;
|
|
6331
|
-
}
|
|
6332
|
-
// TODO: check callers that don't care about order. should use getAll instead
|
|
6333
|
-
// NOTE: this method has become less valuable now that we are encouraged to map order by some other index
|
|
6334
|
-
// TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and "collect"
|
|
6335
|
-
collect(startIndex, endIndex, step) {
|
|
6336
|
-
return collectFromHash(this.currentMap, startIndex, endIndex, step);
|
|
6337
|
-
}
|
|
6338
|
-
getAll() {
|
|
6339
|
-
return hashValuesToArray(this.currentMap);
|
|
6340
|
-
}
|
|
6341
|
-
}
|
|
6342
|
-
|
|
6343
|
-
function computeShrinkWidth(chunkEls) {
|
|
6344
|
-
let shrinkCells = findElements(chunkEls, '.fc-scrollgrid-shrink');
|
|
6345
|
-
let largestWidth = 0;
|
|
6346
|
-
for (let shrinkCell of shrinkCells) {
|
|
6347
|
-
largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell));
|
|
6348
|
-
}
|
|
6349
|
-
return Math.ceil(largestWidth); // <table> elements work best with integers. round up to ensure contents fits
|
|
6350
|
-
}
|
|
6351
|
-
function getSectionHasLiquidHeight(props, sectionConfig) {
|
|
6352
|
-
return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)
|
|
6353
|
-
}
|
|
6354
|
-
function getAllowYScrolling(props, sectionConfig) {
|
|
6355
|
-
return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars
|
|
6356
|
-
getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars
|
|
6357
|
-
}
|
|
6358
|
-
// TODO: ONLY use `arg`. force out internal function to use same API
|
|
6359
|
-
function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) {
|
|
6360
|
-
let { expandRows } = arg;
|
|
6361
|
-
let content = typeof chunkConfig.content === 'function' ?
|
|
6362
|
-
chunkConfig.content(arg) :
|
|
6363
|
-
y('table', {
|
|
6364
|
-
role: 'presentation',
|
|
6365
|
-
className: [
|
|
6366
|
-
chunkConfig.tableClassName,
|
|
6367
|
-
sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',
|
|
6368
|
-
].join(' '),
|
|
6369
|
-
style: {
|
|
6370
|
-
minWidth: arg.tableMinWidth,
|
|
6371
|
-
width: arg.clientWidth,
|
|
6372
|
-
height: expandRows ? arg.clientHeight : '', // css `height` on a <table> serves as a min-height
|
|
6373
|
-
},
|
|
6374
|
-
}, arg.tableColGroupNode, y(isHeader ? 'thead' : 'tbody', {
|
|
6375
|
-
role: 'presentation',
|
|
6376
|
-
}, typeof chunkConfig.rowContent === 'function'
|
|
6377
|
-
? chunkConfig.rowContent(arg)
|
|
6378
|
-
: chunkConfig.rowContent));
|
|
6379
|
-
return content;
|
|
6380
|
-
}
|
|
6381
|
-
function isColPropsEqual(cols0, cols1) {
|
|
6382
|
-
return isArraysEqual(cols0, cols1, isPropsEqual);
|
|
6383
|
-
}
|
|
6384
|
-
function renderMicroColGroup(cols, shrinkWidth) {
|
|
6385
|
-
let colNodes = [];
|
|
6386
|
-
/*
|
|
6387
|
-
for ColProps with spans, it would have been great to make a single <col span="">
|
|
6388
|
-
HOWEVER, Chrome was getting messing up distributing the width to <td>/<th> elements with colspans.
|
|
6389
|
-
SOLUTION: making individual <col> elements makes Chrome behave.
|
|
6390
|
-
*/
|
|
6391
|
-
for (let colProps of cols) {
|
|
6392
|
-
let span = colProps.span || 1;
|
|
6393
|
-
for (let i = 0; i < span; i += 1) {
|
|
6394
|
-
colNodes.push(y("col", { style: {
|
|
6395
|
-
width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''),
|
|
6396
|
-
minWidth: colProps.minWidth || '',
|
|
6397
|
-
} }));
|
|
6398
|
-
}
|
|
6399
|
-
}
|
|
6400
|
-
return y('colgroup', {}, ...colNodes);
|
|
6401
|
-
}
|
|
6402
|
-
function sanitizeShrinkWidth(shrinkWidth) {
|
|
6403
|
-
/* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth
|
|
6404
|
-
4 accounts for 2 2-pixel borders. TODO: better solution? */
|
|
6405
|
-
return shrinkWidth == null ? 4 : shrinkWidth;
|
|
6406
|
-
}
|
|
6407
|
-
function hasShrinkWidth(cols) {
|
|
6408
|
-
for (let col of cols) {
|
|
6409
|
-
if (col.width === 'shrink') {
|
|
6410
|
-
return true;
|
|
6411
|
-
}
|
|
6412
|
-
}
|
|
6413
|
-
return false;
|
|
6414
|
-
}
|
|
6415
|
-
function getScrollGridClassNames(liquid, context) {
|
|
6416
|
-
let classNames = [
|
|
6417
|
-
'fc-scrollgrid',
|
|
6418
|
-
context.theme.getClass('table'),
|
|
6419
|
-
];
|
|
6420
|
-
if (liquid) {
|
|
6421
|
-
classNames.push('fc-scrollgrid-liquid');
|
|
6422
|
-
}
|
|
6423
|
-
return classNames;
|
|
6424
|
-
}
|
|
6425
|
-
function getSectionClassNames(sectionConfig, wholeTableVGrow) {
|
|
6426
|
-
let classNames = [
|
|
6427
|
-
'fc-scrollgrid-section',
|
|
6428
|
-
`fc-scrollgrid-section-${sectionConfig.type}`,
|
|
6429
|
-
sectionConfig.className, // used?
|
|
6430
|
-
];
|
|
6431
|
-
if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) {
|
|
6432
|
-
classNames.push('fc-scrollgrid-section-liquid');
|
|
6433
|
-
}
|
|
6434
|
-
if (sectionConfig.isSticky) {
|
|
6435
|
-
classNames.push('fc-scrollgrid-section-sticky');
|
|
6436
|
-
}
|
|
6437
|
-
return classNames;
|
|
6438
|
-
}
|
|
6439
|
-
function renderScrollShim(arg) {
|
|
6440
|
-
return (y("div", { className: "fc-scrollgrid-sticky-shim", style: {
|
|
6441
|
-
width: arg.clientWidth,
|
|
6442
|
-
minWidth: arg.tableMinWidth,
|
|
6443
|
-
} }));
|
|
6444
|
-
}
|
|
6445
|
-
function getStickyHeaderDates(options) {
|
|
6446
|
-
let { stickyHeaderDates } = options;
|
|
6447
|
-
if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {
|
|
6448
|
-
stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto';
|
|
6449
|
-
}
|
|
6450
|
-
return stickyHeaderDates;
|
|
6451
|
-
}
|
|
6452
|
-
function getStickyFooterScrollbar(options) {
|
|
6453
|
-
let { stickyFooterScrollbar } = options;
|
|
6454
|
-
if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {
|
|
6455
|
-
stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto';
|
|
6456
|
-
}
|
|
6457
|
-
return stickyFooterScrollbar;
|
|
6458
|
-
}
|
|
6459
|
-
|
|
6460
|
-
class SimpleScrollGrid extends BaseComponent {
|
|
6461
|
-
constructor() {
|
|
6462
|
-
super(...arguments);
|
|
6463
|
-
this.processCols = memoize((a) => a, isColPropsEqual); // so we get same `cols` props every time
|
|
6464
|
-
// yucky to memoize VNodes, but much more efficient for consumers
|
|
6465
|
-
this.renderMicroColGroup = memoize(renderMicroColGroup);
|
|
6466
|
-
this.scrollerRefs = new RefMap();
|
|
6467
|
-
this.scrollerElRefs = new RefMap(this._handleScrollerEl.bind(this));
|
|
6468
|
-
this.state = {
|
|
6469
|
-
shrinkWidth: null,
|
|
6470
|
-
forceYScrollbars: false,
|
|
6471
|
-
scrollerClientWidths: {},
|
|
6472
|
-
scrollerClientHeights: {},
|
|
6473
|
-
};
|
|
6474
|
-
// TODO: can do a really simple print-view. dont need to join rows
|
|
6475
|
-
this.handleSizing = () => {
|
|
6476
|
-
this.safeSetState(Object.assign({ shrinkWidth: this.computeShrinkWidth() }, this.computeScrollerDims()));
|
|
6477
|
-
};
|
|
6478
|
-
}
|
|
6479
|
-
render() {
|
|
6480
|
-
let { props, state, context } = this;
|
|
6481
|
-
let sectionConfigs = props.sections || [];
|
|
6482
|
-
let cols = this.processCols(props.cols);
|
|
6483
|
-
let microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth);
|
|
6484
|
-
let classNames = getScrollGridClassNames(props.liquid, context);
|
|
6485
|
-
if (props.collapsibleWidth) {
|
|
6486
|
-
classNames.push('fc-scrollgrid-collapsible');
|
|
6487
|
-
}
|
|
6488
|
-
// TODO: make DRY
|
|
6489
|
-
let configCnt = sectionConfigs.length;
|
|
6490
|
-
let configI = 0;
|
|
6491
|
-
let currentConfig;
|
|
6492
|
-
let headSectionNodes = [];
|
|
6493
|
-
let bodySectionNodes = [];
|
|
6494
|
-
let footSectionNodes = [];
|
|
6495
|
-
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
|
|
6496
|
-
headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
|
|
6497
|
-
configI += 1;
|
|
6498
|
-
}
|
|
6499
|
-
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
|
|
6500
|
-
bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false));
|
|
6501
|
-
configI += 1;
|
|
6502
|
-
}
|
|
6503
|
-
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
|
|
6504
|
-
footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
|
|
6505
|
-
configI += 1;
|
|
6506
|
-
}
|
|
6507
|
-
// firefox bug: when setting height on table and there is a thead or tfoot,
|
|
6508
|
-
// the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524)
|
|
6509
|
-
// use getCanVGrowWithinCell as a way to detect table-stupid firefox.
|
|
6510
|
-
// if so, use a simpler dom structure, jam everything into a lone tbody.
|
|
6511
|
-
let isBuggy = !getCanVGrowWithinCell();
|
|
6512
|
-
const roleAttrs = { role: 'rowgroup' };
|
|
6513
|
-
return y('table', {
|
|
6514
|
-
role: 'grid',
|
|
6515
|
-
className: classNames.join(' '),
|
|
6516
|
-
style: { height: props.height },
|
|
6517
|
-
}, Boolean(!isBuggy && headSectionNodes.length) && y('thead', roleAttrs, ...headSectionNodes), Boolean(!isBuggy && bodySectionNodes.length) && y('tbody', roleAttrs, ...bodySectionNodes), Boolean(!isBuggy && footSectionNodes.length) && y('tfoot', roleAttrs, ...footSectionNodes), isBuggy && y('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes));
|
|
6518
|
-
}
|
|
6519
|
-
renderSection(sectionConfig, microColGroupNode, isHeader) {
|
|
6520
|
-
if ('outerContent' in sectionConfig) {
|
|
6521
|
-
return (y(_, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
6522
|
-
}
|
|
6523
|
-
return (y("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)));
|
|
6524
|
-
}
|
|
6525
|
-
renderChunkTd(sectionConfig, microColGroupNode, chunkConfig, isHeader) {
|
|
6526
|
-
if ('outerContent' in chunkConfig) {
|
|
6527
|
-
return chunkConfig.outerContent;
|
|
6528
|
-
}
|
|
6529
|
-
let { props } = this;
|
|
6530
|
-
let { forceYScrollbars, scrollerClientWidths, scrollerClientHeights } = this.state;
|
|
6531
|
-
let needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config?
|
|
6532
|
-
let isLiquid = getSectionHasLiquidHeight(props, sectionConfig);
|
|
6533
|
-
// for `!props.liquid` - is WHOLE scrollgrid natural height?
|
|
6534
|
-
// TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars
|
|
6535
|
-
let overflowY = !props.liquid ? 'visible' :
|
|
6536
|
-
forceYScrollbars ? 'scroll' :
|
|
6537
|
-
!needsYScrolling ? 'hidden' :
|
|
6538
|
-
'auto';
|
|
6539
|
-
let sectionKey = sectionConfig.key;
|
|
6540
|
-
let content = renderChunkContent(sectionConfig, chunkConfig, {
|
|
6541
|
-
tableColGroupNode: microColGroupNode,
|
|
6542
|
-
tableMinWidth: '',
|
|
6543
|
-
clientWidth: (!props.collapsibleWidth && scrollerClientWidths[sectionKey] !== undefined) ? scrollerClientWidths[sectionKey] : null,
|
|
6544
|
-
clientHeight: scrollerClientHeights[sectionKey] !== undefined ? scrollerClientHeights[sectionKey] : null,
|
|
6545
|
-
expandRows: sectionConfig.expandRows,
|
|
6546
|
-
syncRowHeights: false,
|
|
6547
|
-
rowSyncHeights: [],
|
|
6548
|
-
reportRowHeightChange: () => { },
|
|
6549
|
-
}, isHeader);
|
|
6550
|
-
return y(isHeader ? 'th' : 'td', {
|
|
6551
|
-
ref: chunkConfig.elRef,
|
|
6552
|
-
role: 'presentation',
|
|
6553
|
-
}, y("div", { className: `fc-scroller-harness${isLiquid ? ' fc-scroller-harness-liquid' : ''}` },
|
|
6554
|
-
y(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY: overflowY, overflowX: !props.liquid ? 'visible' : 'hidden' /* natural height? */, maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute // because its within a harness
|
|
6555
|
-
: true }, content)));
|
|
6556
|
-
}
|
|
6557
|
-
_handleScrollerEl(scrollerEl, key) {
|
|
6558
|
-
let section = getSectionByKey(this.props.sections, key);
|
|
6559
|
-
if (section) {
|
|
6560
|
-
setRef(section.chunk.scrollerElRef, scrollerEl);
|
|
6561
|
-
}
|
|
6562
|
-
}
|
|
6563
|
-
componentDidMount() {
|
|
6564
|
-
this.handleSizing();
|
|
6565
|
-
this.context.addResizeHandler(this.handleSizing);
|
|
6566
|
-
}
|
|
6567
|
-
componentDidUpdate() {
|
|
6568
|
-
// TODO: need better solution when state contains non-sizing things
|
|
6569
|
-
this.handleSizing();
|
|
6570
|
-
}
|
|
6571
|
-
componentWillUnmount() {
|
|
6572
|
-
this.context.removeResizeHandler(this.handleSizing);
|
|
6573
|
-
}
|
|
6574
|
-
computeShrinkWidth() {
|
|
6575
|
-
return hasShrinkWidth(this.props.cols)
|
|
6576
|
-
? computeShrinkWidth(this.scrollerElRefs.getAll())
|
|
6577
|
-
: 0;
|
|
6578
|
-
}
|
|
6579
|
-
computeScrollerDims() {
|
|
6580
|
-
let scrollbarWidth = getScrollbarWidths();
|
|
6581
|
-
let { scrollerRefs, scrollerElRefs } = this;
|
|
6582
|
-
let forceYScrollbars = false;
|
|
6583
|
-
let scrollerClientWidths = {};
|
|
6584
|
-
let scrollerClientHeights = {};
|
|
6585
|
-
for (let sectionKey in scrollerRefs.currentMap) {
|
|
6586
|
-
let scroller = scrollerRefs.currentMap[sectionKey];
|
|
6587
|
-
if (scroller && scroller.needsYScrolling()) {
|
|
6588
|
-
forceYScrollbars = true;
|
|
6589
|
-
break;
|
|
6590
|
-
}
|
|
6591
|
-
}
|
|
6592
|
-
for (let section of this.props.sections) {
|
|
6593
|
-
let sectionKey = section.key;
|
|
6594
|
-
let scrollerEl = scrollerElRefs.currentMap[sectionKey];
|
|
6595
|
-
if (scrollerEl) {
|
|
6596
|
-
let harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders
|
|
6597
|
-
scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars
|
|
6598
|
-
? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future
|
|
6599
|
-
: 0));
|
|
6600
|
-
scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height);
|
|
6601
|
-
}
|
|
6602
|
-
}
|
|
6603
|
-
return { forceYScrollbars, scrollerClientWidths, scrollerClientHeights };
|
|
6604
|
-
}
|
|
6605
|
-
}
|
|
6606
|
-
SimpleScrollGrid.addStateEquality({
|
|
6607
|
-
scrollerClientWidths: isPropsEqual,
|
|
6608
|
-
scrollerClientHeights: isPropsEqual,
|
|
6609
|
-
});
|
|
6610
|
-
function getSectionByKey(sections, key) {
|
|
6611
|
-
for (let section of sections) {
|
|
6612
|
-
if (section.key === key) {
|
|
6613
|
-
return section;
|
|
6614
|
-
}
|
|
6615
|
-
}
|
|
6616
|
-
return null;
|
|
6617
|
-
}
|
|
6618
|
-
|
|
6619
|
-
class EventContainer extends BaseComponent {
|
|
6620
|
-
constructor() {
|
|
6621
|
-
super(...arguments);
|
|
6622
|
-
this.handleEl = (el) => {
|
|
6623
|
-
this.el = el;
|
|
6624
|
-
if (el) {
|
|
6625
|
-
setElSeg(el, this.props.seg);
|
|
6626
|
-
}
|
|
6627
|
-
};
|
|
6628
|
-
}
|
|
6629
|
-
render() {
|
|
6630
|
-
const { props, context } = this;
|
|
6631
|
-
const { options } = context;
|
|
6632
|
-
const { seg } = props;
|
|
6633
|
-
const { eventRange } = seg;
|
|
6634
|
-
const { ui } = eventRange;
|
|
6635
|
-
const renderProps = {
|
|
6636
|
-
event: new EventImpl(context, eventRange.def, eventRange.instance),
|
|
6637
|
-
view: context.viewApi,
|
|
6638
|
-
timeText: props.timeText,
|
|
6639
|
-
textColor: ui.textColor,
|
|
6640
|
-
backgroundColor: ui.backgroundColor,
|
|
6641
|
-
borderColor: ui.borderColor,
|
|
6642
|
-
isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
|
|
6643
|
-
isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
|
|
6644
|
-
isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
|
|
6645
|
-
isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
|
|
6646
|
-
isStart: Boolean(seg.isStart),
|
|
6647
|
-
isEnd: Boolean(seg.isEnd),
|
|
6648
|
-
isPast: Boolean(props.isPast),
|
|
6649
|
-
isFuture: Boolean(props.isFuture),
|
|
6650
|
-
isToday: Boolean(props.isToday),
|
|
6651
|
-
isSelected: Boolean(props.isSelected),
|
|
6652
|
-
isDragging: Boolean(props.isDragging),
|
|
6653
|
-
isResizing: Boolean(props.isResizing),
|
|
6654
|
-
};
|
|
6655
|
-
return (y(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
|
|
6656
|
-
...getEventClassNames(renderProps),
|
|
6657
|
-
...seg.eventRange.ui.classNames,
|
|
6658
|
-
...(props.elClasses || []),
|
|
6659
|
-
], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
|
|
6469
|
+
delete pauseDepths[scope];
|
|
6470
|
+
}
|
|
6471
|
+
else {
|
|
6472
|
+
pauseDepths[scope] -= 1;
|
|
6473
|
+
let depth = pauseDepths[scope];
|
|
6474
|
+
if (depth <= 0) {
|
|
6475
|
+
delete pauseDepths[scope];
|
|
6476
|
+
}
|
|
6477
|
+
}
|
|
6478
|
+
this.tryDrain();
|
|
6479
|
+
}
|
|
6660
6480
|
}
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6481
|
+
isPaused() {
|
|
6482
|
+
return Object.keys(this.pauseDepths).length;
|
|
6483
|
+
}
|
|
6484
|
+
tryDrain() {
|
|
6485
|
+
if (!this.isRunning && !this.isPaused()) {
|
|
6486
|
+
this.isRunning = true;
|
|
6487
|
+
while (this.isDirty) {
|
|
6488
|
+
this.isDirty = false;
|
|
6489
|
+
this.drained(); // might set isDirty to true again
|
|
6490
|
+
}
|
|
6491
|
+
this.isRunning = false;
|
|
6664
6492
|
}
|
|
6665
6493
|
}
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
render() {
|
|
6671
|
-
let { props, context } = this;
|
|
6672
|
-
let { options } = context;
|
|
6673
|
-
let { seg } = props;
|
|
6674
|
-
let { ui } = seg.eventRange;
|
|
6675
|
-
let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
|
|
6676
|
-
let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
|
|
6677
|
-
return (y(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
|
|
6678
|
-
borderColor: ui.borderColor,
|
|
6679
|
-
backgroundColor: ui.backgroundColor,
|
|
6680
|
-
}, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (y(_, null,
|
|
6681
|
-
y(InnerContent, { elTag: "div", elClasses: ['fc-event-main'], elStyle: { color: eventContentArg.textColor } }),
|
|
6682
|
-
Boolean(eventContentArg.isStartResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-start" })),
|
|
6683
|
-
Boolean(eventContentArg.isEndResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
6494
|
+
clear() {
|
|
6495
|
+
this.clearTimeout();
|
|
6496
|
+
this.isDirty = false;
|
|
6497
|
+
this.pauseDepths = {};
|
|
6684
6498
|
}
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
y("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || y(_, null, "\u00A0")))));
|
|
6691
|
-
}
|
|
6692
|
-
|
|
6693
|
-
const NowIndicatorContainer = (props) => (y(ViewContextType.Consumer, null, (context) => {
|
|
6694
|
-
let { options } = context;
|
|
6695
|
-
let renderProps = {
|
|
6696
|
-
isAxis: props.isAxis,
|
|
6697
|
-
date: context.dateEnv.toDate(props.date),
|
|
6698
|
-
view: context.viewApi,
|
|
6699
|
-
};
|
|
6700
|
-
return (y(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
|
|
6701
|
-
}));
|
|
6702
|
-
|
|
6703
|
-
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
6704
|
-
class DayCellContainer extends BaseComponent {
|
|
6705
|
-
constructor() {
|
|
6706
|
-
super(...arguments);
|
|
6707
|
-
this.refineRenderProps = memoizeObjArg(refineRenderProps);
|
|
6499
|
+
clearTimeout() {
|
|
6500
|
+
if (this.timeoutId) {
|
|
6501
|
+
clearTimeout(this.timeoutId);
|
|
6502
|
+
this.timeoutId = 0;
|
|
6503
|
+
}
|
|
6708
6504
|
}
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
date: props.date,
|
|
6714
|
-
dateProfile: props.dateProfile,
|
|
6715
|
-
todayRange: props.todayRange,
|
|
6716
|
-
isMonthStart: props.isMonthStart || false,
|
|
6717
|
-
showDayNumber: props.showDayNumber,
|
|
6718
|
-
extraRenderProps: props.extraRenderProps,
|
|
6719
|
-
viewApi: context.viewApi,
|
|
6720
|
-
dateEnv: context.dateEnv,
|
|
6721
|
-
monthStartFormat: options.monthStartFormat,
|
|
6722
|
-
});
|
|
6723
|
-
return (y(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
|
|
6724
|
-
...getDayClassNames(renderProps, context.theme),
|
|
6725
|
-
...(props.elClasses || []),
|
|
6726
|
-
], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
|
|
6727
|
-
// don't use custom classNames if disabled
|
|
6728
|
-
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
|
|
6505
|
+
drained() {
|
|
6506
|
+
if (this.drainedOption) {
|
|
6507
|
+
this.drainedOption();
|
|
6508
|
+
}
|
|
6729
6509
|
}
|
|
6730
6510
|
}
|
|
6731
|
-
function hasCustomDayCellContent(options) {
|
|
6732
|
-
return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
|
|
6733
|
-
}
|
|
6734
|
-
function refineRenderProps(raw) {
|
|
6735
|
-
let { date, dateEnv, dateProfile, isMonthStart } = raw;
|
|
6736
|
-
let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
|
|
6737
|
-
let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
|
|
6738
|
-
return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
|
|
6739
|
-
dayNumberText }), raw.extraRenderProps);
|
|
6740
|
-
}
|
|
6741
6511
|
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
let { props } = this;
|
|
6745
|
-
let { seg } = props;
|
|
6746
|
-
return (y(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: seg.eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, seg: seg, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
|
|
6747
|
-
}
|
|
6512
|
+
function getIsHeightAuto(options) {
|
|
6513
|
+
return options.height === 'auto' || options.viewHeight === 'auto';
|
|
6748
6514
|
}
|
|
6749
|
-
function
|
|
6750
|
-
let {
|
|
6751
|
-
|
|
6515
|
+
function getStickyHeaderDates(options) {
|
|
6516
|
+
let { stickyHeaderDates } = options;
|
|
6517
|
+
if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {
|
|
6518
|
+
stickyHeaderDates = getIsHeightAuto(options);
|
|
6519
|
+
}
|
|
6520
|
+
return stickyHeaderDates;
|
|
6752
6521
|
}
|
|
6753
|
-
function
|
|
6754
|
-
|
|
6522
|
+
function getStickyFooterScrollbar(options) {
|
|
6523
|
+
let { stickyFooterScrollbar } = options;
|
|
6524
|
+
if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {
|
|
6525
|
+
stickyFooterScrollbar = getIsHeightAuto(options);
|
|
6526
|
+
}
|
|
6527
|
+
return stickyFooterScrollbar;
|
|
6755
6528
|
}
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
let text = dateEnv.format(date, format);
|
|
6763
|
-
let renderProps = { num, text, date };
|
|
6764
|
-
return (y(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
|
|
6765
|
-
, Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
|
|
6766
|
-
}));
|
|
6767
|
-
function renderInner(innerProps) {
|
|
6768
|
-
return innerProps.text;
|
|
6529
|
+
function getScrollerSyncerClass(pluginHooks) {
|
|
6530
|
+
const ScrollerSyncer = pluginHooks.scrollerSyncerClass;
|
|
6531
|
+
if (!ScrollerSyncer) {
|
|
6532
|
+
throw new RangeError('Must import @fullcalendar/scrollgrid');
|
|
6533
|
+
}
|
|
6534
|
+
return ScrollerSyncer;
|
|
6769
6535
|
}
|
|
6770
6536
|
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
this.
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
this.handleDocumentMouseDown = (ev) => {
|
|
6786
|
-
// only hide the popover if the click happened outside the popover
|
|
6787
|
-
const target = getEventTargetViaRoot(ev);
|
|
6788
|
-
if (!this.rootEl.contains(target)) {
|
|
6789
|
-
this.handleCloseClick();
|
|
6537
|
+
/*
|
|
6538
|
+
TODO: make API where createRefMap() called
|
|
6539
|
+
*/
|
|
6540
|
+
class RefMap {
|
|
6541
|
+
constructor(masterCallback) {
|
|
6542
|
+
this.masterCallback = masterCallback;
|
|
6543
|
+
this.rev = '';
|
|
6544
|
+
this.current = new Map();
|
|
6545
|
+
this.callbacks = new Map;
|
|
6546
|
+
this.handleValue = (val, key) => {
|
|
6547
|
+
let { current, callbacks } = this;
|
|
6548
|
+
if (val === null) {
|
|
6549
|
+
current.delete(key);
|
|
6550
|
+
callbacks.delete(key);
|
|
6790
6551
|
}
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
if (ev.key === 'Escape') {
|
|
6794
|
-
this.handleCloseClick();
|
|
6552
|
+
else {
|
|
6553
|
+
current.set(key, val);
|
|
6795
6554
|
}
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
if (onClose) {
|
|
6800
|
-
onClose();
|
|
6555
|
+
this.rev = guid();
|
|
6556
|
+
if (this.masterCallback) {
|
|
6557
|
+
this.masterCallback(val, key);
|
|
6801
6558
|
}
|
|
6802
6559
|
};
|
|
6803
6560
|
}
|
|
6561
|
+
createRef(key) {
|
|
6562
|
+
let refCallback = this.callbacks.get(key);
|
|
6563
|
+
if (!refCallback) {
|
|
6564
|
+
refCallback = (val) => {
|
|
6565
|
+
this.handleValue(val, key);
|
|
6566
|
+
};
|
|
6567
|
+
this.callbacks.set(key, refCallback);
|
|
6568
|
+
}
|
|
6569
|
+
return refCallback;
|
|
6570
|
+
}
|
|
6571
|
+
}
|
|
6572
|
+
|
|
6573
|
+
class NowTimer extends b {
|
|
6574
|
+
constructor(props, context) {
|
|
6575
|
+
super(props, context);
|
|
6576
|
+
this.initialNowDate = getNow(context.options.now, context.dateEnv);
|
|
6577
|
+
this.initialNowQueriedMs = new Date().valueOf();
|
|
6578
|
+
this.state = this.computeTiming().currentState;
|
|
6579
|
+
}
|
|
6804
6580
|
render() {
|
|
6805
|
-
let { theme, options } = this.context;
|
|
6806
6581
|
let { props, state } = this;
|
|
6807
|
-
|
|
6808
|
-
'fc-popover',
|
|
6809
|
-
theme.getClass('popover'),
|
|
6810
|
-
].concat(props.extraClassNames || []);
|
|
6811
|
-
return j(y("div", Object.assign({}, props.extraAttrs, { id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId, ref: this.handleRootEl }),
|
|
6812
|
-
y("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
|
|
6813
|
-
y("span", { className: "fc-popover-title", id: state.titleId }, props.title),
|
|
6814
|
-
y("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
|
|
6815
|
-
y("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
|
|
6582
|
+
return props.children(state.nowDate, state.todayRange);
|
|
6816
6583
|
}
|
|
6817
6584
|
componentDidMount() {
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6585
|
+
this.setTimeout();
|
|
6586
|
+
}
|
|
6587
|
+
componentDidUpdate(prevProps) {
|
|
6588
|
+
if (prevProps.unit !== this.props.unit) {
|
|
6589
|
+
this.clearTimeout();
|
|
6590
|
+
this.setTimeout();
|
|
6591
|
+
}
|
|
6821
6592
|
}
|
|
6822
6593
|
componentWillUnmount() {
|
|
6823
|
-
|
|
6824
|
-
document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
|
6594
|
+
this.clearTimeout();
|
|
6825
6595
|
}
|
|
6826
|
-
|
|
6827
|
-
let {
|
|
6828
|
-
let
|
|
6829
|
-
let
|
|
6830
|
-
let
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6596
|
+
computeTiming() {
|
|
6597
|
+
let { props, context } = this;
|
|
6598
|
+
let unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs);
|
|
6599
|
+
let currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit);
|
|
6600
|
+
let nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit));
|
|
6601
|
+
let waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf();
|
|
6602
|
+
// there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)
|
|
6603
|
+
// ensure no longer than a day
|
|
6604
|
+
waitMs = Math.min(1000 * 60 * 60 * 24, waitMs);
|
|
6605
|
+
return {
|
|
6606
|
+
currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) },
|
|
6607
|
+
nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) },
|
|
6608
|
+
waitMs,
|
|
6609
|
+
};
|
|
6610
|
+
}
|
|
6611
|
+
setTimeout() {
|
|
6612
|
+
let { nextState, waitMs } = this.computeTiming();
|
|
6613
|
+
this.timeoutId = setTimeout(() => {
|
|
6614
|
+
this.setState(nextState, () => {
|
|
6615
|
+
this.setTimeout();
|
|
6846
6616
|
});
|
|
6617
|
+
}, waitMs);
|
|
6618
|
+
}
|
|
6619
|
+
clearTimeout() {
|
|
6620
|
+
if (this.timeoutId) {
|
|
6621
|
+
clearTimeout(this.timeoutId);
|
|
6622
|
+
}
|
|
6623
|
+
}
|
|
6624
|
+
}
|
|
6625
|
+
NowTimer.contextType = ViewContextType;
|
|
6626
|
+
function buildDayRange(date) {
|
|
6627
|
+
let start = startOfDay(date);
|
|
6628
|
+
let end = addDays(start, 1);
|
|
6629
|
+
return { start, end };
|
|
6630
|
+
}
|
|
6631
|
+
|
|
6632
|
+
class ScrollResponder {
|
|
6633
|
+
constructor(_handleScroll) {
|
|
6634
|
+
this._handleScroll = _handleScroll;
|
|
6635
|
+
this.handleScroll = (scroll) => {
|
|
6636
|
+
this.queuedScroll = scroll;
|
|
6637
|
+
this.drain();
|
|
6638
|
+
};
|
|
6639
|
+
}
|
|
6640
|
+
drain() {
|
|
6641
|
+
if (this.queuedScroll) {
|
|
6642
|
+
if (this._handleScroll(this.queuedScroll)) {
|
|
6643
|
+
this.queuedScroll = undefined;
|
|
6644
|
+
}
|
|
6847
6645
|
}
|
|
6848
6646
|
}
|
|
6849
6647
|
}
|
|
6850
6648
|
|
|
6851
|
-
class
|
|
6649
|
+
class EventContainer extends BaseComponent {
|
|
6852
6650
|
constructor() {
|
|
6853
6651
|
super(...arguments);
|
|
6854
|
-
this.
|
|
6855
|
-
this.
|
|
6856
|
-
if (
|
|
6857
|
-
this.
|
|
6858
|
-
el: rootEl,
|
|
6859
|
-
useEventCenter: false,
|
|
6860
|
-
});
|
|
6861
|
-
}
|
|
6862
|
-
else {
|
|
6863
|
-
this.context.unregisterInteractiveComponent(this);
|
|
6652
|
+
this.handleEl = (el) => {
|
|
6653
|
+
this.el = el;
|
|
6654
|
+
if (el) {
|
|
6655
|
+
setElSeg(el, this.props.seg);
|
|
6864
6656
|
}
|
|
6865
6657
|
};
|
|
6866
6658
|
}
|
|
6867
6659
|
render() {
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6660
|
+
const { props, context } = this;
|
|
6661
|
+
const { options } = context;
|
|
6662
|
+
const { seg } = props;
|
|
6663
|
+
const { eventRange } = seg;
|
|
6664
|
+
const { ui } = eventRange;
|
|
6665
|
+
const renderProps = {
|
|
6666
|
+
event: new EventImpl(context, eventRange.def, eventRange.instance),
|
|
6667
|
+
view: context.viewApi,
|
|
6668
|
+
timeText: props.timeText,
|
|
6669
|
+
textColor: ui.textColor,
|
|
6670
|
+
backgroundColor: ui.backgroundColor,
|
|
6671
|
+
borderColor: ui.borderColor,
|
|
6672
|
+
isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
|
|
6673
|
+
isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
|
|
6674
|
+
isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
|
|
6675
|
+
isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
|
|
6676
|
+
isStart: Boolean(seg.isStart),
|
|
6677
|
+
isEnd: Boolean(seg.isEnd),
|
|
6678
|
+
isPast: Boolean(props.isPast),
|
|
6679
|
+
isFuture: Boolean(props.isFuture),
|
|
6680
|
+
isToday: Boolean(props.isToday),
|
|
6681
|
+
isSelected: Boolean(props.isSelected),
|
|
6682
|
+
isDragging: Boolean(props.isDragging),
|
|
6683
|
+
isResizing: Boolean(props.isResizing),
|
|
6684
|
+
};
|
|
6685
|
+
return (_(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
|
|
6686
|
+
...getEventClassNames(renderProps),
|
|
6687
|
+
...seg.eventRange.ui.classNames,
|
|
6688
|
+
...(props.elClasses || []),
|
|
6689
|
+
], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
|
|
6875
6690
|
}
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
positionTop >= 0 && positionTop < elHeight) {
|
|
6880
|
-
return {
|
|
6881
|
-
dateProfile: props.dateProfile,
|
|
6882
|
-
dateSpan: Object.assign({ allDay: !props.forceTimed, range: {
|
|
6883
|
-
start: props.startDate,
|
|
6884
|
-
end: props.endDate,
|
|
6885
|
-
} }, props.extraDateSpan),
|
|
6886
|
-
dayEl: rootEl,
|
|
6887
|
-
rect: {
|
|
6888
|
-
left: 0,
|
|
6889
|
-
top: 0,
|
|
6890
|
-
right: elWidth,
|
|
6891
|
-
bottom: elHeight,
|
|
6892
|
-
},
|
|
6893
|
-
layer: 1, // important when comparing with hits from other components
|
|
6894
|
-
};
|
|
6691
|
+
componentDidUpdate(prevProps) {
|
|
6692
|
+
if (this.el && this.props.seg !== prevProps.seg) {
|
|
6693
|
+
setElSeg(this.el, this.props.seg);
|
|
6895
6694
|
}
|
|
6896
|
-
return null;
|
|
6897
6695
|
}
|
|
6898
6696
|
}
|
|
6899
6697
|
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
super(...arguments);
|
|
6903
|
-
this.state = {
|
|
6904
|
-
isPopoverOpen: false,
|
|
6905
|
-
popoverId: getUniqueDomId(),
|
|
6906
|
-
};
|
|
6907
|
-
this.handleLinkEl = (linkEl) => {
|
|
6908
|
-
this.linkEl = linkEl;
|
|
6909
|
-
if (this.props.elRef) {
|
|
6910
|
-
setRef(this.props.elRef, linkEl);
|
|
6911
|
-
}
|
|
6912
|
-
};
|
|
6913
|
-
this.handleClick = (ev) => {
|
|
6914
|
-
let { props, context } = this;
|
|
6915
|
-
let { moreLinkClick } = context.options;
|
|
6916
|
-
let date = computeRange(props).start;
|
|
6917
|
-
function buildPublicSeg(seg) {
|
|
6918
|
-
let { def, instance, range } = seg.eventRange;
|
|
6919
|
-
return {
|
|
6920
|
-
event: new EventImpl(context, def, instance),
|
|
6921
|
-
start: context.dateEnv.toDate(range.start),
|
|
6922
|
-
end: context.dateEnv.toDate(range.end),
|
|
6923
|
-
isStart: seg.isStart,
|
|
6924
|
-
isEnd: seg.isEnd,
|
|
6925
|
-
};
|
|
6926
|
-
}
|
|
6927
|
-
if (typeof moreLinkClick === 'function') {
|
|
6928
|
-
moreLinkClick = moreLinkClick({
|
|
6929
|
-
date,
|
|
6930
|
-
allDay: Boolean(props.allDayDate),
|
|
6931
|
-
allSegs: props.allSegs.map(buildPublicSeg),
|
|
6932
|
-
hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
|
|
6933
|
-
jsEvent: ev,
|
|
6934
|
-
view: context.viewApi,
|
|
6935
|
-
});
|
|
6936
|
-
}
|
|
6937
|
-
if (!moreLinkClick || moreLinkClick === 'popover') {
|
|
6938
|
-
this.setState({ isPopoverOpen: true });
|
|
6939
|
-
}
|
|
6940
|
-
else if (typeof moreLinkClick === 'string') { // a view name
|
|
6941
|
-
context.calendarApi.zoomTo(date, moreLinkClick);
|
|
6942
|
-
}
|
|
6943
|
-
};
|
|
6944
|
-
this.handlePopoverClose = () => {
|
|
6945
|
-
this.setState({ isPopoverOpen: false });
|
|
6946
|
-
};
|
|
6947
|
-
}
|
|
6698
|
+
// should not be a purecomponent
|
|
6699
|
+
class StandardEvent extends BaseComponent {
|
|
6948
6700
|
render() {
|
|
6949
|
-
let { props,
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
:
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
text,
|
|
6963
|
-
view: viewApi,
|
|
6964
|
-
};
|
|
6965
|
-
return (y(_, null,
|
|
6966
|
-
Boolean(props.moreCnt) && (y(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [
|
|
6967
|
-
...(props.elClasses || []),
|
|
6968
|
-
'fc-more-link',
|
|
6969
|
-
], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
|
|
6970
|
-
state.isPopoverOpen && (y(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ?
|
|
6971
|
-
props.alignmentElRef.current :
|
|
6972
|
-
this.linkEl, alignGridTop: props.alignGridTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent()))));
|
|
6973
|
-
}));
|
|
6974
|
-
}
|
|
6975
|
-
componentDidMount() {
|
|
6976
|
-
this.updateParentEl();
|
|
6977
|
-
}
|
|
6978
|
-
componentDidUpdate() {
|
|
6979
|
-
this.updateParentEl();
|
|
6980
|
-
}
|
|
6981
|
-
updateParentEl() {
|
|
6982
|
-
if (this.linkEl) {
|
|
6983
|
-
this.parentEl = elementClosest(this.linkEl, '.fc-view-harness');
|
|
6984
|
-
}
|
|
6701
|
+
let { props, context } = this;
|
|
6702
|
+
let { options } = context;
|
|
6703
|
+
let { seg } = props;
|
|
6704
|
+
let { ui } = seg.eventRange;
|
|
6705
|
+
let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
|
|
6706
|
+
let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
|
|
6707
|
+
return (_(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
|
|
6708
|
+
borderColor: ui.borderColor,
|
|
6709
|
+
backgroundColor: ui.backgroundColor,
|
|
6710
|
+
}, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (_(k$1, null,
|
|
6711
|
+
_(InnerContent, { elTag: "div", elClasses: ['fc-event-inner'], elStyle: { color: eventContentArg.textColor } }),
|
|
6712
|
+
Boolean(eventContentArg.isStartResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-start" })),
|
|
6713
|
+
Boolean(eventContentArg.isEndResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
6985
6714
|
}
|
|
6986
6715
|
}
|
|
6987
|
-
function
|
|
6988
|
-
return
|
|
6716
|
+
function renderInnerContent$1(innerProps) {
|
|
6717
|
+
return (_(k$1, null,
|
|
6718
|
+
innerProps.timeText && (_("div", { className: "fc-event-time" }, innerProps.timeText)),
|
|
6719
|
+
_("div", { className: "fc-event-title-outer" },
|
|
6720
|
+
_("div", { className: "fc-event-title" }, innerProps.event.title || _(k$1, null, "\u00A0")))));
|
|
6989
6721
|
}
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
let { hiddenSegs } = props;
|
|
6998
|
-
return {
|
|
6999
|
-
start: computeEarliestSegStart(hiddenSegs),
|
|
7000
|
-
end: computeLatestSegEnd(hiddenSegs),
|
|
6722
|
+
|
|
6723
|
+
const NowIndicatorContainer = (props) => (_(ViewContextType.Consumer, null, (context) => {
|
|
6724
|
+
let { options } = context;
|
|
6725
|
+
let renderProps = {
|
|
6726
|
+
isAxis: props.isAxis,
|
|
6727
|
+
date: context.dateEnv.toDate(props.date),
|
|
6728
|
+
view: context.viewApi,
|
|
7001
6729
|
};
|
|
6730
|
+
return (_(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
|
|
6731
|
+
}));
|
|
6732
|
+
|
|
6733
|
+
class BgEvent extends BaseComponent {
|
|
6734
|
+
render() {
|
|
6735
|
+
let { props } = this;
|
|
6736
|
+
let { seg } = props;
|
|
6737
|
+
return (_(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: seg.eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, seg: seg, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
|
|
6738
|
+
}
|
|
7002
6739
|
}
|
|
7003
|
-
function
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
function pickEarliestStart(seg0, seg1) {
|
|
7007
|
-
return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;
|
|
6740
|
+
function renderInnerContent(props) {
|
|
6741
|
+
let { title } = props.event;
|
|
6742
|
+
return title && (_("div", { className: "fc-event-title" }, props.event.title));
|
|
7008
6743
|
}
|
|
7009
|
-
function
|
|
7010
|
-
return
|
|
6744
|
+
function renderFill(fillType) {
|
|
6745
|
+
return (_("div", { className: `fc-${fillType}` }));
|
|
7011
6746
|
}
|
|
7012
|
-
|
|
7013
|
-
|
|
6747
|
+
|
|
6748
|
+
const WeekNumberContainer = (props) => (_(ViewContextType.Consumer, null, (context) => {
|
|
6749
|
+
let { dateEnv, options } = context;
|
|
6750
|
+
let { date } = props;
|
|
6751
|
+
let format = options.weekNumberFormat || props.defaultFormat;
|
|
6752
|
+
let num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well?
|
|
6753
|
+
let text = dateEnv.format(date, format);
|
|
6754
|
+
let renderProps = { num, text, date };
|
|
6755
|
+
return (_(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
|
|
6756
|
+
, Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
|
|
6757
|
+
}));
|
|
6758
|
+
function renderInner(innerProps) {
|
|
6759
|
+
return innerProps.text;
|
|
7014
6760
|
}
|
|
7015
6761
|
|
|
7016
6762
|
class ViewContainer extends BaseComponent {
|
|
@@ -7018,7 +6764,7 @@ var FullCalendar = (function (exports) {
|
|
|
7018
6764
|
let { props, context } = this;
|
|
7019
6765
|
let { options } = context;
|
|
7020
6766
|
let renderProps = { view: context.viewApi };
|
|
7021
|
-
return (
|
|
6767
|
+
return (_(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [
|
|
7022
6768
|
...buildViewClassNames(props.viewSpec),
|
|
7023
6769
|
...(props.elClasses || []),
|
|
7024
6770
|
], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children));
|
|
@@ -7092,6 +6838,9 @@ var FullCalendar = (function (exports) {
|
|
|
7092
6838
|
return null;
|
|
7093
6839
|
}
|
|
7094
6840
|
|
|
6841
|
+
/*
|
|
6842
|
+
Calendar instance for ALL frameworks
|
|
6843
|
+
*/
|
|
7095
6844
|
class CalendarImpl {
|
|
7096
6845
|
getCurrentData() {
|
|
7097
6846
|
return this.currentDataManager.getCurrentData();
|
|
@@ -7104,7 +6853,7 @@ var FullCalendar = (function (exports) {
|
|
|
7104
6853
|
callback();
|
|
7105
6854
|
}
|
|
7106
6855
|
updateSize() {
|
|
7107
|
-
|
|
6856
|
+
console.warn('Doesnt do anything!');
|
|
7108
6857
|
}
|
|
7109
6858
|
// Options
|
|
7110
6859
|
// -----------------------------------------------------------------------------------------------------------------
|
|
@@ -7463,7 +7212,7 @@ var FullCalendar = (function (exports) {
|
|
|
7463
7212
|
scrollToTime(timeInput) {
|
|
7464
7213
|
let time = createDuration(timeInput);
|
|
7465
7214
|
if (time) {
|
|
7466
|
-
this.trigger('
|
|
7215
|
+
this.trigger('_timeScrollRequest', time);
|
|
7467
7216
|
}
|
|
7468
7217
|
}
|
|
7469
7218
|
}
|
|
@@ -7563,7 +7312,7 @@ var FullCalendar = (function (exports) {
|
|
|
7563
7312
|
getEventTargetViaRoot: getEventTargetViaRoot,
|
|
7564
7313
|
getUniqueDomId: getUniqueDomId,
|
|
7565
7314
|
parseClassNames: parseClassNames,
|
|
7566
|
-
|
|
7315
|
+
fracToCssDim: fracToCssDim,
|
|
7567
7316
|
createEmptyEventStore: createEmptyEventStore,
|
|
7568
7317
|
mergeEventStores: mergeEventStores,
|
|
7569
7318
|
getRelevantEvents: getRelevantEvents,
|
|
@@ -7574,6 +7323,13 @@ var FullCalendar = (function (exports) {
|
|
|
7574
7323
|
getDayClassNames: getDayClassNames,
|
|
7575
7324
|
getDateMeta: getDateMeta,
|
|
7576
7325
|
getSlotClassNames: getSlotClassNames,
|
|
7326
|
+
setStateDimMap: setStateDimMap,
|
|
7327
|
+
isDimMapsEqual: isDimMapsEqual,
|
|
7328
|
+
isDimsEqual: isDimsEqual,
|
|
7329
|
+
watchSize: watchSize,
|
|
7330
|
+
watchWidth: watchWidth,
|
|
7331
|
+
watchHeight: watchHeight,
|
|
7332
|
+
afterSize: afterSize,
|
|
7577
7333
|
buildNavLinkAttrs: buildNavLinkAttrs,
|
|
7578
7334
|
preventDefault: preventDefault,
|
|
7579
7335
|
whenTransitionDone: whenTransitionDone,
|
|
@@ -7637,10 +7393,6 @@ var FullCalendar = (function (exports) {
|
|
|
7637
7393
|
config: config,
|
|
7638
7394
|
parseDragMeta: parseDragMeta,
|
|
7639
7395
|
CalendarRoot: CalendarRoot,
|
|
7640
|
-
DayHeader: DayHeader,
|
|
7641
|
-
computeFallbackHeaderFormat: computeFallbackHeaderFormat,
|
|
7642
|
-
TableDateCell: TableDateCell,
|
|
7643
|
-
TableDowCell: TableDowCell,
|
|
7644
7396
|
DaySeriesModel: DaySeriesModel,
|
|
7645
7397
|
sliceEventStore: sliceEventStore,
|
|
7646
7398
|
hasBgRendering: hasBgRendering,
|
|
@@ -7651,6 +7403,9 @@ var FullCalendar = (function (exports) {
|
|
|
7651
7403
|
buildEventRangeKey: buildEventRangeKey,
|
|
7652
7404
|
getSegAnchorAttrs: getSegAnchorAttrs,
|
|
7653
7405
|
DayTableModel: DayTableModel,
|
|
7406
|
+
Scroller: Scroller,
|
|
7407
|
+
getNormalizedScrollX: getNormalizedScrollX,
|
|
7408
|
+
setNormalizedScrollX: setNormalizedScrollX,
|
|
7654
7409
|
Slicer: Slicer,
|
|
7655
7410
|
applyMutationToEventStore: applyMutationToEventStore,
|
|
7656
7411
|
isPropsValid: isPropsValid,
|
|
@@ -7660,21 +7415,10 @@ var FullCalendar = (function (exports) {
|
|
|
7660
7415
|
BaseComponent: BaseComponent,
|
|
7661
7416
|
setRef: setRef,
|
|
7662
7417
|
DelayedRunner: DelayedRunner,
|
|
7663
|
-
SimpleScrollGrid: SimpleScrollGrid,
|
|
7664
|
-
hasShrinkWidth: hasShrinkWidth,
|
|
7665
|
-
renderMicroColGroup: renderMicroColGroup,
|
|
7666
|
-
getScrollGridClassNames: getScrollGridClassNames,
|
|
7667
|
-
getSectionClassNames: getSectionClassNames,
|
|
7668
|
-
getSectionHasLiquidHeight: getSectionHasLiquidHeight,
|
|
7669
|
-
getAllowYScrolling: getAllowYScrolling,
|
|
7670
|
-
renderChunkContent: renderChunkContent,
|
|
7671
|
-
computeShrinkWidth: computeShrinkWidth,
|
|
7672
|
-
sanitizeShrinkWidth: sanitizeShrinkWidth,
|
|
7673
|
-
isColPropsEqual: isColPropsEqual,
|
|
7674
|
-
renderScrollShim: renderScrollShim,
|
|
7675
7418
|
getStickyFooterScrollbar: getStickyFooterScrollbar,
|
|
7676
7419
|
getStickyHeaderDates: getStickyHeaderDates,
|
|
7677
|
-
|
|
7420
|
+
getIsHeightAuto: getIsHeightAuto,
|
|
7421
|
+
getScrollerSyncerClass: getScrollerSyncerClass,
|
|
7678
7422
|
getScrollbarWidths: getScrollbarWidths,
|
|
7679
7423
|
RefMap: RefMap,
|
|
7680
7424
|
getIsRtlScrollbarOnLeft: getIsRtlScrollbarOnLeft,
|
|
@@ -7832,7 +7576,7 @@ var FullCalendar = (function (exports) {
|
|
|
7832
7576
|
initialView: input.initialView || '',
|
|
7833
7577
|
elementDraggingImpl: input.elementDraggingImpl,
|
|
7834
7578
|
optionChangeHandlers: input.optionChangeHandlers || {},
|
|
7835
|
-
|
|
7579
|
+
scrollerSyncerClass: input.scrollerSyncerClass || null,
|
|
7836
7580
|
listenerRefiners: input.listenerRefiners || {},
|
|
7837
7581
|
optionRefiners: input.optionRefiners || {},
|
|
7838
7582
|
propSetHandlers: input.propSetHandlers || {},
|
|
@@ -7870,7 +7614,7 @@ var FullCalendar = (function (exports) {
|
|
|
7870
7614
|
initialView: '',
|
|
7871
7615
|
elementDraggingImpl: null,
|
|
7872
7616
|
optionChangeHandlers: {},
|
|
7873
|
-
|
|
7617
|
+
scrollerSyncerClass: null,
|
|
7874
7618
|
listenerRefiners: {},
|
|
7875
7619
|
optionRefiners: {},
|
|
7876
7620
|
propSetHandlers: {},
|
|
@@ -7940,7 +7684,7 @@ var FullCalendar = (function (exports) {
|
|
|
7940
7684
|
initialView: hooks0.initialView || hooks1.initialView,
|
|
7941
7685
|
elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
|
|
7942
7686
|
optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
|
|
7943
|
-
|
|
7687
|
+
scrollerSyncerClass: hooks0.scrollerSyncerClass || hooks1.scrollerSyncerClass,
|
|
7944
7688
|
listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
|
|
7945
7689
|
optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
|
|
7946
7690
|
propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
|
|
@@ -7960,7 +7704,6 @@ var FullCalendar = (function (exports) {
|
|
|
7960
7704
|
}
|
|
7961
7705
|
StandardTheme.prototype.classes = {
|
|
7962
7706
|
root: 'fc-theme-standard',
|
|
7963
|
-
tableCellShaded: 'fc-cell-shaded',
|
|
7964
7707
|
buttonGroup: 'fc-button-group',
|
|
7965
7708
|
button: 'fc-button fc-button-primary',
|
|
7966
7709
|
buttonActive: 'fc-button-active',
|
|
@@ -8056,7 +7799,7 @@ var FullCalendar = (function (exports) {
|
|
|
8056
7799
|
};
|
|
8057
7800
|
}
|
|
8058
7801
|
function createViewHookComponent(options) {
|
|
8059
|
-
return (viewProps) => (
|
|
7802
|
+
return (viewProps) => (_(ViewContextType.Consumer, null, (context) => (_(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(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 }))));
|
|
8060
7803
|
}
|
|
8061
7804
|
|
|
8062
7805
|
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
|
|
@@ -9323,7 +9066,9 @@ var FullCalendar = (function (exports) {
|
|
|
9323
9066
|
class ToolbarSection extends BaseComponent {
|
|
9324
9067
|
render() {
|
|
9325
9068
|
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
9326
|
-
return
|
|
9069
|
+
return _('div', {
|
|
9070
|
+
className: 'fc-toolbar-chunk fc-toolbar-' + this.props.name
|
|
9071
|
+
}, ...children);
|
|
9327
9072
|
}
|
|
9328
9073
|
renderWidgetGroup(widgetGroup) {
|
|
9329
9074
|
let { props } = this;
|
|
@@ -9334,7 +9079,7 @@ var FullCalendar = (function (exports) {
|
|
|
9334
9079
|
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
9335
9080
|
if (buttonName === 'title') {
|
|
9336
9081
|
isOnlyButtons = false;
|
|
9337
|
-
children.push(
|
|
9082
|
+
children.push(_("h2", { className: "fc-toolbar-title" }, props.title));
|
|
9338
9083
|
}
|
|
9339
9084
|
else {
|
|
9340
9085
|
let isPressed = buttonName === props.activeButton;
|
|
@@ -9345,12 +9090,12 @@ var FullCalendar = (function (exports) {
|
|
|
9345
9090
|
if (isPressed) {
|
|
9346
9091
|
buttonClasses.push(theme.getClass('buttonActive'));
|
|
9347
9092
|
}
|
|
9348
|
-
children.push(
|
|
9093
|
+
children.push(_("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? _("span", { className: buttonIcon, role: "img" }) : '')));
|
|
9349
9094
|
}
|
|
9350
9095
|
}
|
|
9351
9096
|
if (children.length > 1) {
|
|
9352
9097
|
let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
|
|
9353
|
-
return
|
|
9098
|
+
return _('div', { className: groupClassName }, ...children);
|
|
9354
9099
|
}
|
|
9355
9100
|
return children[0];
|
|
9356
9101
|
}
|
|
@@ -9383,72 +9128,14 @@ var FullCalendar = (function (exports) {
|
|
|
9383
9128
|
'fc-toolbar',
|
|
9384
9129
|
forceLtr ? 'fc-toolbar-ltr' : '',
|
|
9385
9130
|
];
|
|
9386
|
-
return (
|
|
9131
|
+
return (_("div", { className: classNames.join(' ') },
|
|
9387
9132
|
this.renderSection('start', startContent || []),
|
|
9388
9133
|
this.renderSection('center', centerContent || []),
|
|
9389
9134
|
this.renderSection('end', endContent || [])));
|
|
9390
9135
|
}
|
|
9391
9136
|
renderSection(key, widgetGroups) {
|
|
9392
9137
|
let { props } = this;
|
|
9393
|
-
return (
|
|
9394
|
-
}
|
|
9395
|
-
}
|
|
9396
|
-
|
|
9397
|
-
class ViewHarness extends BaseComponent {
|
|
9398
|
-
constructor() {
|
|
9399
|
-
super(...arguments);
|
|
9400
|
-
this.state = {
|
|
9401
|
-
availableWidth: null,
|
|
9402
|
-
};
|
|
9403
|
-
this.handleEl = (el) => {
|
|
9404
|
-
this.el = el;
|
|
9405
|
-
setRef(this.props.elRef, el);
|
|
9406
|
-
this.updateAvailableWidth();
|
|
9407
|
-
};
|
|
9408
|
-
this.handleResize = () => {
|
|
9409
|
-
this.updateAvailableWidth();
|
|
9410
|
-
};
|
|
9411
|
-
}
|
|
9412
|
-
render() {
|
|
9413
|
-
let { props, state } = this;
|
|
9414
|
-
let { aspectRatio } = props;
|
|
9415
|
-
let classNames = [
|
|
9416
|
-
'fc-view-harness',
|
|
9417
|
-
(aspectRatio || props.liquid || props.height)
|
|
9418
|
-
? 'fc-view-harness-active' // harness controls the height
|
|
9419
|
-
: 'fc-view-harness-passive', // let the view do the height
|
|
9420
|
-
];
|
|
9421
|
-
let height = '';
|
|
9422
|
-
let paddingBottom = '';
|
|
9423
|
-
if (aspectRatio) {
|
|
9424
|
-
if (state.availableWidth !== null) {
|
|
9425
|
-
height = state.availableWidth / aspectRatio;
|
|
9426
|
-
}
|
|
9427
|
-
else {
|
|
9428
|
-
// while waiting to know availableWidth, we can't set height to *zero*
|
|
9429
|
-
// because will cause lots of unnecessary scrollbars within scrollgrid.
|
|
9430
|
-
// BETTER: don't start rendering ANYTHING yet until we know container width
|
|
9431
|
-
// NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606)
|
|
9432
|
-
paddingBottom = `${(1 / aspectRatio) * 100}%`;
|
|
9433
|
-
}
|
|
9434
|
-
}
|
|
9435
|
-
else {
|
|
9436
|
-
height = props.height || '';
|
|
9437
|
-
}
|
|
9438
|
-
return (y("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children));
|
|
9439
|
-
}
|
|
9440
|
-
componentDidMount() {
|
|
9441
|
-
this.context.addResizeHandler(this.handleResize);
|
|
9442
|
-
}
|
|
9443
|
-
componentWillUnmount() {
|
|
9444
|
-
this.context.removeResizeHandler(this.handleResize);
|
|
9445
|
-
}
|
|
9446
|
-
updateAvailableWidth() {
|
|
9447
|
-
if (this.el && // needed. but why?
|
|
9448
|
-
this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth
|
|
9449
|
-
) {
|
|
9450
|
-
this.setState({ availableWidth: this.el.offsetWidth });
|
|
9451
|
-
}
|
|
9138
|
+
return (_(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
|
|
9452
9139
|
}
|
|
9453
9140
|
}
|
|
9454
9141
|
|
|
@@ -9530,19 +9217,34 @@ var FullCalendar = (function (exports) {
|
|
|
9530
9217
|
}
|
|
9531
9218
|
}
|
|
9532
9219
|
|
|
9220
|
+
class ViewHarness extends b {
|
|
9221
|
+
render() {
|
|
9222
|
+
const { props } = this;
|
|
9223
|
+
return (_("div", { className: [
|
|
9224
|
+
'fc-view-harness',
|
|
9225
|
+
props.height != null
|
|
9226
|
+
? 'fc-view-harness-fixedheight'
|
|
9227
|
+
: props.heightLiquid
|
|
9228
|
+
? 'fc-view-harness-liquid'
|
|
9229
|
+
: props.aspectRatio != null
|
|
9230
|
+
? 'fc-view-harness-aspectratio'
|
|
9231
|
+
: ''
|
|
9232
|
+
].join(' '), style: {
|
|
9233
|
+
height: props.height,
|
|
9234
|
+
paddingBottom: props.aspectRatio != null
|
|
9235
|
+
? `${(1 / props.aspectRatio) * 100}%`
|
|
9236
|
+
: undefined
|
|
9237
|
+
} }, props.children));
|
|
9238
|
+
}
|
|
9239
|
+
}
|
|
9240
|
+
|
|
9533
9241
|
class CalendarContent extends PureComponent {
|
|
9534
9242
|
constructor() {
|
|
9535
9243
|
super(...arguments);
|
|
9536
9244
|
this.buildViewContext = memoize(buildViewContext);
|
|
9537
9245
|
this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
9538
9246
|
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
9539
|
-
this.headerRef = d();
|
|
9540
|
-
this.footerRef = d();
|
|
9541
9247
|
this.interactionsStore = {};
|
|
9542
|
-
// eslint-disable-next-line
|
|
9543
|
-
this.state = {
|
|
9544
|
-
viewLabelId: getUniqueDomId(),
|
|
9545
|
-
};
|
|
9546
9248
|
// Component Registration
|
|
9547
9249
|
// -----------------------------------------------------------------------------------------------------------------
|
|
9548
9250
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
@@ -9566,20 +9268,6 @@ var FullCalendar = (function (exports) {
|
|
|
9566
9268
|
}
|
|
9567
9269
|
delete interactionSettingsStore[component.uid];
|
|
9568
9270
|
};
|
|
9569
|
-
// Resizing
|
|
9570
|
-
// -----------------------------------------------------------------------------------------------------------------
|
|
9571
|
-
this.resizeRunner = new DelayedRunner(() => {
|
|
9572
|
-
this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
|
|
9573
|
-
this.props.emitter.trigger('windowResize', { view: this.props.viewApi });
|
|
9574
|
-
});
|
|
9575
|
-
this.handleWindowResize = (ev) => {
|
|
9576
|
-
let { options } = this.props;
|
|
9577
|
-
if (options.handleWindowResize &&
|
|
9578
|
-
ev.target === window // avoid jqui events
|
|
9579
|
-
) {
|
|
9580
|
-
this.resizeRunner.request(options.windowResizeDelay);
|
|
9581
|
-
}
|
|
9582
|
-
};
|
|
9583
9271
|
}
|
|
9584
9272
|
/*
|
|
9585
9273
|
renders INSIDE of an outer div
|
|
@@ -9589,14 +9277,12 @@ var FullCalendar = (function (exports) {
|
|
|
9589
9277
|
let { toolbarConfig, options } = props;
|
|
9590
9278
|
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
|
|
9591
9279
|
props.viewTitle);
|
|
9592
|
-
let
|
|
9593
|
-
let
|
|
9280
|
+
let viewHeight;
|
|
9281
|
+
let viewHeightLiquid = false;
|
|
9594
9282
|
let viewAspectRatio;
|
|
9595
|
-
if (props.
|
|
9596
|
-
viewHeight = '';
|
|
9597
|
-
}
|
|
9283
|
+
if (props.forPrint || getIsHeightAuto(options)) ;
|
|
9598
9284
|
else if (options.height != null) {
|
|
9599
|
-
|
|
9285
|
+
viewHeightLiquid = true;
|
|
9600
9286
|
}
|
|
9601
9287
|
else if (options.contentHeight != null) {
|
|
9602
9288
|
viewHeight = options.contentHeight;
|
|
@@ -9605,21 +9291,17 @@ var FullCalendar = (function (exports) {
|
|
|
9605
9291
|
viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
|
|
9606
9292
|
}
|
|
9607
9293
|
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);
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
:
|
|
9611
|
-
return (y(ViewContextType.Provider, { value: viewContext },
|
|
9612
|
-
toolbarConfig.header && (y(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
|
|
9613
|
-
y(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
|
|
9294
|
+
return (_(ViewContextType.Provider, { value: viewContext },
|
|
9295
|
+
toolbarConfig.header && (_(Toolbar, Object.assign({ extraClassName: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
|
|
9296
|
+
_(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
|
|
9614
9297
|
this.renderView(props),
|
|
9615
9298
|
this.buildAppendContent()),
|
|
9616
|
-
toolbarConfig.footer && (
|
|
9299
|
+
toolbarConfig.footer && (_(Toolbar, Object.assign({ extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
|
|
9617
9300
|
}
|
|
9618
9301
|
componentDidMount() {
|
|
9619
9302
|
let { props } = this;
|
|
9620
9303
|
this.calendarInteractions = props.pluginHooks.calendarInteractions
|
|
9621
9304
|
.map((CalendarInteractionClass) => new CalendarInteractionClass(props));
|
|
9622
|
-
window.addEventListener('resize', this.handleWindowResize);
|
|
9623
9305
|
let { propSetHandlers } = props.pluginHooks;
|
|
9624
9306
|
for (let propName in propSetHandlers) {
|
|
9625
9307
|
propSetHandlers[propName](props[propName], props);
|
|
@@ -9635,8 +9317,6 @@ var FullCalendar = (function (exports) {
|
|
|
9635
9317
|
}
|
|
9636
9318
|
}
|
|
9637
9319
|
componentWillUnmount() {
|
|
9638
|
-
window.removeEventListener('resize', this.handleWindowResize);
|
|
9639
|
-
this.resizeRunner.clear();
|
|
9640
9320
|
for (let interaction of this.calendarInteractions) {
|
|
9641
9321
|
interaction.destroy();
|
|
9642
9322
|
}
|
|
@@ -9645,7 +9325,7 @@ var FullCalendar = (function (exports) {
|
|
|
9645
9325
|
buildAppendContent() {
|
|
9646
9326
|
let { props } = this;
|
|
9647
9327
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
9648
|
-
return
|
|
9328
|
+
return _(k$1, {}, ...children);
|
|
9649
9329
|
}
|
|
9650
9330
|
renderView(props) {
|
|
9651
9331
|
let { pluginHooks } = props;
|
|
@@ -9659,7 +9339,6 @@ var FullCalendar = (function (exports) {
|
|
|
9659
9339
|
eventSelection: props.eventSelection,
|
|
9660
9340
|
eventDrag: props.eventDrag,
|
|
9661
9341
|
eventResize: props.eventResize,
|
|
9662
|
-
isHeightAuto: props.isHeightAuto,
|
|
9663
9342
|
forPrint: props.forPrint,
|
|
9664
9343
|
};
|
|
9665
9344
|
let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
|
|
@@ -9667,7 +9346,7 @@ var FullCalendar = (function (exports) {
|
|
|
9667
9346
|
Object.assign(viewProps, transformer.transform(viewProps, props));
|
|
9668
9347
|
}
|
|
9669
9348
|
let ViewComponent = viewSpec.component;
|
|
9670
|
-
return (
|
|
9349
|
+
return (_(ViewComponent, Object.assign({}, viewProps)));
|
|
9671
9350
|
}
|
|
9672
9351
|
}
|
|
9673
9352
|
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
|
|
@@ -9690,6 +9369,9 @@ var FullCalendar = (function (exports) {
|
|
|
9690
9369
|
return theClasses.map((TheClass) => new TheClass());
|
|
9691
9370
|
}
|
|
9692
9371
|
|
|
9372
|
+
/*
|
|
9373
|
+
Vanilla JS API
|
|
9374
|
+
*/
|
|
9693
9375
|
class Calendar extends CalendarImpl {
|
|
9694
9376
|
constructor(el, optionOverrides = {}) {
|
|
9695
9377
|
super();
|
|
@@ -9714,17 +9396,17 @@ var FullCalendar = (function (exports) {
|
|
|
9714
9396
|
this.isRendered = true;
|
|
9715
9397
|
let { currentData } = this;
|
|
9716
9398
|
flushSync(() => {
|
|
9717
|
-
|
|
9399
|
+
B$2(_(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, forPrint) => {
|
|
9718
9400
|
this.setClassNames(classNames);
|
|
9719
9401
|
this.setHeight(height);
|
|
9720
|
-
return (
|
|
9721
|
-
|
|
9402
|
+
return (_(RenderId.Provider, { value: this.customContentRenderId },
|
|
9403
|
+
_(CalendarContent, Object.assign({ forPrint: forPrint }, currentData))));
|
|
9722
9404
|
}), this.el);
|
|
9723
9405
|
});
|
|
9724
9406
|
}
|
|
9725
9407
|
else if (this.isRendered) {
|
|
9726
9408
|
this.isRendered = false;
|
|
9727
|
-
|
|
9409
|
+
B$2(null, this.el);
|
|
9728
9410
|
this.setClassNames([]);
|
|
9729
9411
|
this.setHeight('');
|
|
9730
9412
|
}
|
|
@@ -9835,7 +9517,7 @@ var FullCalendar = (function (exports) {
|
|
|
9835
9517
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
9836
9518
|
}
|
|
9837
9519
|
|
|
9838
|
-
const version = '
|
|
9520
|
+
const version = '7.0.0-beta.0';
|
|
9839
9521
|
|
|
9840
9522
|
exports.Calendar = Calendar;
|
|
9841
9523
|
exports.Internal = internal;
|