@fullcalendar/core 5.7.2 → 5.10.1
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/locales/de-at.global.js +35 -0
- package/locales/de-at.js +35 -0
- package/locales/de.global.js +35 -0
- package/locales/de.js +35 -0
- package/locales/en-au.global.js +10 -0
- package/locales/en-au.js +10 -0
- package/locales/en-gb.global.js +10 -0
- package/locales/en-gb.js +10 -0
- package/locales/en-nz.global.js +10 -0
- package/locales/en-nz.js +10 -0
- package/locales/es.global.js +19 -0
- package/locales/es.js +19 -0
- package/locales/hu.global.js +1 -1
- package/locales/hu.js +1 -1
- package/locales/km.d.ts +3 -0
- package/locales/km.global.js +28 -0
- package/locales/km.js +27 -0
- package/locales/ku.d.ts +3 -0
- package/locales/ku.global.js +28 -0
- package/locales/ku.js +27 -0
- package/locales/nb.global.js +11 -0
- package/locales/nb.js +11 -0
- package/locales/si-lk.d.ts +3 -0
- package/locales/si-lk.global.js +27 -0
- package/locales/si-lk.js +26 -0
- package/locales/sm.d.ts +3 -0
- package/locales/sm.global.js +23 -0
- package/locales/sm.js +22 -0
- package/locales/sv.global.js +20 -0
- package/locales/sv.js +20 -0
- package/locales-all.global.js +264 -32
- package/locales-all.global.min.js +1 -1
- package/locales-all.js +264 -32
- package/main.cjs.js +1 -1
- package/main.global.js +501 -221
- package/main.global.min.js +2 -2
- package/main.js +1 -1
- package/package.json +4 -4
package/main.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar v5.
|
|
2
|
+
FullCalendar v5.10.1
|
|
3
3
|
Docs & License: https://fullcalendar.io/
|
|
4
4
|
(c) 2021 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -48,10 +48,14 @@ var FullCalendar = (function (exports) {
|
|
|
48
48
|
return __assign.apply(this, arguments);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
function __spreadArray(to, from) {
|
|
52
|
-
for (var i = 0,
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
function __spreadArray(to, from, pack) {
|
|
52
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
53
|
+
if (ar || !(i in from)) {
|
|
54
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
55
|
+
ar[i] = from[i];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return to.concat(ar || from);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
var n,u,i$1,t,o,r$1={},f$1=[],e$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c$1(n,l){for(var u in l)n[u]=l[u];return n}function s(n){var l=n.parentNode;l&&l.removeChild(n);}function a$1(n,l,u){var i,t,o,r=arguments,f={};for(o in l)"key"==o?i=l[o]:"ref"==o?t=l[o]:f[o]=l[o];if(arguments.length>3)for(u=[u],o=3;o<arguments.length;o++)u.push(r[o]);if(null!=u&&(f.children=u),"function"==typeof n&&null!=n.defaultProps)for(o in n.defaultProps)void 0===f[o]&&(f[o]=n.defaultProps[o]);return v$1(n,f,i,t,null)}function v$1(l,u,i,t,o){var r={type:l,props:u,key:i,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++n.__v:o};return null!=n.vnode&&n.vnode(r),r}function h(){return {current:null}}function y(n){return n.children}function p(n,l){this.props=n,this.context=l;}function d(n,l){if(null==l)return n.__?d(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?d(n):null}function _(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 _(n)}}function k(l){(!l.__d&&(l.__d=!0)&&u.push(l)&&!b$1.__r++||t!==n.debounceRendering)&&((t=n.debounceRendering)||i$1)(b$1);}function b$1(){for(var n;b$1.__r=u.length;)n=u.sort(function(n,l){return n.__v.__b-l.__v.__b}),u=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=c$1({},t)).__v=t.__v+1,I$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?d(t):o,t.__h),T$1(u,t),t.__e!=o&&_(t)));});}function m(n,l,u,i,t,o,e,c,s,a){var h,p,_,k,b,m,w,A=i&&i.__k||f$1,P=A.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(y,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p<P;p++){if((_=A[p])&&k.key==_.key&&k.type===_.type){A[p]=void 0;break}_=null;}I$1(n,k,_=_||r$1,t,o,e,c,s,a),b=k.__e,(p=k.ref)&&_.ref!=p&&(w||(w=[]),_.ref&&w.push(_.ref,null,k),w.push(p,k.__c||b,k)),null!=b?(null==m&&(m=b),"function"==typeof k.type&&null!=k.__k&&k.__k===_.__k?k.__d=s=g$1(k,s,n):s=x$1(n,k,_,A,b,s),a||"option"!==u.type?"function"==typeof u.type&&(u.__d=s):n.value=""):s&&_.__e==s&&s.parentNode!=n&&(s=d(_));}for(u.__e=m,h=P;h--;)null!=A[h]&&("function"==typeof u.type&&null!=A[h].__e&&A[h].__e==u.__d&&(u.__d=d(i,h+1)),L$1(A[h],A[h]));if(w)for(h=0;h<w.length;h++)z(w[h],w[++h],w[++h]);}function g$1(n,l,u){var i,t;for(i=0;i<n.__k.length;i++)(t=n.__k[i])&&(t.__=n,l="function"==typeof t.type?g$1(t,l,u):x$1(u,t,t,n.__k,t.__e,l));return l}function w$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){w$1(n,l);}):l.push(n)),l}function x$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function A$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||C$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C$1(n,o,l[o],u[o],i);}function P$1(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||e$1.test(l)?u:u+"px";}function C$1(n,l,u,i,t){var o;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||P$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||P$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?H$1:$$1,o):n.removeEventListener(l,o?H$1:$$1,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("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||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function $$1(l){this.l[l.type+!1](n.event?n.event(l):l);}function H$1(l){this.l[l.type+!0](n.event?n.event(l):l);}function I$1(l,u,i,t,o,r,f,e,s){var a,v,h,d,_,k,b,g,w,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(s=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if("function"==typeof P){if(g=u.props,w=(a=P.contextType)&&t[a.__c],x=a?w?w.props.value:a.__:t,i.__c?b=(v=u.__c=i.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(g,x):(u.__c=v=new p(g,x),v.constructor=P,v.render=M$1),w&&w.sub(v),v.props=g,v.state||(v.state={}),v.context=x,v.__n=t,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=c$1({},v.__s)),c$1(v.__s,P.getDerivedStateFromProps(g,v.__s))),d=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else {if(null==P.getDerivedStateFromProps&&g!==d&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(g,x),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(g,v.__s,x)||u.__v===i.__v){v.props=g,v.state=v.__s,u.__v!==i.__v&&(v.__d=!1),v.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(g,v.__s,x),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(d,_,k);});}v.context=x,v.props=g,v.state=v.__s,(a=n.__r)&&a(u),v.__d=!1,v.__v=u,v.__P=l,a=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(t=c$1(c$1({},t),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(d,_)),A=null!=a&&a.type===y&&null==a.key?a.props.children:a,m(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,s),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),b&&(v.__E=v.__=null),v.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=j$2(i.__e,u,i,t,o,r,f,s);(a=n.diffed)&&a(u);}catch(l){u.__v=null,(s||null!=r)&&(u.__e=e,u.__h=!!s,r[r.indexOf(e)]=null),n.__e(l,u,i);}}function T$1(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u);});}catch(l){n.__e(l,u.__v);}});}function j$2(n,l,u,i,t,o,e,c){var a,v,h,y,p=u.props,d=l.props,_=l.type,k=0;if("svg"===_&&(t=!0),null!=o)for(;k<o.length;k++)if((a=o[k])&&(a===n||(_?a.localName==_:3==a.nodeType))){n=a,o[k]=null;break}if(null==n){if(null===_)return document.createTextNode(d);n=t?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,d.is&&d),o=null,c=!1;}if(null===_)p===d||c&&n.data===d||(n.data=d);else {if(o=o&&f$1.slice.call(n.childNodes),v=(p=u.props||r$1).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},y=0;y<n.attributes.length;y++)p[n.attributes[y].name]=n.attributes[y].value;(h||v)&&(h&&(v&&h.__html==v.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""));}if(A$1(n,d,p,t,c),h)l.__k=[];else if(k=l.props.children,m(n,Array.isArray(k)?k:[k],l,u,i,t&&"foreignObject"!==_,o,e,n.firstChild,c),null!=o)for(k=o.length;k--;)null!=o[k]&&s(o[k]);c||("value"in d&&void 0!==(k=d.value)&&(k!==n.value||"progress"===_&&!k)&&C$1(n,"value",k,p.value,!1),"checked"in d&&void 0!==(k=d.checked)&&k!==n.checked&&C$1(n,"checked",k,p.checked,!1));}return n}function z(l,u,i){try{"function"==typeof l?l(u):l.current=u;}catch(l){n.__e(l,i);}}function L$1(l,u,i){var t,o,r;if(n.unmount&&n.unmount(l),(t=l.ref)&&(t.current&&t.current!==l.__e||z(t,null,u)),i||"function"==typeof l.type||(i=null!=(o=l.__e)),l.__e=l.__d=void 0,null!=(t=l.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(l){n.__e(l,u);}t.base=t.__P=null;}if(t=l.__k)for(r=0;r<t.length;r++)t[r]&&L$1(t[r],u,i);null!=o&&s(o);}function M$1(n,l,u){return this.constructor(n,u)}function N(l,u,i){var t,o,e;n.__&&n.__(l,u),o=(t="function"==typeof i)?null:i&&i.__k||u.__k,e=[],I$1(u,l=(!t&&i||u).__k=a$1(y,null,[l]),o||r$1,r$1,void 0!==u.ownerSVGElement,!t&&i?[i]:o?null:u.firstChild?f$1.slice.call(u.childNodes):null,e,!t&&i?i:o?o.__e:u.firstChild,t),T$1(e,l);}function q(n,l){var u={__c:l="__cC"+o++,__: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(k);},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={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n},__v:0},p.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c$1({},this.state),"function"==typeof n&&(n=n(c$1({},u),this.props)),n&&c$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),k(this));},p.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k(this));},p.prototype.render=y,u=[],i$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b$1.__r=0,o=0;
|
|
@@ -266,6 +270,17 @@ var FullCalendar = (function (exports) {
|
|
|
266
270
|
var _a, _b;
|
|
267
271
|
return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target;
|
|
268
272
|
}
|
|
273
|
+
// Shadow DOM consuderations
|
|
274
|
+
// ----------------------------------------------------------------------------------------------------------------
|
|
275
|
+
function getElRoot(el) {
|
|
276
|
+
return el.getRootNode ? el.getRootNode() : document;
|
|
277
|
+
}
|
|
278
|
+
// Unique ID for DOM attribute
|
|
279
|
+
var guid$1 = 0;
|
|
280
|
+
function getUniqueDomId() {
|
|
281
|
+
guid$1 += 1;
|
|
282
|
+
return 'fc-dom-' + guid$1;
|
|
283
|
+
}
|
|
269
284
|
|
|
270
285
|
// Stops a mouse/touch event from doing it's native browser action
|
|
271
286
|
function preventDefault(ev) {
|
|
@@ -325,6 +340,22 @@ var FullCalendar = (function (exports) {
|
|
|
325
340
|
el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes
|
|
326
341
|
});
|
|
327
342
|
}
|
|
343
|
+
// ARIA workarounds
|
|
344
|
+
// ----------------------------------------------------------------------------------------------------------------
|
|
345
|
+
function createAriaClickAttrs(handler) {
|
|
346
|
+
return __assign({ onClick: handler }, createAriaKeyboardAttrs(handler));
|
|
347
|
+
}
|
|
348
|
+
function createAriaKeyboardAttrs(handler) {
|
|
349
|
+
return {
|
|
350
|
+
tabIndex: 0,
|
|
351
|
+
onKeyDown: function (ev) {
|
|
352
|
+
if (ev.key === 'Enter' || ev.key === ' ') {
|
|
353
|
+
handler(ev);
|
|
354
|
+
ev.preventDefault(); // if space, don't scroll down page
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
}
|
|
328
359
|
|
|
329
360
|
var guidNumber = 0;
|
|
330
361
|
function guid() {
|
|
@@ -425,6 +456,15 @@ var FullCalendar = (function (exports) {
|
|
|
425
456
|
var s = String(val);
|
|
426
457
|
return '000'.substr(0, len - s.length) + s;
|
|
427
458
|
}
|
|
459
|
+
function formatWithOrdinals(formatter, args, fallbackText) {
|
|
460
|
+
if (typeof formatter === 'function') {
|
|
461
|
+
return formatter.apply(void 0, args);
|
|
462
|
+
}
|
|
463
|
+
if (typeof formatter === 'string') { // non-blank string
|
|
464
|
+
return args.reduce(function (str, arg, index) { return (str.replace('$' + index, arg || '')); }, formatter);
|
|
465
|
+
}
|
|
466
|
+
return fallbackText;
|
|
467
|
+
}
|
|
428
468
|
/* Number Utilities
|
|
429
469
|
----------------------------------------------------------------------------------------------------------------------*/
|
|
430
470
|
function compareNumbers(a, b) {
|
|
@@ -1297,7 +1337,7 @@ var FullCalendar = (function (exports) {
|
|
|
1297
1337
|
return function (date) { return (formatTimeZoneOffset(date.timeZoneOffset)); };
|
|
1298
1338
|
}
|
|
1299
1339
|
if (standardDatePropCnt === 0 && extendedSettings.week) {
|
|
1300
|
-
return function (date) { return (formatWeekNumber(context.computeWeekNumber(date.marker), context.weekText, context.locale, extendedSettings.week)); };
|
|
1340
|
+
return function (date) { return (formatWeekNumber(context.computeWeekNumber(date.marker), context.weekText, context.weekTextLong, context.locale, extendedSettings.week)); };
|
|
1301
1341
|
}
|
|
1302
1342
|
return buildNativeFormattingFunc(standardDateProps, extendedSettings, context);
|
|
1303
1343
|
}
|
|
@@ -1389,15 +1429,17 @@ var FullCalendar = (function (exports) {
|
|
|
1389
1429
|
}
|
|
1390
1430
|
return s;
|
|
1391
1431
|
}
|
|
1392
|
-
function formatWeekNumber(num, weekText, locale, display) {
|
|
1432
|
+
function formatWeekNumber(num, weekText, weekTextLong, locale, display) {
|
|
1393
1433
|
var parts = [];
|
|
1394
|
-
if (display === '
|
|
1434
|
+
if (display === 'long') {
|
|
1435
|
+
parts.push(weekTextLong);
|
|
1436
|
+
}
|
|
1437
|
+
else if (display === 'short' || display === 'narrow') {
|
|
1395
1438
|
parts.push(weekText);
|
|
1396
1439
|
}
|
|
1397
|
-
|
|
1398
|
-
parts.push(
|
|
1440
|
+
if (display === 'long' || display === 'short') {
|
|
1441
|
+
parts.push(' ');
|
|
1399
1442
|
}
|
|
1400
|
-
// otherwise, considered 'numeric'
|
|
1401
1443
|
parts.push(locale.simpleNumberFormat.format(num));
|
|
1402
1444
|
if (locale.options.direction === 'rtl') { // TODO: use control characters instead?
|
|
1403
1445
|
parts.reverse();
|
|
@@ -1619,6 +1661,7 @@ var FullCalendar = (function (exports) {
|
|
|
1619
1661
|
displayEventTime: Boolean,
|
|
1620
1662
|
displayEventEnd: Boolean,
|
|
1621
1663
|
weekText: String,
|
|
1664
|
+
weekTextLong: String,
|
|
1622
1665
|
progressiveEventRendering: Boolean,
|
|
1623
1666
|
businessHours: identity,
|
|
1624
1667
|
initialDate: identity,
|
|
@@ -1672,6 +1715,7 @@ var FullCalendar = (function (exports) {
|
|
|
1672
1715
|
eventTimeFormat: createFormatter,
|
|
1673
1716
|
rerenderDelay: Number,
|
|
1674
1717
|
moreLinkText: identity,
|
|
1718
|
+
moreLinkHint: identity,
|
|
1675
1719
|
selectMinDistance: Number,
|
|
1676
1720
|
selectable: Boolean,
|
|
1677
1721
|
selectLongPressDelay: Number,
|
|
@@ -1693,8 +1737,14 @@ var FullCalendar = (function (exports) {
|
|
|
1693
1737
|
validRange: identity,
|
|
1694
1738
|
visibleRange: identity,
|
|
1695
1739
|
titleFormat: identity,
|
|
1740
|
+
eventInteractive: Boolean,
|
|
1696
1741
|
// only used by list-view, but languages define the value, so we need it in base options
|
|
1697
1742
|
noEventsText: String,
|
|
1743
|
+
viewHint: identity,
|
|
1744
|
+
navLinkHint: identity,
|
|
1745
|
+
closeHint: String,
|
|
1746
|
+
timeHint: String,
|
|
1747
|
+
eventHint: String,
|
|
1698
1748
|
moreLinkClick: identity,
|
|
1699
1749
|
moreLinkClassNames: identity,
|
|
1700
1750
|
moreLinkContent: identity,
|
|
@@ -1783,6 +1833,7 @@ var FullCalendar = (function (exports) {
|
|
|
1783
1833
|
// -------------------------
|
|
1784
1834
|
var CALENDAR_OPTION_REFINERS = {
|
|
1785
1835
|
buttonText: identity,
|
|
1836
|
+
buttonHints: identity,
|
|
1786
1837
|
views: identity,
|
|
1787
1838
|
plugins: identity,
|
|
1788
1839
|
initialEvents: identity,
|
|
@@ -1793,6 +1844,7 @@ var FullCalendar = (function (exports) {
|
|
|
1793
1844
|
headerToolbar: isBoolComplexEqual,
|
|
1794
1845
|
footerToolbar: isBoolComplexEqual,
|
|
1795
1846
|
buttonText: isBoolComplexEqual,
|
|
1847
|
+
buttonHints: isBoolComplexEqual,
|
|
1796
1848
|
buttonIcons: isBoolComplexEqual,
|
|
1797
1849
|
};
|
|
1798
1850
|
function isBoolComplexEqual(a, b) {
|
|
@@ -2008,6 +2060,7 @@ var FullCalendar = (function (exports) {
|
|
|
2008
2060
|
groupId: String,
|
|
2009
2061
|
title: String,
|
|
2010
2062
|
url: String,
|
|
2063
|
+
interactive: Boolean,
|
|
2011
2064
|
};
|
|
2012
2065
|
var EVENT_DATE_REFINERS = {
|
|
2013
2066
|
start: identity,
|
|
@@ -2060,6 +2113,7 @@ var FullCalendar = (function (exports) {
|
|
|
2060
2113
|
sourceId: sourceId,
|
|
2061
2114
|
allDay: allDay,
|
|
2062
2115
|
hasEnd: hasEnd,
|
|
2116
|
+
interactive: refined.interactive,
|
|
2063
2117
|
ui: createEventUi(refined, context),
|
|
2064
2118
|
extendedProps: __assign(__assign({}, (refined.extendedProps || {})), extra),
|
|
2065
2119
|
};
|
|
@@ -2519,6 +2573,34 @@ var FullCalendar = (function (exports) {
|
|
|
2519
2573
|
: eventRange.def.defId + ":" + eventRange.range.start.toISOString();
|
|
2520
2574
|
// inverse-background events don't have specific instances. TODO: better solution
|
|
2521
2575
|
}
|
|
2576
|
+
function getSegAnchorAttrs(seg, context) {
|
|
2577
|
+
var _a = seg.eventRange, def = _a.def, instance = _a.instance;
|
|
2578
|
+
var url = def.url;
|
|
2579
|
+
if (url) {
|
|
2580
|
+
return { href: url };
|
|
2581
|
+
}
|
|
2582
|
+
var emitter = context.emitter, options = context.options;
|
|
2583
|
+
var eventInteractive = options.eventInteractive;
|
|
2584
|
+
if (eventInteractive == null) {
|
|
2585
|
+
eventInteractive = def.interactive;
|
|
2586
|
+
if (eventInteractive == null) {
|
|
2587
|
+
eventInteractive = Boolean(emitter.hasHandlers('eventClick'));
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
// mock what happens in EventClicking
|
|
2591
|
+
if (eventInteractive) {
|
|
2592
|
+
// only attach keyboard-related handlers because click handler is already done in EventClicking
|
|
2593
|
+
return createAriaKeyboardAttrs(function (ev) {
|
|
2594
|
+
emitter.trigger('eventClick', {
|
|
2595
|
+
el: ev.target,
|
|
2596
|
+
event: new EventApi(context, def, instance),
|
|
2597
|
+
jsEvent: ev,
|
|
2598
|
+
view: context.viewApi,
|
|
2599
|
+
});
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
return {};
|
|
2603
|
+
}
|
|
2522
2604
|
|
|
2523
2605
|
var STANDARD_PROPS = {
|
|
2524
2606
|
start: identity,
|
|
@@ -2993,7 +3075,7 @@ var FullCalendar = (function (exports) {
|
|
|
2993
3075
|
// Preference is given to views that have corresponding buttons.
|
|
2994
3076
|
CalendarApi.prototype.getUnitViewSpec = function (unit) {
|
|
2995
3077
|
var _a = this.getCurrentData(), viewSpecs = _a.viewSpecs, toolbarConfig = _a.toolbarConfig;
|
|
2996
|
-
var viewTypes = [].concat(toolbarConfig.viewsWithButtons);
|
|
3078
|
+
var viewTypes = [].concat(toolbarConfig.header ? toolbarConfig.header.viewsWithButtons : [], toolbarConfig.footer ? toolbarConfig.footer.viewsWithButtons : []);
|
|
2997
3079
|
var i;
|
|
2998
3080
|
var spec;
|
|
2999
3081
|
for (var viewType in viewSpecs) {
|
|
@@ -3797,6 +3879,7 @@ var FullCalendar = (function (exports) {
|
|
|
3797
3879
|
this.weekNumberFunc = settings.weekNumberCalculation;
|
|
3798
3880
|
}
|
|
3799
3881
|
this.weekText = settings.weekText != null ? settings.weekText : settings.locale.options.weekText;
|
|
3882
|
+
this.weekTextLong = (settings.weekTextLong != null ? settings.weekTextLong : settings.locale.options.weekTextLong) || this.weekText;
|
|
3800
3883
|
this.cmdFormatter = settings.cmdFormatter;
|
|
3801
3884
|
this.defaultSeparator = settings.defaultSeparator;
|
|
3802
3885
|
}
|
|
@@ -4099,7 +4182,7 @@ var FullCalendar = (function (exports) {
|
|
|
4099
4182
|
|
|
4100
4183
|
var globalLocales = [];
|
|
4101
4184
|
|
|
4102
|
-
var
|
|
4185
|
+
var MINIMAL_RAW_EN_LOCALE = {
|
|
4103
4186
|
code: 'en',
|
|
4104
4187
|
week: {
|
|
4105
4188
|
dow: 0,
|
|
@@ -4119,15 +4202,33 @@ var FullCalendar = (function (exports) {
|
|
|
4119
4202
|
list: 'list',
|
|
4120
4203
|
},
|
|
4121
4204
|
weekText: 'W',
|
|
4205
|
+
weekTextLong: 'Week',
|
|
4206
|
+
closeHint: 'Close',
|
|
4207
|
+
timeHint: 'Time',
|
|
4208
|
+
eventHint: 'Event',
|
|
4122
4209
|
allDayText: 'all-day',
|
|
4123
4210
|
moreLinkText: 'more',
|
|
4124
4211
|
noEventsText: 'No events to display',
|
|
4125
4212
|
};
|
|
4213
|
+
var RAW_EN_LOCALE = __assign(__assign({}, MINIMAL_RAW_EN_LOCALE), {
|
|
4214
|
+
// Includes things we don't want other locales to inherit,
|
|
4215
|
+
// things that derive from other translatable strings.
|
|
4216
|
+
buttonHints: {
|
|
4217
|
+
prev: 'Previous $0',
|
|
4218
|
+
next: 'Next $0',
|
|
4219
|
+
today: function (buttonText, unit) {
|
|
4220
|
+
return (unit === 'day')
|
|
4221
|
+
? 'Today'
|
|
4222
|
+
: "This " + buttonText;
|
|
4223
|
+
},
|
|
4224
|
+
}, viewHint: '$0 view', navLinkHint: 'Go to $0', moreLinkHint: function (eventCnt) {
|
|
4225
|
+
return "Show " + eventCnt + " more event" + (eventCnt === 1 ? '' : 's');
|
|
4226
|
+
} });
|
|
4126
4227
|
function organizeRawLocales(explicitRawLocales) {
|
|
4127
4228
|
var defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en';
|
|
4128
4229
|
var allRawLocales = globalLocales.concat(explicitRawLocales);
|
|
4129
4230
|
var rawLocaleMap = {
|
|
4130
|
-
en: RAW_EN_LOCALE,
|
|
4231
|
+
en: RAW_EN_LOCALE,
|
|
4131
4232
|
};
|
|
4132
4233
|
for (var _i = 0, allRawLocales_1 = allRawLocales; _i < allRawLocales_1.length; _i++) {
|
|
4133
4234
|
var rawLocale = allRawLocales_1[_i];
|
|
@@ -4162,7 +4263,7 @@ var FullCalendar = (function (exports) {
|
|
|
4162
4263
|
return null;
|
|
4163
4264
|
}
|
|
4164
4265
|
function parseLocale(codeArg, codes, raw) {
|
|
4165
|
-
var merged = mergeProps([
|
|
4266
|
+
var merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']);
|
|
4166
4267
|
delete merged.code; // don't want this part of the options
|
|
4167
4268
|
var week = merged.week;
|
|
4168
4269
|
delete merged.week;
|
|
@@ -4510,12 +4611,33 @@ var FullCalendar = (function (exports) {
|
|
|
4510
4611
|
return classNames;
|
|
4511
4612
|
}
|
|
4512
4613
|
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4614
|
+
var DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });
|
|
4615
|
+
var WEEK_FORMAT = createFormatter({ week: 'long' });
|
|
4616
|
+
function buildNavLinkAttrs(context, dateMarker, viewType, isTabbable) {
|
|
4617
|
+
if (viewType === void 0) { viewType = 'day'; }
|
|
4618
|
+
if (isTabbable === void 0) { isTabbable = true; }
|
|
4619
|
+
var dateEnv = context.dateEnv, options = context.options, calendarApi = context.calendarApi;
|
|
4620
|
+
var dateStr = dateEnv.format(dateMarker, viewType === 'week' ? WEEK_FORMAT : DAY_FORMAT);
|
|
4621
|
+
if (options.navLinks) {
|
|
4622
|
+
var zonedDate = dateEnv.toDate(dateMarker);
|
|
4623
|
+
var handleInteraction = function (ev) {
|
|
4624
|
+
var customAction = viewType === 'day' ? options.navLinkDayClick :
|
|
4625
|
+
viewType === 'week' ? options.navLinkWeekClick : null;
|
|
4626
|
+
if (typeof customAction === 'function') {
|
|
4627
|
+
customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev);
|
|
4628
|
+
}
|
|
4629
|
+
else {
|
|
4630
|
+
if (typeof customAction === 'string') {
|
|
4631
|
+
viewType = customAction;
|
|
4632
|
+
}
|
|
4633
|
+
calendarApi.zoomTo(dateMarker, viewType);
|
|
4634
|
+
}
|
|
4635
|
+
};
|
|
4636
|
+
return __assign({ title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr), 'data-navlink': '' }, (isTabbable
|
|
4637
|
+
? createAriaClickAttrs(handleInteraction)
|
|
4638
|
+
: { onClick: handleInteraction }));
|
|
4639
|
+
}
|
|
4640
|
+
return { 'aria-label': dateStr };
|
|
4519
4641
|
}
|
|
4520
4642
|
|
|
4521
4643
|
var _isRtlScrollbarOnLeft = null;
|
|
@@ -4728,8 +4850,8 @@ var FullCalendar = (function (exports) {
|
|
|
4728
4850
|
}
|
|
4729
4851
|
};
|
|
4730
4852
|
Emitter.prototype.hasHandlers = function (type) {
|
|
4731
|
-
return (this.handlers[type] && this.handlers[type].length) ||
|
|
4732
|
-
(this.options && this.options[type]);
|
|
4853
|
+
return Boolean((this.handlers[type] && this.handlers[type].length) ||
|
|
4854
|
+
(this.options && this.options[type]));
|
|
4733
4855
|
};
|
|
4734
4856
|
return Emitter;
|
|
4735
4857
|
}());
|
|
@@ -5432,39 +5554,56 @@ var FullCalendar = (function (exports) {
|
|
|
5432
5554
|
}
|
|
5433
5555
|
};
|
|
5434
5556
|
ContentHookInner.prototype.renderInnerContent = function () {
|
|
5435
|
-
var
|
|
5436
|
-
var
|
|
5437
|
-
var
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
innerContent = normalizeContent(props.defaultContent, props.hookProps);
|
|
5442
|
-
}
|
|
5443
|
-
if (innerContent !== undefined) { // we allow custom content handlers to return nothing
|
|
5557
|
+
var customContentInfo = this.customContentInfo; // only populated if using non-[p]react node(s)
|
|
5558
|
+
var innerContent = this.getInnerContent();
|
|
5559
|
+
var meta = this.getContentMeta(innerContent);
|
|
5560
|
+
// initial run, or content-type changing? (from vue -> react for example)
|
|
5561
|
+
if (!customContentInfo || customContentInfo.contentKey !== meta.contentKey) {
|
|
5562
|
+
// clearing old value
|
|
5444
5563
|
if (customContentInfo) {
|
|
5445
|
-
customContentInfo.
|
|
5446
|
-
|
|
5447
|
-
else if (typeof innerContent === 'object') {
|
|
5448
|
-
// look for a prop that would indicate a custom content handler is needed
|
|
5449
|
-
for (var contentKey in contentTypeHandlers) {
|
|
5450
|
-
if (innerContent[contentKey] !== undefined) {
|
|
5451
|
-
var stuff = contentTypeHandlers[contentKey]();
|
|
5452
|
-
customContentInfo = this.customContentInfo = __assign({ contentKey: contentKey, contentVal: innerContent[contentKey] }, stuff);
|
|
5453
|
-
break;
|
|
5454
|
-
}
|
|
5564
|
+
if (customContentInfo.destroy) {
|
|
5565
|
+
customContentInfo.destroy();
|
|
5455
5566
|
}
|
|
5567
|
+
customContentInfo = this.customContentInfo = null;
|
|
5456
5568
|
}
|
|
5457
|
-
|
|
5458
|
-
|
|
5569
|
+
// assigning new value
|
|
5570
|
+
if (meta.contentKey) {
|
|
5571
|
+
customContentInfo = this.customContentInfo = __assign({ contentKey: meta.contentKey, contentVal: innerContent[meta.contentKey] }, meta.buildLifecycleFuncs());
|
|
5459
5572
|
}
|
|
5460
|
-
|
|
5461
|
-
|
|
5573
|
+
// updating
|
|
5574
|
+
}
|
|
5575
|
+
else if (customContentInfo) {
|
|
5576
|
+
customContentInfo.contentVal = innerContent[meta.contentKey];
|
|
5577
|
+
}
|
|
5578
|
+
return customContentInfo
|
|
5579
|
+
? [] // signal that something was specified
|
|
5580
|
+
: innerContent; // assume a [p]react vdom node. use it
|
|
5581
|
+
};
|
|
5582
|
+
ContentHookInner.prototype.getInnerContent = function () {
|
|
5583
|
+
var props = this.props;
|
|
5584
|
+
var innerContent = normalizeContent(props.content, props.hookProps);
|
|
5585
|
+
if (innerContent === undefined) { // use the default
|
|
5586
|
+
innerContent = normalizeContent(props.defaultContent, props.hookProps);
|
|
5587
|
+
}
|
|
5588
|
+
return innerContent == null ? null : innerContent; // convert undefined to null (better for React)
|
|
5589
|
+
};
|
|
5590
|
+
ContentHookInner.prototype.getContentMeta = function (innerContent) {
|
|
5591
|
+
var contentTypeHandlers = this.context.pluginHooks.contentTypeHandlers;
|
|
5592
|
+
var contentKey = '';
|
|
5593
|
+
var buildLifecycleFuncs = null;
|
|
5594
|
+
if (innerContent) { // allowed to be null, for convenience to caller
|
|
5595
|
+
for (var searchKey in contentTypeHandlers) {
|
|
5596
|
+
if (innerContent[searchKey] !== undefined) {
|
|
5597
|
+
contentKey = searchKey;
|
|
5598
|
+
buildLifecycleFuncs = contentTypeHandlers[searchKey];
|
|
5599
|
+
break;
|
|
5600
|
+
}
|
|
5462
5601
|
}
|
|
5463
5602
|
}
|
|
5464
|
-
return
|
|
5603
|
+
return { contentKey: contentKey, buildLifecycleFuncs: buildLifecycleFuncs };
|
|
5465
5604
|
};
|
|
5466
5605
|
ContentHookInner.prototype.updateCustomContent = function () {
|
|
5467
|
-
if (this.customContentInfo) {
|
|
5606
|
+
if (this.customContentInfo) { // for non-[p]react
|
|
5468
5607
|
this.customContentInfo.render(this.innerElRef.current || this.props.backupElRef.current, // the element to render into
|
|
5469
5608
|
this.customContentInfo.contentVal);
|
|
5470
5609
|
}
|
|
@@ -5608,6 +5747,20 @@ var FullCalendar = (function (exports) {
|
|
|
5608
5747
|
}
|
|
5609
5748
|
return null;
|
|
5610
5749
|
};
|
|
5750
|
+
var queryButtonTitle = function (optionsSubset) {
|
|
5751
|
+
var buttonHints = optionsSubset.buttonHints || {};
|
|
5752
|
+
var buttonKey = viewDef.defaults.buttonTextKey; // use same key as text
|
|
5753
|
+
if (buttonKey != null && buttonHints[buttonKey] != null) {
|
|
5754
|
+
return buttonHints[buttonKey];
|
|
5755
|
+
}
|
|
5756
|
+
if (buttonHints[viewDef.type] != null) {
|
|
5757
|
+
return buttonHints[viewDef.type];
|
|
5758
|
+
}
|
|
5759
|
+
if (buttonHints[singleUnit] != null) {
|
|
5760
|
+
return buttonHints[singleUnit];
|
|
5761
|
+
}
|
|
5762
|
+
return null;
|
|
5763
|
+
};
|
|
5611
5764
|
return {
|
|
5612
5765
|
type: viewDef.type,
|
|
5613
5766
|
component: viewDef.component,
|
|
@@ -5622,7 +5775,15 @@ var FullCalendar = (function (exports) {
|
|
|
5622
5775
|
buttonTextDefault: queryButtonText(localeDefaults) ||
|
|
5623
5776
|
viewDef.defaults.buttonText ||
|
|
5624
5777
|
queryButtonText(BASE_OPTION_DEFAULTS) ||
|
|
5625
|
-
viewDef.type,
|
|
5778
|
+
viewDef.type,
|
|
5779
|
+
// not DRY
|
|
5780
|
+
buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) ||
|
|
5781
|
+
queryButtonTitle(optionOverrides) ||
|
|
5782
|
+
viewDef.overrides.buttonHint,
|
|
5783
|
+
buttonTitleDefault: queryButtonTitle(localeDefaults) ||
|
|
5784
|
+
viewDef.defaults.buttonHint ||
|
|
5785
|
+
queryButtonTitle(BASE_OPTION_DEFAULTS),
|
|
5786
|
+
// will eventually fall back to buttonText
|
|
5626
5787
|
};
|
|
5627
5788
|
}
|
|
5628
5789
|
// hack to get memoization working
|
|
@@ -5971,12 +6132,7 @@ var FullCalendar = (function (exports) {
|
|
|
5971
6132
|
case 'CHANGE_VIEW_TYPE':
|
|
5972
6133
|
return dateProfileGenerator.build(action.dateMarker || currentDate);
|
|
5973
6134
|
case 'CHANGE_DATE':
|
|
5974
|
-
|
|
5975
|
-
!rangeContainsMarker(currentDateProfile.currentRange, action.dateMarker) // don't move if date already in view
|
|
5976
|
-
) {
|
|
5977
|
-
return dateProfileGenerator.build(action.dateMarker);
|
|
5978
|
-
}
|
|
5979
|
-
break;
|
|
6135
|
+
return dateProfileGenerator.build(action.dateMarker);
|
|
5980
6136
|
case 'PREV':
|
|
5981
6137
|
dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate);
|
|
5982
6138
|
if (dp.isValid) {
|
|
@@ -6318,25 +6474,41 @@ var FullCalendar = (function (exports) {
|
|
|
6318
6474
|
}
|
|
6319
6475
|
|
|
6320
6476
|
function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
|
|
6321
|
-
var
|
|
6322
|
-
var
|
|
6323
|
-
|
|
6324
|
-
return { headerToolbar: headerToolbar, footerToolbar: footerToolbar, viewsWithButtons: viewsWithButtons };
|
|
6477
|
+
var header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null;
|
|
6478
|
+
var footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null;
|
|
6479
|
+
return { header: header, footer: footer };
|
|
6325
6480
|
}
|
|
6326
|
-
function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi
|
|
6327
|
-
|
|
6481
|
+
function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
|
|
6482
|
+
var sectionWidgets = {};
|
|
6483
|
+
var viewsWithButtons = [];
|
|
6484
|
+
var hasTitle = false;
|
|
6485
|
+
for (var sectionName in sectionStrHash) {
|
|
6486
|
+
var sectionStr = sectionStrHash[sectionName];
|
|
6487
|
+
var sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi);
|
|
6488
|
+
sectionWidgets[sectionName] = sectionRes.widgets;
|
|
6489
|
+
viewsWithButtons.push.apply(viewsWithButtons, sectionRes.viewsWithButtons);
|
|
6490
|
+
hasTitle = hasTitle || sectionRes.hasTitle;
|
|
6491
|
+
}
|
|
6492
|
+
return { sectionWidgets: sectionWidgets, viewsWithButtons: viewsWithButtons, hasTitle: hasTitle };
|
|
6328
6493
|
}
|
|
6329
6494
|
/*
|
|
6330
6495
|
BAD: querying icons and text here. should be done at render time
|
|
6331
6496
|
*/
|
|
6332
|
-
function parseSection(sectionStr, calendarOptions,
|
|
6497
|
+
function parseSection(sectionStr, calendarOptions, // defaults+overrides, then refined
|
|
6498
|
+
calendarOptionOverrides, // overrides only!, unrefined :(
|
|
6499
|
+
theme, viewSpecs, calendarApi) {
|
|
6333
6500
|
var isRtl = calendarOptions.direction === 'rtl';
|
|
6334
6501
|
var calendarCustomButtons = calendarOptions.customButtons || {};
|
|
6335
6502
|
var calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {};
|
|
6336
6503
|
var calendarButtonText = calendarOptions.buttonText || {};
|
|
6504
|
+
var calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {};
|
|
6505
|
+
var calendarButtonHints = calendarOptions.buttonHints || {};
|
|
6337
6506
|
var sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];
|
|
6338
|
-
|
|
6507
|
+
var viewsWithButtons = [];
|
|
6508
|
+
var hasTitle = false;
|
|
6509
|
+
var widgets = sectionSubstrs.map(function (buttonGroupStr) { return (buttonGroupStr.split(',').map(function (buttonName) {
|
|
6339
6510
|
if (buttonName === 'title') {
|
|
6511
|
+
hasTitle = true;
|
|
6340
6512
|
return { buttonName: buttonName };
|
|
6341
6513
|
}
|
|
6342
6514
|
var customButtonProps;
|
|
@@ -6344,6 +6516,8 @@ var FullCalendar = (function (exports) {
|
|
|
6344
6516
|
var buttonClick;
|
|
6345
6517
|
var buttonIcon; // only one of these will be set
|
|
6346
6518
|
var buttonText; // "
|
|
6519
|
+
var buttonHint;
|
|
6520
|
+
// ^ for the title="" attribute, for accessibility
|
|
6347
6521
|
if ((customButtonProps = calendarCustomButtons[buttonName])) {
|
|
6348
6522
|
buttonClick = function (ev) {
|
|
6349
6523
|
if (customButtonProps.click) {
|
|
@@ -6353,6 +6527,7 @@ var FullCalendar = (function (exports) {
|
|
|
6353
6527
|
(buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||
|
|
6354
6528
|
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
|
|
6355
6529
|
(buttonText = customButtonProps.text);
|
|
6530
|
+
buttonHint = customButtonProps.hint || customButtonProps.text;
|
|
6356
6531
|
}
|
|
6357
6532
|
else if ((viewSpec = viewSpecs[buttonName])) {
|
|
6358
6533
|
viewsWithButtons.push(buttonName);
|
|
@@ -6362,6 +6537,12 @@ var FullCalendar = (function (exports) {
|
|
|
6362
6537
|
(buttonText = viewSpec.buttonTextOverride) ||
|
|
6363
6538
|
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
|
|
6364
6539
|
(buttonText = viewSpec.buttonTextDefault);
|
|
6540
|
+
var textFallback = viewSpec.buttonTextOverride ||
|
|
6541
|
+
viewSpec.buttonTextDefault;
|
|
6542
|
+
buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride ||
|
|
6543
|
+
viewSpec.buttonTitleDefault ||
|
|
6544
|
+
calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName
|
|
6545
|
+
textFallback);
|
|
6365
6546
|
}
|
|
6366
6547
|
else if (calendarApi[buttonName]) { // a calendarApi method
|
|
6367
6548
|
buttonClick = function () {
|
|
@@ -6369,11 +6550,26 @@ var FullCalendar = (function (exports) {
|
|
|
6369
6550
|
};
|
|
6370
6551
|
(buttonText = calendarButtonTextOverrides[buttonName]) ||
|
|
6371
6552
|
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
|
|
6372
|
-
(buttonText = calendarButtonText[buttonName]);
|
|
6373
|
-
|
|
6553
|
+
(buttonText = calendarButtonText[buttonName]); // everything else is considered default
|
|
6554
|
+
if (buttonName === 'prevYear' || buttonName === 'nextYear') {
|
|
6555
|
+
var prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next';
|
|
6556
|
+
buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] ||
|
|
6557
|
+
calendarButtonHints[prevOrNext], [
|
|
6558
|
+
calendarButtonText.year || 'year',
|
|
6559
|
+
'year',
|
|
6560
|
+
], calendarButtonText[buttonName]);
|
|
6561
|
+
}
|
|
6562
|
+
else {
|
|
6563
|
+
buttonHint = function (navUnit) { return formatWithOrdinals(calendarButtonHintOverrides[buttonName] ||
|
|
6564
|
+
calendarButtonHints[buttonName], [
|
|
6565
|
+
calendarButtonText[navUnit] || navUnit,
|
|
6566
|
+
navUnit,
|
|
6567
|
+
], calendarButtonText[buttonName]); };
|
|
6568
|
+
}
|
|
6374
6569
|
}
|
|
6375
|
-
return { buttonName: buttonName, buttonClick: buttonClick, buttonIcon: buttonIcon, buttonText: buttonText };
|
|
6570
|
+
return { buttonName: buttonName, buttonClick: buttonClick, buttonIcon: buttonIcon, buttonText: buttonText, buttonHint: buttonHint };
|
|
6376
6571
|
})); });
|
|
6572
|
+
return { widgets: widgets, viewsWithButtons: viewsWithButtons, hasTitle: hasTitle };
|
|
6377
6573
|
}
|
|
6378
6574
|
|
|
6379
6575
|
var eventSourceDef$2 = {
|
|
@@ -6678,8 +6874,8 @@ var FullCalendar = (function (exports) {
|
|
|
6678
6874
|
function (state) { return computeEventSourcesLoading(state.eventSources); },
|
|
6679
6875
|
],
|
|
6680
6876
|
contentTypeHandlers: {
|
|
6681
|
-
html:
|
|
6682
|
-
domNodes:
|
|
6877
|
+
html: buildHtmlRenderer,
|
|
6878
|
+
domNodes: buildDomNodeRenderer,
|
|
6683
6879
|
},
|
|
6684
6880
|
propSetHandlers: {
|
|
6685
6881
|
dateProfile: handleDateProfile,
|
|
@@ -6687,19 +6883,45 @@ var FullCalendar = (function (exports) {
|
|
|
6687
6883
|
},
|
|
6688
6884
|
}),
|
|
6689
6885
|
];
|
|
6690
|
-
function
|
|
6691
|
-
|
|
6886
|
+
function buildHtmlRenderer() {
|
|
6887
|
+
var currentEl = null;
|
|
6888
|
+
var currentHtml = '';
|
|
6889
|
+
function render(el, html) {
|
|
6890
|
+
if (el !== currentEl || html !== currentHtml) {
|
|
6891
|
+
el.innerHTML = html;
|
|
6892
|
+
}
|
|
6893
|
+
currentEl = el;
|
|
6894
|
+
currentHtml = html;
|
|
6895
|
+
}
|
|
6896
|
+
function destroy() {
|
|
6897
|
+
currentEl.innerHTML = '';
|
|
6898
|
+
currentEl = null;
|
|
6899
|
+
currentHtml = '';
|
|
6900
|
+
}
|
|
6901
|
+
return { render: render, destroy: destroy };
|
|
6692
6902
|
}
|
|
6693
|
-
function
|
|
6694
|
-
var
|
|
6695
|
-
var
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6903
|
+
function buildDomNodeRenderer() {
|
|
6904
|
+
var currentEl = null;
|
|
6905
|
+
var currentDomNodes = [];
|
|
6906
|
+
function render(el, domNodes) {
|
|
6907
|
+
var newDomNodes = Array.prototype.slice.call(domNodes);
|
|
6908
|
+
if (el !== currentEl || !isArraysEqual(currentDomNodes, newDomNodes)) {
|
|
6909
|
+
// append first, remove second (for scroll resetting)
|
|
6910
|
+
for (var _i = 0, newDomNodes_1 = newDomNodes; _i < newDomNodes_1.length; _i++) {
|
|
6911
|
+
var newNode = newDomNodes_1[_i];
|
|
6912
|
+
el.appendChild(newNode);
|
|
6913
|
+
}
|
|
6914
|
+
destroy();
|
|
6700
6915
|
}
|
|
6701
|
-
|
|
6916
|
+
currentEl = el;
|
|
6917
|
+
currentDomNodes = newDomNodes;
|
|
6918
|
+
}
|
|
6919
|
+
function destroy() {
|
|
6920
|
+
currentDomNodes.forEach(removeElement);
|
|
6921
|
+
currentDomNodes = [];
|
|
6922
|
+
currentEl = null;
|
|
6702
6923
|
}
|
|
6924
|
+
return { render: render, destroy: destroy };
|
|
6703
6925
|
}
|
|
6704
6926
|
|
|
6705
6927
|
var DelayedRunner = /** @class */ (function () {
|
|
@@ -6980,7 +7202,9 @@ var FullCalendar = (function (exports) {
|
|
|
6980
7202
|
}
|
|
6981
7203
|
currentDate = reduceCurrentDate(currentDate, action);
|
|
6982
7204
|
dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator);
|
|
6983
|
-
if (
|
|
7205
|
+
if (action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator
|
|
7206
|
+
action.type === 'NEXT' || // "
|
|
7207
|
+
!rangeContainsMarker(dateProfile.currentRange, currentDate)) {
|
|
6984
7208
|
currentDate = dateProfile.currentRange.start;
|
|
6985
7209
|
}
|
|
6986
7210
|
var eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext);
|
|
@@ -7342,16 +7566,11 @@ var FullCalendar = (function (exports) {
|
|
|
7342
7566
|
this.entriesByLevel = []; // parallel with levelCoords
|
|
7343
7567
|
this.stackCnts = {}; // TODO: use better technique!?
|
|
7344
7568
|
}
|
|
7345
|
-
SegHierarchy.prototype.addSegs = function (
|
|
7569
|
+
SegHierarchy.prototype.addSegs = function (inputs) {
|
|
7346
7570
|
var hiddenEntries = [];
|
|
7347
|
-
for (var _i = 0,
|
|
7348
|
-
var
|
|
7349
|
-
this.insertEntry(
|
|
7350
|
-
segInput: segInput,
|
|
7351
|
-
spanStart: segInput.spanStart,
|
|
7352
|
-
spanEnd: segInput.spanEnd,
|
|
7353
|
-
thickness: segInput.thickness,
|
|
7354
|
-
}, hiddenEntries);
|
|
7571
|
+
for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {
|
|
7572
|
+
var input = inputs_1[_i];
|
|
7573
|
+
this.insertEntry(input, hiddenEntries);
|
|
7355
7574
|
}
|
|
7356
7575
|
return hiddenEntries;
|
|
7357
7576
|
};
|
|
@@ -7367,6 +7586,7 @@ var FullCalendar = (function (exports) {
|
|
|
7367
7586
|
return (this.maxCoord === -1 || insertion.levelCoord + entry.thickness <= this.maxCoord) &&
|
|
7368
7587
|
(this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt);
|
|
7369
7588
|
};
|
|
7589
|
+
// returns number of new entries inserted
|
|
7370
7590
|
SegHierarchy.prototype.handleInvalidInsertion = function (insertion, entry, hiddenEntries) {
|
|
7371
7591
|
if (this.allowReslicing && insertion.touchingEntry) {
|
|
7372
7592
|
return this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
|
|
@@ -7377,74 +7597,106 @@ var FullCalendar = (function (exports) {
|
|
|
7377
7597
|
SegHierarchy.prototype.splitEntry = function (entry, barrier, hiddenEntries) {
|
|
7378
7598
|
var partCnt = 0;
|
|
7379
7599
|
var splitHiddenEntries = [];
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7600
|
+
var entrySpan = entry.span;
|
|
7601
|
+
var barrierSpan = barrier.span;
|
|
7602
|
+
if (entrySpan.start < barrierSpan.start) {
|
|
7603
|
+
partCnt += this.insertEntry({
|
|
7604
|
+
index: entry.index,
|
|
7605
|
+
thickness: entry.thickness,
|
|
7606
|
+
span: { start: entrySpan.start, end: barrierSpan.start },
|
|
7607
|
+
}, splitHiddenEntries);
|
|
7608
|
+
}
|
|
7609
|
+
if (entrySpan.end > barrierSpan.end) {
|
|
7610
|
+
partCnt += this.insertEntry({
|
|
7611
|
+
index: entry.index,
|
|
7612
|
+
thickness: entry.thickness,
|
|
7613
|
+
span: { start: barrierSpan.end, end: entrySpan.end },
|
|
7614
|
+
}, splitHiddenEntries);
|
|
7385
7615
|
}
|
|
7386
7616
|
if (partCnt) {
|
|
7387
|
-
hiddenEntries.push.apply(hiddenEntries, __spreadArray([
|
|
7617
|
+
hiddenEntries.push.apply(hiddenEntries, __spreadArray([{
|
|
7618
|
+
index: entry.index,
|
|
7619
|
+
thickness: entry.thickness,
|
|
7620
|
+
span: intersectSpans(barrierSpan, entrySpan), // guaranteed to intersect
|
|
7621
|
+
}], splitHiddenEntries));
|
|
7388
7622
|
return partCnt;
|
|
7389
7623
|
}
|
|
7390
7624
|
hiddenEntries.push(entry);
|
|
7391
7625
|
return 0;
|
|
7392
7626
|
};
|
|
7393
7627
|
SegHierarchy.prototype.insertEntryAt = function (entry, insertion) {
|
|
7394
|
-
var
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
insertAt(
|
|
7398
|
-
insertAt(
|
|
7399
|
-
// insert into existing level
|
|
7628
|
+
var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords;
|
|
7629
|
+
if (insertion.lateral === -1) {
|
|
7630
|
+
// create a new level
|
|
7631
|
+
insertAt(levelCoords, insertion.level, insertion.levelCoord);
|
|
7632
|
+
insertAt(entriesByLevel, insertion.level, [entry]);
|
|
7400
7633
|
}
|
|
7401
7634
|
else {
|
|
7402
|
-
|
|
7635
|
+
// insert into existing level
|
|
7636
|
+
insertAt(entriesByLevel[insertion.level], insertion.lateral, entry);
|
|
7403
7637
|
}
|
|
7404
7638
|
this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
|
|
7405
7639
|
};
|
|
7406
7640
|
SegHierarchy.prototype.findInsertion = function (newEntry) {
|
|
7407
|
-
var _a = this, levelCoords = _a.levelCoords, entriesByLevel = _a.entriesByLevel,
|
|
7641
|
+
var _a = this, levelCoords = _a.levelCoords, entriesByLevel = _a.entriesByLevel, strictOrder = _a.strictOrder, stackCnts = _a.stackCnts;
|
|
7408
7642
|
var levelCnt = levelCoords.length;
|
|
7409
|
-
var
|
|
7410
|
-
var
|
|
7411
|
-
var
|
|
7412
|
-
var lateralEnd = 0; // "
|
|
7413
|
-
var resCoord = 0; // the levelCoord for newSeg
|
|
7643
|
+
var candidateCoord = 0;
|
|
7644
|
+
var touchingLevel = -1;
|
|
7645
|
+
var touchingLateral = -1;
|
|
7414
7646
|
var touchingEntry = null;
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
// empty space and can stop.
|
|
7419
|
-
if
|
|
7647
|
+
var stackCnt = 0;
|
|
7648
|
+
for (var trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
|
|
7649
|
+
var trackingCoord = levelCoords[trackingLevel];
|
|
7650
|
+
// if the current level is past the placed entry, we have found a good empty space and can stop.
|
|
7651
|
+
// if strictOrder, keep finding more lateral intersections.
|
|
7652
|
+
if (!strictOrder && trackingCoord >= candidateCoord + newEntry.thickness) {
|
|
7420
7653
|
break;
|
|
7421
7654
|
}
|
|
7422
|
-
var
|
|
7423
|
-
var
|
|
7424
|
-
var searchRes = binarySearch(
|
|
7425
|
-
|
|
7426
|
-
lateralEnd = lateralStart;
|
|
7655
|
+
var trackingEntries = entriesByLevel[trackingLevel];
|
|
7656
|
+
var trackingEntry = void 0;
|
|
7657
|
+
var searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
|
|
7658
|
+
var lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
|
|
7427
7659
|
while ( // loop through entries that horizontally intersect
|
|
7428
|
-
(
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
touchingEntry =
|
|
7436
|
-
|
|
7660
|
+
(trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
|
|
7661
|
+
trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
|
|
7662
|
+
) {
|
|
7663
|
+
var trackingEntryBottom = trackingCoord + trackingEntry.thickness;
|
|
7664
|
+
// intersects into the top of the candidate?
|
|
7665
|
+
if (trackingEntryBottom > candidateCoord) {
|
|
7666
|
+
candidateCoord = trackingEntryBottom;
|
|
7667
|
+
touchingEntry = trackingEntry;
|
|
7668
|
+
touchingLevel = trackingLevel;
|
|
7669
|
+
touchingLateral = lateralIndex;
|
|
7670
|
+
}
|
|
7671
|
+
// butts up against top of candidate? (will happen if just intersected as well)
|
|
7672
|
+
if (trackingEntryBottom === candidateCoord) {
|
|
7673
|
+
// accumulate the highest possible stackCnt of the trackingEntries that butt up
|
|
7674
|
+
stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
|
|
7437
7675
|
}
|
|
7438
|
-
|
|
7676
|
+
lateralIndex += 1;
|
|
7439
7677
|
}
|
|
7440
7678
|
}
|
|
7679
|
+
// the destination level will be after touchingEntry's level. find it
|
|
7680
|
+
var destLevel = 0;
|
|
7681
|
+
if (touchingEntry) {
|
|
7682
|
+
destLevel = touchingLevel + 1;
|
|
7683
|
+
while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
|
|
7684
|
+
destLevel += 1;
|
|
7685
|
+
}
|
|
7686
|
+
}
|
|
7687
|
+
// if adding to an existing level, find where to insert
|
|
7688
|
+
var destLateral = -1;
|
|
7689
|
+
if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
|
|
7690
|
+
destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
|
|
7691
|
+
}
|
|
7441
7692
|
return {
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
lateralStart: lateralStart,
|
|
7445
|
-
lateralEnd: lateralEnd,
|
|
7693
|
+
touchingLevel: touchingLevel,
|
|
7694
|
+
touchingLateral: touchingLateral,
|
|
7446
7695
|
touchingEntry: touchingEntry,
|
|
7447
|
-
stackCnt:
|
|
7696
|
+
stackCnt: stackCnt,
|
|
7697
|
+
levelCoord: candidateCoord,
|
|
7698
|
+
level: destLevel,
|
|
7699
|
+
lateral: destLateral,
|
|
7448
7700
|
};
|
|
7449
7701
|
};
|
|
7450
7702
|
// sorted by levelCoord (lowest to highest)
|
|
@@ -7465,10 +7717,10 @@ var FullCalendar = (function (exports) {
|
|
|
7465
7717
|
return SegHierarchy;
|
|
7466
7718
|
}());
|
|
7467
7719
|
function getEntrySpanEnd(entry) {
|
|
7468
|
-
return entry.
|
|
7720
|
+
return entry.span.end;
|
|
7469
7721
|
}
|
|
7470
7722
|
function buildEntryKey(entry) {
|
|
7471
|
-
return entry.
|
|
7723
|
+
return entry.index + ':' + entry.span.start;
|
|
7472
7724
|
}
|
|
7473
7725
|
// returns groups with entries sorted by input order
|
|
7474
7726
|
function groupIntersectingEntries(entries) {
|
|
@@ -7477,17 +7729,15 @@ var FullCalendar = (function (exports) {
|
|
|
7477
7729
|
var entry = entries_2[_i];
|
|
7478
7730
|
var filteredMerges = [];
|
|
7479
7731
|
var hungryMerge = {
|
|
7480
|
-
|
|
7481
|
-
spanEnd: entry.spanEnd,
|
|
7732
|
+
span: entry.span,
|
|
7482
7733
|
entries: [entry],
|
|
7483
7734
|
};
|
|
7484
7735
|
for (var _a = 0, merges_1 = merges; _a < merges_1.length; _a++) {
|
|
7485
7736
|
var merge = merges_1[_a];
|
|
7486
|
-
if (merge.
|
|
7737
|
+
if (intersectSpans(merge.span, hungryMerge.span)) {
|
|
7487
7738
|
hungryMerge = {
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
entries: merge.entries.concat(hungryMerge.entries), // keep preexisting merge's items first. maintains order
|
|
7739
|
+
entries: merge.entries.concat(hungryMerge.entries),
|
|
7740
|
+
span: joinSpans(merge.span, hungryMerge.span),
|
|
7491
7741
|
};
|
|
7492
7742
|
}
|
|
7493
7743
|
else {
|
|
@@ -7499,6 +7749,20 @@ var FullCalendar = (function (exports) {
|
|
|
7499
7749
|
}
|
|
7500
7750
|
return merges;
|
|
7501
7751
|
}
|
|
7752
|
+
function joinSpans(span0, span1) {
|
|
7753
|
+
return {
|
|
7754
|
+
start: Math.min(span0.start, span1.start),
|
|
7755
|
+
end: Math.max(span0.end, span1.end),
|
|
7756
|
+
};
|
|
7757
|
+
}
|
|
7758
|
+
function intersectSpans(span0, span1) {
|
|
7759
|
+
var start = Math.max(span0.start, span1.start);
|
|
7760
|
+
var end = Math.min(span0.end, span1.end);
|
|
7761
|
+
if (start < end) {
|
|
7762
|
+
return { start: start, end: end };
|
|
7763
|
+
}
|
|
7764
|
+
return null;
|
|
7765
|
+
}
|
|
7502
7766
|
// general util
|
|
7503
7767
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
7504
7768
|
function insertAt(arr, index, item) {
|
|
@@ -7628,21 +7892,21 @@ var FullCalendar = (function (exports) {
|
|
|
7628
7892
|
var isOnlyButtons = true;
|
|
7629
7893
|
for (var _i = 0, widgetGroup_1 = widgetGroup; _i < widgetGroup_1.length; _i++) {
|
|
7630
7894
|
var widget = widgetGroup_1[_i];
|
|
7631
|
-
var buttonName = widget.buttonName, buttonClick = widget.buttonClick, buttonText = widget.buttonText, buttonIcon = widget.buttonIcon;
|
|
7895
|
+
var buttonName = widget.buttonName, buttonClick = widget.buttonClick, buttonText = widget.buttonText, buttonIcon = widget.buttonIcon, buttonHint = widget.buttonHint;
|
|
7632
7896
|
if (buttonName === 'title') {
|
|
7633
7897
|
isOnlyButtons = false;
|
|
7634
|
-
children.push(createElement("h2", { className: "fc-toolbar-title" }, props.title));
|
|
7898
|
+
children.push(createElement("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title));
|
|
7635
7899
|
}
|
|
7636
7900
|
else {
|
|
7637
|
-
var
|
|
7638
|
-
var buttonClasses = ["fc-" + buttonName + "-button", theme.getClass('button')];
|
|
7639
|
-
if (buttonName === props.activeButton) {
|
|
7640
|
-
buttonClasses.push(theme.getClass('buttonActive'));
|
|
7641
|
-
}
|
|
7901
|
+
var isPressed = buttonName === props.activeButton;
|
|
7642
7902
|
var isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
|
|
7643
7903
|
(!props.isPrevEnabled && buttonName === 'prev') ||
|
|
7644
7904
|
(!props.isNextEnabled && buttonName === 'next');
|
|
7645
|
-
|
|
7905
|
+
var buttonClasses = ["fc-" + buttonName + "-button", theme.getClass('button')];
|
|
7906
|
+
if (isPressed) {
|
|
7907
|
+
buttonClasses.push(theme.getClass('buttonActive'));
|
|
7908
|
+
}
|
|
7909
|
+
children.push(createElement("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? createElement("span", { className: buttonIcon }) : '')));
|
|
7646
7910
|
}
|
|
7647
7911
|
}
|
|
7648
7912
|
if (children.length > 1) {
|
|
@@ -7664,20 +7928,21 @@ var FullCalendar = (function (exports) {
|
|
|
7664
7928
|
var forceLtr = false;
|
|
7665
7929
|
var startContent;
|
|
7666
7930
|
var endContent;
|
|
7667
|
-
var
|
|
7668
|
-
|
|
7931
|
+
var sectionWidgets = model.sectionWidgets;
|
|
7932
|
+
var centerContent = sectionWidgets.center;
|
|
7933
|
+
if (sectionWidgets.left) {
|
|
7669
7934
|
forceLtr = true;
|
|
7670
|
-
startContent =
|
|
7935
|
+
startContent = sectionWidgets.left;
|
|
7671
7936
|
}
|
|
7672
7937
|
else {
|
|
7673
|
-
startContent =
|
|
7938
|
+
startContent = sectionWidgets.start;
|
|
7674
7939
|
}
|
|
7675
|
-
if (
|
|
7940
|
+
if (sectionWidgets.right) {
|
|
7676
7941
|
forceLtr = true;
|
|
7677
|
-
endContent =
|
|
7942
|
+
endContent = sectionWidgets.right;
|
|
7678
7943
|
}
|
|
7679
7944
|
else {
|
|
7680
|
-
endContent =
|
|
7945
|
+
endContent = sectionWidgets.end;
|
|
7681
7946
|
}
|
|
7682
7947
|
var classNames = [
|
|
7683
7948
|
extraClassName || '',
|
|
@@ -7691,7 +7956,7 @@ var FullCalendar = (function (exports) {
|
|
|
7691
7956
|
};
|
|
7692
7957
|
Toolbar.prototype.renderSection = function (key, widgetGroups) {
|
|
7693
7958
|
var props = this.props;
|
|
7694
|
-
return (createElement(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
|
|
7959
|
+
return (createElement(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId }));
|
|
7695
7960
|
};
|
|
7696
7961
|
return Toolbar;
|
|
7697
7962
|
}(BaseComponent));
|
|
@@ -7740,7 +8005,7 @@ var FullCalendar = (function (exports) {
|
|
|
7740
8005
|
else {
|
|
7741
8006
|
height = props.height || '';
|
|
7742
8007
|
}
|
|
7743
|
-
return (createElement("div", {
|
|
8008
|
+
return (createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height: height, paddingBottom: paddingBottom } }, props.children));
|
|
7744
8009
|
};
|
|
7745
8010
|
ViewContainer.prototype.componentDidMount = function () {
|
|
7746
8011
|
this.context.addResizeHandler(this.handleResize);
|
|
@@ -7849,10 +8114,13 @@ var FullCalendar = (function (exports) {
|
|
|
7849
8114
|
_this.buildViewContext = memoize(buildViewContext);
|
|
7850
8115
|
_this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
7851
8116
|
_this.buildToolbarProps = memoize(buildToolbarProps);
|
|
7852
|
-
_this.handleNavLinkClick = buildDelegationHandler('a[data-navlink]', _this._handleNavLinkClick.bind(_this));
|
|
7853
8117
|
_this.headerRef = createRef();
|
|
7854
8118
|
_this.footerRef = createRef();
|
|
7855
8119
|
_this.interactionsStore = {};
|
|
8120
|
+
// eslint-disable-next-line
|
|
8121
|
+
_this.state = {
|
|
8122
|
+
viewLabelId: getUniqueDomId(),
|
|
8123
|
+
};
|
|
7856
8124
|
// Component Registration
|
|
7857
8125
|
// -----------------------------------------------------------------------------------------------------------------
|
|
7858
8126
|
_this.registerInteractiveComponent = function (component, settingsInput) {
|
|
@@ -7914,12 +8182,15 @@ var FullCalendar = (function (exports) {
|
|
|
7914
8182
|
viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
|
|
7915
8183
|
}
|
|
7916
8184
|
var 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);
|
|
8185
|
+
var viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
|
|
8186
|
+
? this.state.viewLabelId
|
|
8187
|
+
: '';
|
|
7917
8188
|
return (createElement(ViewContextType.Provider, { value: viewContext },
|
|
7918
|
-
toolbarConfig.
|
|
7919
|
-
createElement(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio,
|
|
8189
|
+
toolbarConfig.header && (createElement(Toolbar, __assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
|
|
8190
|
+
createElement(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
|
|
7920
8191
|
this.renderView(props),
|
|
7921
8192
|
this.buildAppendContent()),
|
|
7922
|
-
toolbarConfig.
|
|
8193
|
+
toolbarConfig.footer && (createElement(Toolbar, __assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
|
|
7923
8194
|
};
|
|
7924
8195
|
CalendarContent.prototype.componentDidMount = function () {
|
|
7925
8196
|
var props = this.props;
|
|
@@ -7949,24 +8220,6 @@ var FullCalendar = (function (exports) {
|
|
|
7949
8220
|
}
|
|
7950
8221
|
this.props.emitter.trigger('_unmount');
|
|
7951
8222
|
};
|
|
7952
|
-
CalendarContent.prototype._handleNavLinkClick = function (ev, anchorEl) {
|
|
7953
|
-
var _a = this.props, dateEnv = _a.dateEnv, options = _a.options, calendarApi = _a.calendarApi;
|
|
7954
|
-
var navLinkOptions = anchorEl.getAttribute('data-navlink');
|
|
7955
|
-
navLinkOptions = navLinkOptions ? JSON.parse(navLinkOptions) : {};
|
|
7956
|
-
var dateMarker = dateEnv.createMarker(navLinkOptions.date);
|
|
7957
|
-
var viewType = navLinkOptions.type;
|
|
7958
|
-
var customAction = viewType === 'day' ? options.navLinkDayClick :
|
|
7959
|
-
viewType === 'week' ? options.navLinkWeekClick : null;
|
|
7960
|
-
if (typeof customAction === 'function') {
|
|
7961
|
-
customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev);
|
|
7962
|
-
}
|
|
7963
|
-
else {
|
|
7964
|
-
if (typeof customAction === 'string') {
|
|
7965
|
-
viewType = customAction;
|
|
7966
|
-
}
|
|
7967
|
-
calendarApi.zoomTo(dateMarker, viewType);
|
|
7968
|
-
}
|
|
7969
|
-
};
|
|
7970
8223
|
CalendarContent.prototype.buildAppendContent = function () {
|
|
7971
8224
|
var props = this.props;
|
|
7972
8225
|
var children = props.pluginHooks.viewContainerAppends.map(function (buildAppendContent) { return buildAppendContent(props); });
|
|
@@ -8005,6 +8258,7 @@ var FullCalendar = (function (exports) {
|
|
|
8005
8258
|
return {
|
|
8006
8259
|
title: title,
|
|
8007
8260
|
activeButton: viewSpec.type,
|
|
8261
|
+
navUnit: viewSpec.singleUnit,
|
|
8008
8262
|
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
|
|
8009
8263
|
isPrevEnabled: prevInfo.isValid,
|
|
8010
8264
|
isNextEnabled: nextInfo.isValid,
|
|
@@ -8092,11 +8346,11 @@ var FullCalendar = (function (exports) {
|
|
|
8092
8346
|
var classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme));
|
|
8093
8347
|
var text = dateEnv.format(date, props.dayHeaderFormat);
|
|
8094
8348
|
// if colCnt is 1, we are already in a day-view and don't need a navlink
|
|
8095
|
-
var navLinkAttrs = (
|
|
8096
|
-
?
|
|
8349
|
+
var navLinkAttrs = (!dayMeta.isDisabled && props.colCnt > 1)
|
|
8350
|
+
? buildNavLinkAttrs(this.context, date)
|
|
8097
8351
|
: {};
|
|
8098
8352
|
var hookProps = __assign(__assign(__assign({ date: dateEnv.toDate(date), view: viewApi }, props.extraHookProps), { text: text }), dayMeta);
|
|
8099
|
-
return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement("th", __assign({ ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-date": !dayMeta.isDisabled ? formatDayString(date) : undefined, colSpan: props.colSpan }, props.extraDataAttrs),
|
|
8353
|
+
return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement("th", __assign({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(' '), "data-date": !dayMeta.isDisabled ? formatDayString(date) : undefined, colSpan: props.colSpan }, props.extraDataAttrs),
|
|
8100
8354
|
createElement("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && (createElement("a", __assign({ ref: innerElRef, className: [
|
|
8101
8355
|
'fc-col-header-cell-cushion',
|
|
8102
8356
|
props.isSticky ? 'fc-sticky' : '',
|
|
@@ -8105,6 +8359,7 @@ var FullCalendar = (function (exports) {
|
|
|
8105
8359
|
return TableDateCell;
|
|
8106
8360
|
}(BaseComponent));
|
|
8107
8361
|
|
|
8362
|
+
var WEEKDAY_FORMAT = createFormatter({ weekday: 'long' });
|
|
8108
8363
|
var TableDowCell = /** @class */ (function (_super) {
|
|
8109
8364
|
__extends(TableDowCell, _super);
|
|
8110
8365
|
function TableDowCell() {
|
|
@@ -8126,9 +8381,9 @@ var FullCalendar = (function (exports) {
|
|
|
8126
8381
|
var text = dateEnv.format(date, props.dayHeaderFormat);
|
|
8127
8382
|
var hookProps = __assign(__assign(__assign(__assign({ // TODO: make this public?
|
|
8128
8383
|
date: date }, dateMeta), { view: viewApi }), props.extraHookProps), { text: text });
|
|
8129
|
-
return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement("th", __assign({ ref: rootElRef, className: classNames.concat(customClassNames).join(' '), colSpan: props.colSpan }, props.extraDataAttrs),
|
|
8384
|
+
return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement("th", __assign({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(' '), colSpan: props.colSpan }, props.extraDataAttrs),
|
|
8130
8385
|
createElement("div", { className: "fc-scrollgrid-sync-inner" },
|
|
8131
|
-
createElement("a", { className: [
|
|
8386
|
+
createElement("a", { "aria-label": dateEnv.format(date, WEEKDAY_FORMAT), className: [
|
|
8132
8387
|
'fc-col-header-cell-cushion',
|
|
8133
8388
|
props.isSticky ? 'fc-sticky' : '',
|
|
8134
8389
|
].join(' '), ref: innerElRef }, innerContent)))); }));
|
|
@@ -8210,7 +8465,7 @@ var FullCalendar = (function (exports) {
|
|
|
8210
8465
|
var context = this.context;
|
|
8211
8466
|
var _a = this.props, dates = _a.dates, dateProfile = _a.dateProfile, datesRepDistinctDays = _a.datesRepDistinctDays, renderIntro = _a.renderIntro;
|
|
8212
8467
|
var dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length);
|
|
8213
|
-
return (createElement(NowTimer, { unit: "day" }, function (nowDate, todayRange) { return (createElement("tr",
|
|
8468
|
+
return (createElement(NowTimer, { unit: "day" }, function (nowDate, todayRange) { return (createElement("tr", { role: "row" },
|
|
8214
8469
|
renderIntro && renderIntro('day'),
|
|
8215
8470
|
dates.map(function (date) { return (datesRepDistinctDays ? (createElement(TableDateCell, { key: date.toISOString(), date: date, dateProfile: dateProfile, todayRange: todayRange, colCnt: dates.length, dayHeaderFormat: dayHeaderFormat })) : (createElement(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat: dayHeaderFormat }))); }))); }));
|
|
8216
8471
|
};
|
|
@@ -8854,11 +9109,12 @@ var FullCalendar = (function (exports) {
|
|
|
8854
9109
|
getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars
|
|
8855
9110
|
}
|
|
8856
9111
|
// TODO: ONLY use `arg`. force out internal function to use same API
|
|
8857
|
-
function renderChunkContent(sectionConfig, chunkConfig, arg) {
|
|
9112
|
+
function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) {
|
|
8858
9113
|
var expandRows = arg.expandRows;
|
|
8859
9114
|
var content = typeof chunkConfig.content === 'function' ?
|
|
8860
9115
|
chunkConfig.content(arg) :
|
|
8861
9116
|
createElement('table', {
|
|
9117
|
+
role: 'presentation',
|
|
8862
9118
|
className: [
|
|
8863
9119
|
chunkConfig.tableClassName,
|
|
8864
9120
|
sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',
|
|
@@ -8868,7 +9124,11 @@ var FullCalendar = (function (exports) {
|
|
|
8868
9124
|
width: arg.clientWidth,
|
|
8869
9125
|
height: expandRows ? arg.clientHeight : '', // css `height` on a <table> serves as a min-height
|
|
8870
9126
|
},
|
|
8871
|
-
}, arg.tableColGroupNode, createElement('
|
|
9127
|
+
}, arg.tableColGroupNode, createElement(isHeader ? 'thead' : 'tbody', {
|
|
9128
|
+
role: 'presentation',
|
|
9129
|
+
}, typeof chunkConfig.rowContent === 'function'
|
|
9130
|
+
? chunkConfig.rowContent(arg)
|
|
9131
|
+
: chunkConfig.rowContent));
|
|
8872
9132
|
return content;
|
|
8873
9133
|
}
|
|
8874
9134
|
function isColPropsEqual(cols0, cols1) {
|
|
@@ -8990,15 +9250,15 @@ var FullCalendar = (function (exports) {
|
|
|
8990
9250
|
var bodySectionNodes = [];
|
|
8991
9251
|
var footSectionNodes = [];
|
|
8992
9252
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
|
|
8993
|
-
headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode));
|
|
9253
|
+
headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
|
|
8994
9254
|
configI += 1;
|
|
8995
9255
|
}
|
|
8996
9256
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
|
|
8997
|
-
bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode));
|
|
9257
|
+
bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false));
|
|
8998
9258
|
configI += 1;
|
|
8999
9259
|
}
|
|
9000
9260
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
|
|
9001
|
-
footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode));
|
|
9261
|
+
footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
|
|
9002
9262
|
configI += 1;
|
|
9003
9263
|
}
|
|
9004
9264
|
// firefox bug: when setting height on table and there is a thead or tfoot,
|
|
@@ -9006,18 +9266,20 @@ var FullCalendar = (function (exports) {
|
|
|
9006
9266
|
// use getCanVGrowWithinCell as a way to detect table-stupid firefox.
|
|
9007
9267
|
// if so, use a simpler dom structure, jam everything into a lone tbody.
|
|
9008
9268
|
var isBuggy = !getCanVGrowWithinCell();
|
|
9269
|
+
var roleAttrs = { role: 'rowgroup' };
|
|
9009
9270
|
return createElement('table', {
|
|
9271
|
+
role: 'grid',
|
|
9010
9272
|
className: classNames.join(' '),
|
|
9011
9273
|
style: { height: props.height },
|
|
9012
|
-
}, Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(['thead',
|
|
9274
|
+
}, Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(['thead', roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && createElement.apply(void 0, __spreadArray(['tbody', roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && createElement.apply(void 0, __spreadArray(['tfoot', roleAttrs], footSectionNodes)), isBuggy && createElement.apply(void 0, __spreadArray(__spreadArray(__spreadArray(['tbody', roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes)));
|
|
9013
9275
|
};
|
|
9014
|
-
SimpleScrollGrid.prototype.renderSection = function (sectionConfig, microColGroupNode) {
|
|
9276
|
+
SimpleScrollGrid.prototype.renderSection = function (sectionConfig, microColGroupNode, isHeader) {
|
|
9015
9277
|
if ('outerContent' in sectionConfig) {
|
|
9016
9278
|
return (createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
9017
9279
|
}
|
|
9018
|
-
return (createElement("tr", { key: sectionConfig.key, className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk)));
|
|
9280
|
+
return (createElement("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)));
|
|
9019
9281
|
};
|
|
9020
|
-
SimpleScrollGrid.prototype.renderChunkTd = function (sectionConfig, microColGroupNode, chunkConfig) {
|
|
9282
|
+
SimpleScrollGrid.prototype.renderChunkTd = function (sectionConfig, microColGroupNode, chunkConfig, isHeader) {
|
|
9021
9283
|
if ('outerContent' in chunkConfig) {
|
|
9022
9284
|
return chunkConfig.outerContent;
|
|
9023
9285
|
}
|
|
@@ -9041,11 +9303,13 @@ var FullCalendar = (function (exports) {
|
|
|
9041
9303
|
syncRowHeights: false,
|
|
9042
9304
|
rowSyncHeights: [],
|
|
9043
9305
|
reportRowHeightChange: function () { },
|
|
9044
|
-
});
|
|
9045
|
-
return
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9306
|
+
}, isHeader);
|
|
9307
|
+
return createElement(isHeader ? 'th' : 'td', {
|
|
9308
|
+
ref: chunkConfig.elRef,
|
|
9309
|
+
role: 'presentation',
|
|
9310
|
+
}, createElement("div", { className: "fc-scroller-harness" + (isLiquid ? ' fc-scroller-harness-liquid' : '') },
|
|
9311
|
+
createElement(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
|
|
9312
|
+
: true }, content)));
|
|
9049
9313
|
};
|
|
9050
9314
|
SimpleScrollGrid.prototype._handleScrollerEl = function (scrollerEl, key) {
|
|
9051
9315
|
var section = getSectionByKey(this.props.sections, key);
|
|
@@ -9177,7 +9441,7 @@ var FullCalendar = (function (exports) {
|
|
|
9177
9441
|
return (createElement(EventRoot, { seg: seg, timeText: timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent$1, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (createElement("a", __assign({ className: props.extraClassNames.concat(classNames).join(' '), style: {
|
|
9178
9442
|
borderColor: hookProps.borderColor,
|
|
9179
9443
|
backgroundColor: hookProps.backgroundColor,
|
|
9180
|
-
}, ref: rootElRef }, getSegAnchorAttrs(seg)),
|
|
9444
|
+
}, ref: rootElRef }, getSegAnchorAttrs(seg, context)),
|
|
9181
9445
|
createElement("div", { className: "fc-event-main", ref: innerElRef, style: { color: hookProps.textColor } }, innerContent),
|
|
9182
9446
|
hookProps.isStartResizable &&
|
|
9183
9447
|
createElement("div", { className: "fc-event-resizer fc-event-resizer-start" }),
|
|
@@ -9192,10 +9456,6 @@ var FullCalendar = (function (exports) {
|
|
|
9192
9456
|
createElement("div", { className: "fc-event-title-container" },
|
|
9193
9457
|
createElement("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || createElement(Fragment, null, "\u00A0")))));
|
|
9194
9458
|
}
|
|
9195
|
-
function getSegAnchorAttrs(seg) {
|
|
9196
|
-
var url = seg.eventRange.def.url;
|
|
9197
|
-
return url ? { href: url } : {};
|
|
9198
|
-
}
|
|
9199
9459
|
|
|
9200
9460
|
var NowIndicatorRoot = function (props) { return (createElement(ViewContextType.Consumer, null, function (context) {
|
|
9201
9461
|
var options = context.options;
|
|
@@ -9295,6 +9555,9 @@ var FullCalendar = (function (exports) {
|
|
|
9295
9555
|
__extends(Popover, _super);
|
|
9296
9556
|
function Popover() {
|
|
9297
9557
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
9558
|
+
_this.state = {
|
|
9559
|
+
titleId: getUniqueDomId(),
|
|
9560
|
+
};
|
|
9298
9561
|
_this.handleRootEl = function (el) {
|
|
9299
9562
|
_this.rootEl = el;
|
|
9300
9563
|
if (_this.props.elRef) {
|
|
@@ -9302,13 +9565,18 @@ var FullCalendar = (function (exports) {
|
|
|
9302
9565
|
}
|
|
9303
9566
|
};
|
|
9304
9567
|
// Triggered when the user clicks *anywhere* in the document, for the autoHide feature
|
|
9305
|
-
_this.
|
|
9568
|
+
_this.handleDocumentMouseDown = function (ev) {
|
|
9306
9569
|
// only hide the popover if the click happened outside the popover
|
|
9307
9570
|
var target = getEventTargetViaRoot(ev);
|
|
9308
9571
|
if (!_this.rootEl.contains(target)) {
|
|
9309
9572
|
_this.handleCloseClick();
|
|
9310
9573
|
}
|
|
9311
9574
|
};
|
|
9575
|
+
_this.handleDocumentKeyDown = function (ev) {
|
|
9576
|
+
if (ev.key === 'Escape') {
|
|
9577
|
+
_this.handleCloseClick();
|
|
9578
|
+
}
|
|
9579
|
+
};
|
|
9312
9580
|
_this.handleCloseClick = function () {
|
|
9313
9581
|
var onClose = _this.props.onClose;
|
|
9314
9582
|
if (onClose) {
|
|
@@ -9318,24 +9586,26 @@ var FullCalendar = (function (exports) {
|
|
|
9318
9586
|
return _this;
|
|
9319
9587
|
}
|
|
9320
9588
|
Popover.prototype.render = function () {
|
|
9321
|
-
var
|
|
9322
|
-
var props =
|
|
9589
|
+
var _a = this.context, theme = _a.theme, options = _a.options;
|
|
9590
|
+
var _b = this, props = _b.props, state = _b.state;
|
|
9323
9591
|
var classNames = [
|
|
9324
9592
|
'fc-popover',
|
|
9325
9593
|
theme.getClass('popover'),
|
|
9326
9594
|
].concat(props.extraClassNames || []);
|
|
9327
|
-
return createPortal(createElement("div", __assign({ className: classNames.join(' ') }, props.extraAttrs, { ref: this.handleRootEl }),
|
|
9595
|
+
return createPortal(createElement("div", __assign({ id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId }, props.extraAttrs, { ref: this.handleRootEl }),
|
|
9328
9596
|
createElement("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
|
|
9329
|
-
createElement("span", { className: "fc-popover-title" }, props.title),
|
|
9330
|
-
createElement("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), onClick: this.handleCloseClick })),
|
|
9597
|
+
createElement("span", { className: "fc-popover-title", id: state.titleId }, props.title),
|
|
9598
|
+
createElement("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
|
|
9331
9599
|
createElement("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
|
|
9332
9600
|
};
|
|
9333
9601
|
Popover.prototype.componentDidMount = function () {
|
|
9334
|
-
document.addEventListener('mousedown', this.
|
|
9602
|
+
document.addEventListener('mousedown', this.handleDocumentMouseDown);
|
|
9603
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown);
|
|
9335
9604
|
this.updateSize();
|
|
9336
9605
|
};
|
|
9337
9606
|
Popover.prototype.componentWillUnmount = function () {
|
|
9338
|
-
document.removeEventListener('mousedown', this.
|
|
9607
|
+
document.removeEventListener('mousedown', this.handleDocumentMouseDown);
|
|
9608
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
|
9339
9609
|
};
|
|
9340
9610
|
Popover.prototype.updateSize = function () {
|
|
9341
9611
|
var isRtl = this.context.isRtl;
|
|
@@ -9386,7 +9656,7 @@ var FullCalendar = (function (exports) {
|
|
|
9386
9656
|
var props = this.props;
|
|
9387
9657
|
var startDate = props.startDate, todayRange = props.todayRange, dateProfile = props.dateProfile;
|
|
9388
9658
|
var title = dateEnv.format(startDate, options.dayPopoverFormat);
|
|
9389
|
-
return (createElement(DayCellRoot, { date: startDate, dateProfile: dateProfile, todayRange: todayRange, elRef: this.handleRootEl }, function (rootElRef, dayClassNames, dataAttrs) { return (createElement(Popover, { elRef: rootElRef, title: title, extraClassNames: ['fc-more-popover'].concat(dayClassNames), extraAttrs: dataAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
|
|
9659
|
+
return (createElement(DayCellRoot, { date: startDate, dateProfile: dateProfile, todayRange: todayRange, elRef: this.handleRootEl }, function (rootElRef, dayClassNames, dataAttrs) { return (createElement(Popover, { elRef: rootElRef, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(dayClassNames), extraAttrs: dataAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
|
|
9390
9660
|
createElement(DayCellContent, { date: startDate, dateProfile: dateProfile, todayRange: todayRange }, function (innerElRef, innerContent) { return (innerContent &&
|
|
9391
9661
|
createElement("div", { className: "fc-more-popover-misc", ref: innerElRef }, innerContent)); }),
|
|
9392
9662
|
props.children)); }));
|
|
@@ -9423,6 +9693,7 @@ var FullCalendar = (function (exports) {
|
|
|
9423
9693
|
_this.linkElRef = createRef();
|
|
9424
9694
|
_this.state = {
|
|
9425
9695
|
isPopoverOpen: false,
|
|
9696
|
+
popoverId: getUniqueDomId(),
|
|
9426
9697
|
};
|
|
9427
9698
|
_this.handleClick = function (ev) {
|
|
9428
9699
|
var _a = _this, props = _a.props, context = _a.context;
|
|
@@ -9462,23 +9733,25 @@ var FullCalendar = (function (exports) {
|
|
|
9462
9733
|
}
|
|
9463
9734
|
MoreLinkRoot.prototype.render = function () {
|
|
9464
9735
|
var _this = this;
|
|
9465
|
-
var props =
|
|
9736
|
+
var _a = this, props = _a.props, state = _a.state;
|
|
9466
9737
|
return (createElement(ViewContextType.Consumer, null, function (context) {
|
|
9467
9738
|
var viewApi = context.viewApi, options = context.options, calendarApi = context.calendarApi;
|
|
9468
9739
|
var moreLinkText = options.moreLinkText;
|
|
9469
9740
|
var moreCnt = props.moreCnt;
|
|
9470
9741
|
var range = computeRange(props);
|
|
9742
|
+
var text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
|
|
9743
|
+
? moreLinkText.call(calendarApi, moreCnt)
|
|
9744
|
+
: "+" + moreCnt + " " + moreLinkText;
|
|
9745
|
+
var title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
|
|
9471
9746
|
var hookProps = {
|
|
9472
9747
|
num: moreCnt,
|
|
9473
9748
|
shortText: "+" + moreCnt,
|
|
9474
|
-
text:
|
|
9475
|
-
? moreLinkText.call(calendarApi, moreCnt)
|
|
9476
|
-
: "+" + moreCnt + " " + moreLinkText,
|
|
9749
|
+
text: text,
|
|
9477
9750
|
view: viewApi,
|
|
9478
9751
|
};
|
|
9479
9752
|
return (createElement(Fragment, null,
|
|
9480
|
-
Boolean(props.moreCnt) && (createElement(RenderHook, { elRef: _this.linkElRef, hookProps: hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: props.defaultContent || renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, ['fc-more-link'].concat(customClassNames), innerElRef, innerContent, _this.handleClick); })),
|
|
9481
|
-
|
|
9753
|
+
Boolean(props.moreCnt) && (createElement(RenderHook, { elRef: _this.linkElRef, hookProps: hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: props.defaultContent || renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, ['fc-more-link'].concat(customClassNames), innerElRef, innerContent, _this.handleClick, title, state.isPopoverOpen, state.isPopoverOpen ? state.popoverId : ''); })),
|
|
9754
|
+
state.isPopoverOpen && (createElement(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.current, alignGridTop: props.alignGridTop, onClose: _this.handlePopoverClose }, props.popoverContent()))));
|
|
9482
9755
|
}));
|
|
9483
9756
|
};
|
|
9484
9757
|
MoreLinkRoot.prototype.componentDidMount = function () {
|
|
@@ -9525,7 +9798,7 @@ var FullCalendar = (function (exports) {
|
|
|
9525
9798
|
|
|
9526
9799
|
// exports
|
|
9527
9800
|
// --------------------------------------------------------------------------------------------------
|
|
9528
|
-
var version = '5.
|
|
9801
|
+
var version = '5.10.1'; // important to type it, so .d.ts has generic string
|
|
9529
9802
|
|
|
9530
9803
|
var Calendar = /** @class */ (function (_super) {
|
|
9531
9804
|
__extends(Calendar, _super);
|
|
@@ -9714,7 +9987,7 @@ var FullCalendar = (function (exports) {
|
|
|
9714
9987
|
exports.buildEventRangeKey = buildEventRangeKey;
|
|
9715
9988
|
exports.buildHashFromArray = buildHashFromArray;
|
|
9716
9989
|
exports.buildIsoString = buildIsoString;
|
|
9717
|
-
exports.
|
|
9990
|
+
exports.buildNavLinkAttrs = buildNavLinkAttrs;
|
|
9718
9991
|
exports.buildSegCompareObj = buildSegCompareObj;
|
|
9719
9992
|
exports.buildSegTimeText = buildSegTimeText;
|
|
9720
9993
|
exports.collectFromHash = collectFromHash;
|
|
@@ -9737,6 +10010,7 @@ var FullCalendar = (function (exports) {
|
|
|
9737
10010
|
exports.computeVisibleDayRange = computeVisibleDayRange;
|
|
9738
10011
|
exports.config = config;
|
|
9739
10012
|
exports.constrainPoint = constrainPoint;
|
|
10013
|
+
exports.createAriaClickAttrs = createAriaClickAttrs;
|
|
9740
10014
|
exports.createContext = createContext;
|
|
9741
10015
|
exports.createDuration = createDuration;
|
|
9742
10016
|
exports.createElement = createElement;
|
|
@@ -9775,9 +10049,11 @@ var FullCalendar = (function (exports) {
|
|
|
9775
10049
|
exports.getDateMeta = getDateMeta;
|
|
9776
10050
|
exports.getDayClassNames = getDayClassNames;
|
|
9777
10051
|
exports.getDefaultEventEnd = getDefaultEventEnd;
|
|
10052
|
+
exports.getElRoot = getElRoot;
|
|
9778
10053
|
exports.getElSeg = getElSeg;
|
|
9779
10054
|
exports.getEntrySpanEnd = getEntrySpanEnd;
|
|
9780
10055
|
exports.getEventClassNames = getEventClassNames;
|
|
10056
|
+
exports.getEventTargetViaRoot = getEventTargetViaRoot;
|
|
9781
10057
|
exports.getIsRtlScrollbarOnLeft = getIsRtlScrollbarOnLeft;
|
|
9782
10058
|
exports.getRectCenter = getRectCenter;
|
|
9783
10059
|
exports.getRelevantEvents = getRelevantEvents;
|
|
@@ -9785,11 +10061,13 @@ var FullCalendar = (function (exports) {
|
|
|
9785
10061
|
exports.getScrollbarWidths = getScrollbarWidths;
|
|
9786
10062
|
exports.getSectionClassNames = getSectionClassNames;
|
|
9787
10063
|
exports.getSectionHasLiquidHeight = getSectionHasLiquidHeight;
|
|
10064
|
+
exports.getSegAnchorAttrs = getSegAnchorAttrs;
|
|
9788
10065
|
exports.getSegMeta = getSegMeta;
|
|
9789
10066
|
exports.getSlotClassNames = getSlotClassNames;
|
|
9790
10067
|
exports.getStickyFooterScrollbar = getStickyFooterScrollbar;
|
|
9791
10068
|
exports.getStickyHeaderDates = getStickyHeaderDates;
|
|
9792
10069
|
exports.getUnequalProps = getUnequalProps;
|
|
10070
|
+
exports.getUniqueDomId = getUniqueDomId;
|
|
9793
10071
|
exports.globalLocales = globalLocales;
|
|
9794
10072
|
exports.globalPlugins = globalPlugins;
|
|
9795
10073
|
exports.greatestDurationDenominator = greatestDurationDenominator;
|
|
@@ -9802,6 +10080,7 @@ var FullCalendar = (function (exports) {
|
|
|
9802
10080
|
exports.interactionSettingsToStore = interactionSettingsToStore;
|
|
9803
10081
|
exports.intersectRanges = intersectRanges;
|
|
9804
10082
|
exports.intersectRects = intersectRects;
|
|
10083
|
+
exports.intersectSpans = intersectSpans;
|
|
9805
10084
|
exports.isArraysEqual = isArraysEqual;
|
|
9806
10085
|
exports.isColPropsEqual = isColPropsEqual;
|
|
9807
10086
|
exports.isDateSelectionValid = isDateSelectionValid;
|
|
@@ -9812,6 +10091,7 @@ var FullCalendar = (function (exports) {
|
|
|
9812
10091
|
exports.isPropsEqual = isPropsEqual;
|
|
9813
10092
|
exports.isPropsValid = isPropsValid;
|
|
9814
10093
|
exports.isValidDate = isValidDate;
|
|
10094
|
+
exports.joinSpans = joinSpans;
|
|
9815
10095
|
exports.listenBySelector = listenBySelector;
|
|
9816
10096
|
exports.mapHash = mapHash;
|
|
9817
10097
|
exports.memoize = memoize;
|