decidim-calendar 0.13.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE-AGPLv3.txt +661 -0
- data/README.md +9 -0
- data/Rakefile +43 -0
- data/app/assets/config/decidim_calendar_manifest.css +2 -0
- data/app/assets/config/decidim_calendar_manifest.js +2 -0
- data/app/assets/images/decidim/calendar/icon.svg +51 -0
- data/app/assets/javascripts/decidim/calendar/calendar.js.es6 +6 -0
- data/app/assets/javascripts/decidim/calendar/gantt.js.es6 +1 -0
- data/app/assets/stylesheets/decidim/calendar/calendar.scss +102 -0
- data/app/assets/stylesheets/decidim/calendar/gantt.scss +1 -0
- data/app/commands/decidim/calendar/admin/create_external_event.rb +38 -0
- data/app/commands/decidim/calendar/admin/destroy_external_event.rb +27 -0
- data/app/commands/decidim/calendar/admin/update_external_event.rb +43 -0
- data/app/controllers/decidim/calendar/admin/application_controller.rb +23 -0
- data/app/controllers/decidim/calendar/admin/external_events_controller.rb +84 -0
- data/app/controllers/decidim/calendar/application_controller.rb +21 -0
- data/app/controllers/decidim/calendar/calendar_controller.rb +33 -0
- data/app/forms/decidim/calendar/admin/external_event_form.rb +21 -0
- data/app/helpers/decidim/calendar/calendar_helper.rb +57 -0
- data/app/models/decidim/calendar/application_record.rb +9 -0
- data/app/models/decidim/calendar/event.rb +25 -0
- data/app/models/decidim/calendar/external_event.rb +18 -0
- data/app/permissions/decidim/calendar/admin/permissions.rb +22 -0
- data/app/presenters/decidim/calendar/event_presenter.rb +104 -0
- data/app/queries/decidim/calendar/organization_calendar.rb +15 -0
- data/app/services/decidim/calendar/event_to_ical.rb +27 -0
- data/app/services/decidim/calendar/general_calendar.rb +13 -0
- data/app/services/decidim/calendar/meeting_to_event.rb +8 -0
- data/app/services/decidim/meetings/calendar/base_calendar.rb +61 -0
- data/app/views/decidim/calendar/admin/external_events/_form.html.erb +22 -0
- data/app/views/decidim/calendar/admin/external_events/edit.html.erb +6 -0
- data/app/views/decidim/calendar/admin/external_events/index.html.erb +66 -0
- data/app/views/decidim/calendar/admin/external_events/new.html.erb +6 -0
- data/app/views/decidim/calendar/calendar/gantt.html.erb +22 -0
- data/app/views/decidim/calendar/calendar/index.html.erb +63 -0
- data/app/views/decidim/shared/_extended_navigation_bar.html.erb +51 -0
- data/app/views/layouts/_calendar_navigation.html.erb +18 -0
- data/app/views/layouts/calendar.html.erb +4 -0
- data/config/locales/ca.yml +38 -0
- data/config/locales/de.yml +38 -0
- data/config/locales/en.yml +48 -0
- data/config/locales/es.yml +38 -0
- data/config/locales/fi.yml +38 -0
- data/config/locales/fr.yml +38 -0
- data/config/locales/it.yml +38 -0
- data/config/locales/pl.yml +38 -0
- data/config/locales/pt.yml +38 -0
- data/config/locales/ro.yml +38 -0
- data/config/locales/ru.yml +38 -0
- data/config/locales/sv.yml +38 -0
- data/config/locales/tr.yml +38 -0
- data/config/locales/uk.yml +38 -0
- data/db/migrate/20190312132654_create_decidim_calendar_external_events.rb +18 -0
- data/lib/decidim/calendar.rb +11 -0
- data/lib/decidim/calendar/admin.rb +9 -0
- data/lib/decidim/calendar/admin_engine.rb +30 -0
- data/lib/decidim/calendar/engine.rb +34 -0
- data/lib/decidim/calendar/participatory_space.rb +20 -0
- data/lib/decidim/calendar/test/factories.rb +12 -0
- data/lib/decidim/calendar/version.rb +10 -0
- data/vendor/assets/javascripts/frappe-gantt/frappe-gantt.css +119 -0
- data/vendor/assets/javascripts/frappe-gantt/frappe-gantt.js +1883 -0
- data/vendor/assets/javascripts/fullcalendar/bootstrap/main.css +33 -0
- data/vendor/assets/javascripts/fullcalendar/bootstrap/main.js +90 -0
- data/vendor/assets/javascripts/fullcalendar/bootstrap/main.min.css +5 -0
- data/vendor/assets/javascripts/fullcalendar/bootstrap/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales-all.js +1353 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales-all.min.js +6 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/af.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar-dz.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar-kw.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar-ly.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar-ma.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar-sa.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar-tn.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ar.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/bg.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/bs.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ca.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/cs.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/da.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/de.js +33 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/el.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/en-au.js +17 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/en-gb.js +17 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/en-nz.js +17 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/es-us.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/es.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/et.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/eu.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/fa.js +33 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/fi.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/fr-ca.js +27 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/fr-ch.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/fr.js +31 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/gl.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/he.js +27 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/hi.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/hr.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/hu.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/id.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/is.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/it.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ja.js +28 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ka.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/kk.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ko.js +26 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/lb.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/lt.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/lv.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/mk.js +28 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ms.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/nb.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/nl.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/nn.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/pl.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/pt-br.js +28 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/pt.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ro.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/ru.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/sk.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/sl.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/sq.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/sr-cyrl.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/sr.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/sv.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/th.js +25 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/tr.js +30 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/uk.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/vi.js +32 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/zh-cn.js +33 -0
- data/vendor/assets/javascripts/fullcalendar/core/locales/zh-tw.js +26 -0
- data/vendor/assets/javascripts/fullcalendar/core/main.css +900 -0
- data/vendor/assets/javascripts/fullcalendar/core/main.js +8791 -0
- data/vendor/assets/javascripts/fullcalendar/core/main.min.css +5 -0
- data/vendor/assets/javascripts/fullcalendar/core/main.min.js +9 -0
- data/vendor/assets/javascripts/fullcalendar/daygrid/main.css +69 -0
- data/vendor/assets/javascripts/fullcalendar/daygrid/main.js +1630 -0
- data/vendor/assets/javascripts/fullcalendar/daygrid/main.min.css +5 -0
- data/vendor/assets/javascripts/fullcalendar/daygrid/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/google-calendar/main.js +169 -0
- data/vendor/assets/javascripts/fullcalendar/google-calendar/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/interaction/main.js +2155 -0
- data/vendor/assets/javascripts/fullcalendar/interaction/main.min.js +21 -0
- data/vendor/assets/javascripts/fullcalendar/list/main.css +101 -0
- data/vendor/assets/javascripts/fullcalendar/list/main.js +341 -0
- data/vendor/assets/javascripts/fullcalendar/list/main.min.css +5 -0
- data/vendor/assets/javascripts/fullcalendar/list/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/luxon/main.js +162 -0
- data/vendor/assets/javascripts/fullcalendar/luxon/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/moment-timezone/main.js +64 -0
- data/vendor/assets/javascripts/fullcalendar/moment-timezone/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/moment/main.js +103 -0
- data/vendor/assets/javascripts/fullcalendar/moment/main.min.js +6 -0
- data/vendor/assets/javascripts/fullcalendar/rrule/main.js +127 -0
- data/vendor/assets/javascripts/fullcalendar/rrule/main.min.js +20 -0
- data/vendor/assets/javascripts/fullcalendar/timegrid/main.css +266 -0
- data/vendor/assets/javascripts/fullcalendar/timegrid/main.js +1339 -0
- data/vendor/assets/javascripts/fullcalendar/timegrid/main.min.css +5 -0
- data/vendor/assets/javascripts/fullcalendar/timegrid/main.min.js +20 -0
- metadata +247 -0
@@ -0,0 +1,5 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar List View Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar List View Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],t):(e=e||self,t(e.FullCalendarList={},e.FullCalendar))}(this,function(e,t){"use strict";function n(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function r(e){for(var n=t.startOfDay(e.renderRange.start),r=e.renderRange.end,s=[],a=[];n<r;)s.push(n),a.push({start:n,end:t.addDays(n,1)}),n=t.addDays(n,1);return{dayDates:s,dayRanges:a}}/*! *****************************************************************************
|
7
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
9
|
+
this file except in compliance with the License. You may obtain a copy of the
|
10
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
13
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
14
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
15
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
16
|
+
|
17
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
18
|
+
and limitations under the License.
|
19
|
+
***************************************************************************** */
|
20
|
+
var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},a=function(e){function r(t){var n=e.call(this,t.context)||this;return n.listView=t,n}return n(r,e),r.prototype.attachSegs=function(e){e.length?this.listView.renderSegList(e):this.listView.renderEmptyMessage()},r.prototype.detachSegs=function(){},r.prototype.renderSegHtml=function(e){var n,r=this.context,s=r.view,a=r.theme,i=e.eventRange,o=i.def,l=i.instance,d=i.ui,c=o.url,p=["fc-list-item"].concat(d.classNames),h=d.backgroundColor;return n=o.allDay?t.getAllDayHtml(s):t.isMultiDayRange(i.range)?e.isStart?t.htmlEscape(this._getTimeText(l.range.start,e.end,!1)):e.isEnd?t.htmlEscape(this._getTimeText(e.start,l.range.end,!1)):t.getAllDayHtml(s):t.htmlEscape(this.getTimeText(i)),c&&p.push("fc-has-url"),'<tr class="'+p.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+a.getClass("widgetContent")+'">'+(n||"")+"</td>":"")+'<td class="fc-list-item-marker '+a.getClass("widgetContent")+'"><span class="fc-event-dot"'+(h?' style="background-color:'+h+'"':"")+'></span></td><td class="fc-list-item-title '+a.getClass("widgetContent")+'"><a'+(c?' href="'+t.htmlEscape(c)+'"':"")+">"+t.htmlEscape(o.title||"")+"</a></td></tr>"},r.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},r}(t.FgEventRenderer),i=function(e){function s(n,s,i,o){var l=e.call(this,n,s,i,o)||this;l.computeDateVars=t.memoize(r),l.eventStoreToSegs=t.memoize(l._eventStoreToSegs);var d=l.eventRenderer=new a(l);l.renderContent=t.memoizeRendering(d.renderSegs.bind(d),d.unrender.bind(d)),l.el.classList.add("fc-list-view");for(var c=(l.theme.getClass("listView")||"").split(" "),p=0,h=c;p<h.length;p++){var u=h[p];u&&l.el.classList.add(u)}return l.scroller=new t.ScrollComponent("hidden","auto"),l.el.appendChild(l.scroller.el),l.contentEl=l.scroller.el,n.calendar.registerInteractiveComponent(l,{el:l.el}),l}return n(s,e),s.prototype.render=function(e){var t=this.computeDateVars(e.dateProfile),n=t.dayDates,r=t.dayRanges;this.dayDates=n,this.renderContent(this.eventStoreToSegs(e.eventStore,e.eventUiBases,r))},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.scroller.destroy(),this.calendar.unregisterInteractiveComponent(this)},s.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.eventRenderer.computeSizes(t),this.eventRenderer.assignSizes(t),this.scroller.clear(),r||this.scroller.setHeight(this.computeScrollerHeight(n))},s.prototype.computeScrollerHeight=function(e){return e-t.subtractInnerElHeight(this.el,this.scroller.el)},s.prototype._eventStoreToSegs=function(e,n,r){return this.eventRangesToSegs(t.sliceEventStore(e,n,this.props.dateProfile.activeRange,this.nextDayThreshold).fg,r)},s.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,s=e;r<s.length;r++){var a=s[r];n.push.apply(n,this.eventRangeToSegs(a,t))}return n},s.prototype.eventRangeToSegs=function(e,n){var r,s,a,i=this,o=i.dateEnv,l=i.nextDayThreshold,d=e.range,c=e.def.allDay,p=[];for(r=0;r<n.length;r++)if((s=t.intersectRanges(d,n[r]))&&(a={component:this,eventRange:e,start:s.start,end:s.end,isStart:e.isStart&&s.start.valueOf()===d.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===d.end.valueOf(),dayIndex:r},p.push(a),!a.isEnd&&!c&&r+1<n.length&&d.end<o.add(n[r+1].start,l))){a.end=d.end,a.isEnd=!0;break}return p},s.prototype.renderEmptyMessage=function(){this.contentEl.innerHTML='<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+t.htmlEscape(this.opt("noEventsMessage"))+"</div></div></div>"},s.prototype.renderSegList=function(e){var n,r,s,a=this.groupSegsByDay(e),i=t.htmlToElement('<table class="fc-list-table '+this.calendar.theme.getClass("tableList")+'"><tbody></tbody></table>'),o=i.querySelector("tbody");for(n=0;n<a.length;n++)if(r=a[n])for(o.appendChild(this.buildDayHeaderRow(this.dayDates[n])),r=this.eventRenderer.sortEventSegs(r),s=0;s<r.length;s++)o.appendChild(r[s].el);this.contentEl.innerHTML="",this.contentEl.appendChild(i)},s.prototype.groupSegsByDay=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r},s.prototype.buildDayHeaderRow=function(e){var n=this.dateEnv,r=t.createFormatter(this.opt("listDayFormat")),s=t.createFormatter(this.opt("listDayAltFormat"));return t.createElement("tr",{className:"fc-list-heading","data-date":n.formatIso(e,{omitTime:!0})},'<td class="'+(this.calendar.theme.getClass("tableListHeading")||this.calendar.theme.getClass("widgetHeader"))+'" colspan="3">'+(r?t.buildGotoAnchorHtml(this,e,{class:"fc-list-heading-main"},t.htmlEscape(n.format(e,r))):"")+(s?t.buildGotoAnchorHtml(this,e,{class:"fc-list-heading-alt"},t.htmlEscape(n.format(e,s))):"")+"</td>")},s}(t.View);i.prototype.fgSegSelector=".fc-list-item";var o=t.createPlugin({views:{list:{class:i,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDayAltFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDayAltFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDayAltFormat:{weekday:"long"}}}});e.ListView=i,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})});
|
@@ -0,0 +1,162 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar Luxon Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
(function (global, factory) {
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('luxon'), require('@fullcalendar/core')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['exports', 'luxon', '@fullcalendar/core'], factory) :
|
9
|
+
(global = global || self, factory(global.FullCalendarLuxon = {}, global.luxon, global.FullCalendar));
|
10
|
+
}(this, function (exports, luxon, core) { 'use strict';
|
11
|
+
|
12
|
+
/*! *****************************************************************************
|
13
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
14
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
15
|
+
this file except in compliance with the License. You may obtain a copy of the
|
16
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
|
18
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
19
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
20
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
21
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
22
|
+
|
23
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
24
|
+
and limitations under the License.
|
25
|
+
***************************************************************************** */
|
26
|
+
/* global Reflect, Promise */
|
27
|
+
|
28
|
+
var extendStatics = function(d, b) {
|
29
|
+
extendStatics = Object.setPrototypeOf ||
|
30
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
31
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
32
|
+
return extendStatics(d, b);
|
33
|
+
};
|
34
|
+
|
35
|
+
function __extends(d, b) {
|
36
|
+
extendStatics(d, b);
|
37
|
+
function __() { this.constructor = d; }
|
38
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
39
|
+
}
|
40
|
+
|
41
|
+
var __assign = function() {
|
42
|
+
__assign = Object.assign || function __assign(t) {
|
43
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
44
|
+
s = arguments[i];
|
45
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
46
|
+
}
|
47
|
+
return t;
|
48
|
+
};
|
49
|
+
return __assign.apply(this, arguments);
|
50
|
+
};
|
51
|
+
|
52
|
+
function toDateTime(date, calendar) {
|
53
|
+
if (!(calendar instanceof core.Calendar)) {
|
54
|
+
throw new Error('must supply a Calendar instance');
|
55
|
+
}
|
56
|
+
return luxon.DateTime.fromJSDate(date, {
|
57
|
+
zone: calendar.dateEnv.timeZone,
|
58
|
+
locale: calendar.dateEnv.locale.codes[0]
|
59
|
+
});
|
60
|
+
}
|
61
|
+
function toDuration(duration, calendar) {
|
62
|
+
if (!(calendar instanceof core.Calendar)) {
|
63
|
+
throw new Error('must supply a Calendar instance');
|
64
|
+
}
|
65
|
+
return luxon.Duration.fromObject(__assign({}, duration, { locale: calendar.dateEnv.locale.codes[0] }));
|
66
|
+
}
|
67
|
+
var LuxonNamedTimeZone = /** @class */ (function (_super) {
|
68
|
+
__extends(LuxonNamedTimeZone, _super);
|
69
|
+
function LuxonNamedTimeZone() {
|
70
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
71
|
+
}
|
72
|
+
LuxonNamedTimeZone.prototype.offsetForArray = function (a) {
|
73
|
+
return arrayToLuxon(a, this.timeZoneName).offset;
|
74
|
+
};
|
75
|
+
LuxonNamedTimeZone.prototype.timestampToArray = function (ms) {
|
76
|
+
return luxonToArray(luxon.DateTime.fromMillis(ms, {
|
77
|
+
zone: this.timeZoneName
|
78
|
+
}));
|
79
|
+
};
|
80
|
+
return LuxonNamedTimeZone;
|
81
|
+
}(core.NamedTimeZoneImpl));
|
82
|
+
function formatWithCmdStr(cmdStr, arg) {
|
83
|
+
var cmd = parseCmdStr(cmdStr);
|
84
|
+
if (arg.end) {
|
85
|
+
var start = arrayToLuxon(arg.start.array, arg.timeZone, arg.localeCodes[0]);
|
86
|
+
var end = arrayToLuxon(arg.end.array, arg.timeZone, arg.localeCodes[0]);
|
87
|
+
return formatRange(cmd, start.toFormat.bind(start), end.toFormat.bind(end), arg.separator);
|
88
|
+
}
|
89
|
+
return arrayToLuxon(arg.date.array, arg.timeZone, arg.localeCodes[0]).toFormat(cmd.whole);
|
90
|
+
}
|
91
|
+
var main = core.createPlugin({
|
92
|
+
cmdFormatter: formatWithCmdStr,
|
93
|
+
namedTimeZonedImpl: LuxonNamedTimeZone
|
94
|
+
});
|
95
|
+
function luxonToArray(datetime) {
|
96
|
+
return [
|
97
|
+
datetime.year,
|
98
|
+
datetime.month - 1,
|
99
|
+
datetime.day,
|
100
|
+
datetime.hour,
|
101
|
+
datetime.minute,
|
102
|
+
datetime.second,
|
103
|
+
datetime.millisecond
|
104
|
+
];
|
105
|
+
}
|
106
|
+
function arrayToLuxon(arr, timeZone, locale) {
|
107
|
+
return luxon.DateTime.fromObject({
|
108
|
+
zone: timeZone,
|
109
|
+
locale: locale,
|
110
|
+
year: arr[0],
|
111
|
+
month: arr[1] + 1,
|
112
|
+
day: arr[2],
|
113
|
+
hour: arr[3],
|
114
|
+
minute: arr[4],
|
115
|
+
second: arr[5],
|
116
|
+
millisecond: arr[6]
|
117
|
+
});
|
118
|
+
}
|
119
|
+
function parseCmdStr(cmdStr) {
|
120
|
+
var parts = cmdStr.match(/^(.*?)\{(.*)\}(.*)$/); // TODO: lookbehinds for escape characters
|
121
|
+
if (parts) {
|
122
|
+
var middle = parseCmdStr(parts[2]);
|
123
|
+
return {
|
124
|
+
head: parts[1],
|
125
|
+
middle: middle,
|
126
|
+
tail: parts[3],
|
127
|
+
whole: parts[1] + middle.whole + parts[3]
|
128
|
+
};
|
129
|
+
}
|
130
|
+
else {
|
131
|
+
return {
|
132
|
+
head: null,
|
133
|
+
middle: null,
|
134
|
+
tail: null,
|
135
|
+
whole: cmdStr
|
136
|
+
};
|
137
|
+
}
|
138
|
+
}
|
139
|
+
function formatRange(cmd, formatStart, formatEnd, separator) {
|
140
|
+
if (cmd.middle) {
|
141
|
+
var startHead = formatStart(cmd.head);
|
142
|
+
var startMiddle = formatRange(cmd.middle, formatStart, formatEnd, separator);
|
143
|
+
var startTail = formatStart(cmd.tail);
|
144
|
+
var endHead = formatEnd(cmd.head);
|
145
|
+
var endMiddle = formatRange(cmd.middle, formatStart, formatEnd, separator);
|
146
|
+
var endTail = formatEnd(cmd.tail);
|
147
|
+
if (startHead === endHead && startTail === endTail) {
|
148
|
+
return startHead +
|
149
|
+
(startMiddle === endMiddle ? startMiddle : startMiddle + separator + endMiddle) +
|
150
|
+
startTail;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
return formatStart(cmd.whole) + separator + formatEnd(cmd.whole);
|
154
|
+
}
|
155
|
+
|
156
|
+
exports.default = main;
|
157
|
+
exports.toDateTime = toDateTime;
|
158
|
+
exports.toDuration = toDuration;
|
159
|
+
|
160
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
161
|
+
|
162
|
+
}));
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar Luxon Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("luxon"),require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","luxon","@fullcalendar/core"],t):(e=e||self,t(e.FullCalendarLuxon={},e.luxon,e.FullCalendar))}(this,function(e,t,n){"use strict";function o(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function r(e,o){if(!(o instanceof n.Calendar))throw new Error("must supply a Calendar instance");return t.DateTime.fromJSDate(e,{zone:o.dateEnv.timeZone,locale:o.dateEnv.locale.codes[0]})}function a(e,o){if(!(o instanceof n.Calendar))throw new Error("must supply a Calendar instance");return t.Duration.fromObject(m({},e,{locale:o.dateEnv.locale.codes[0]}))}function i(e,t){var n=c(e);if(t.end){var o=u(t.start.array,t.timeZone,t.localeCodes[0]),r=u(t.end.array,t.timeZone,t.localeCodes[0]);return d(n,o.toFormat.bind(o),r.toFormat.bind(r),t.separator)}return u(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(n.whole)}function l(e){return[e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond]}function u(e,n,o){return t.DateTime.fromObject({zone:n,locale:o,year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]})}function c(e){var t=e.match(/^(.*?)\{(.*)\}(.*)$/);if(t){var n=c(t[2]);return{head:t[1],middle:n,tail:t[3],whole:t[1]+n.whole+t[3]}}return{head:null,middle:null,tail:null,whole:e}}function d(e,t,n,o){if(e.middle){var r=t(e.head),a=d(e.middle,t,n,o),i=t(e.tail),l=n(e.head),u=d(e.middle,t,n,o),c=n(e.tail);if(r===l&&i===c)return r+(a===u?a:a+o+u)+i}return t(e.whole)+o+n(e.whole)}/*! *****************************************************************************
|
7
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
9
|
+
this file except in compliance with the License. You may obtain a copy of the
|
10
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
13
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
14
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
15
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
16
|
+
|
17
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
18
|
+
and limitations under the License.
|
19
|
+
***************************************************************************** */
|
20
|
+
var f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},m=function(){return m=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)},s=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),n.prototype.offsetForArray=function(e){return u(e,this.timeZoneName).offset},n.prototype.timestampToArray=function(e){return l(t.DateTime.fromMillis(e,{zone:this.timeZoneName}))},n}(n.NamedTimeZoneImpl),p=n.createPlugin({cmdFormatter:i,namedTimeZonedImpl:s});e.default=p,e.toDateTime=r,e.toDuration=a,Object.defineProperty(e,"__esModule",{value:!0})});
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar Moment Timezone Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
(function (global, factory) {
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('moment-timezone/builds/moment-timezone-with-data'), require('@fullcalendar/core')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['exports', 'moment', 'moment-timezone/builds/moment-timezone-with-data', '@fullcalendar/core'], factory) :
|
9
|
+
(global = global || self, factory(global.FullCalendarMomentTimezone = {}, global.moment, global.moment, global.FullCalendar));
|
10
|
+
}(this, function (exports, moment, momentTimezoneWithData, core) { 'use strict';
|
11
|
+
|
12
|
+
moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
|
13
|
+
|
14
|
+
/*! *****************************************************************************
|
15
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
16
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
17
|
+
this file except in compliance with the License. You may obtain a copy of the
|
18
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
19
|
+
|
20
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
21
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
22
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
23
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
24
|
+
|
25
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
26
|
+
and limitations under the License.
|
27
|
+
***************************************************************************** */
|
28
|
+
/* global Reflect, Promise */
|
29
|
+
|
30
|
+
var extendStatics = function(d, b) {
|
31
|
+
extendStatics = Object.setPrototypeOf ||
|
32
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
33
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
34
|
+
return extendStatics(d, b);
|
35
|
+
};
|
36
|
+
|
37
|
+
function __extends(d, b) {
|
38
|
+
extendStatics(d, b);
|
39
|
+
function __() { this.constructor = d; }
|
40
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
41
|
+
}
|
42
|
+
|
43
|
+
var MomentNamedTimeZone = /** @class */ (function (_super) {
|
44
|
+
__extends(MomentNamedTimeZone, _super);
|
45
|
+
function MomentNamedTimeZone() {
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
47
|
+
}
|
48
|
+
MomentNamedTimeZone.prototype.offsetForArray = function (a) {
|
49
|
+
return moment.tz(a, this.timeZoneName).utcOffset();
|
50
|
+
};
|
51
|
+
MomentNamedTimeZone.prototype.timestampToArray = function (ms) {
|
52
|
+
return moment.tz(ms, this.timeZoneName).toArray();
|
53
|
+
};
|
54
|
+
return MomentNamedTimeZone;
|
55
|
+
}(core.NamedTimeZoneImpl));
|
56
|
+
var main = core.createPlugin({
|
57
|
+
namedTimeZonedImpl: MomentNamedTimeZone
|
58
|
+
});
|
59
|
+
|
60
|
+
exports.default = main;
|
61
|
+
|
62
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
63
|
+
|
64
|
+
}));
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar Moment Timezone Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("moment"),require("moment-timezone/builds/moment-timezone-with-data"),require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","moment","moment-timezone/builds/moment-timezone-with-data","@fullcalendar/core"],t):(e=e||self,t(e.FullCalendarMomentTimezone={},e.moment,e.moment,e.FullCalendar))}(this,function(e,t,n,o){"use strict";function r(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}t=t&&t.hasOwnProperty("default")?t.default:t;/*! *****************************************************************************
|
7
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
9
|
+
this file except in compliance with the License. You may obtain a copy of the
|
10
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
13
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
14
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
15
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
16
|
+
|
17
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
18
|
+
and limitations under the License.
|
19
|
+
***************************************************************************** */
|
20
|
+
var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},u=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.offsetForArray=function(e){return t.tz(e,this.timeZoneName).utcOffset()},n.prototype.timestampToArray=function(e){return t.tz(e,this.timeZoneName).toArray()},n}(o.NamedTimeZoneImpl),m=o.createPlugin({namedTimeZonedImpl:u});e.default=m,Object.defineProperty(e,"__esModule",{value:!0})});
|
@@ -0,0 +1,103 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar Moment Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
(function (global, factory) {
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('@fullcalendar/core')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['exports', 'moment', '@fullcalendar/core'], factory) :
|
9
|
+
(global = global || self, factory(global.FullCalendarMoment = {}, global.moment, global.FullCalendar));
|
10
|
+
}(this, function (exports, moment, core) { 'use strict';
|
11
|
+
|
12
|
+
moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
|
13
|
+
|
14
|
+
function toMoment(date, calendar) {
|
15
|
+
if (!(calendar instanceof core.Calendar)) {
|
16
|
+
throw new Error('must supply a Calendar instance');
|
17
|
+
}
|
18
|
+
return convertToMoment(date, calendar.dateEnv.timeZone, null, calendar.dateEnv.locale.codes[0]);
|
19
|
+
}
|
20
|
+
function toDuration(fcDuration) {
|
21
|
+
return moment.duration(fcDuration); // momment accepts all the props that fc.Duration already has!
|
22
|
+
}
|
23
|
+
function formatWithCmdStr(cmdStr, arg) {
|
24
|
+
var cmd = parseCmdStr(cmdStr);
|
25
|
+
if (arg.end) {
|
26
|
+
var startMom = convertToMoment(arg.start.array, arg.timeZone, arg.start.timeZoneOffset, arg.localeCodes[0]);
|
27
|
+
var endMom = convertToMoment(arg.end.array, arg.timeZone, arg.end.timeZoneOffset, arg.localeCodes[0]);
|
28
|
+
return formatRange(cmd, createMomentFormatFunc(startMom), createMomentFormatFunc(endMom), arg.separator);
|
29
|
+
}
|
30
|
+
return convertToMoment(arg.date.array, arg.timeZone, arg.date.timeZoneOffset, arg.localeCodes[0]).format(cmd.whole); // TODO: test for this
|
31
|
+
}
|
32
|
+
var main = core.createPlugin({
|
33
|
+
cmdFormatter: formatWithCmdStr
|
34
|
+
});
|
35
|
+
function createMomentFormatFunc(mom) {
|
36
|
+
return function (cmdStr) {
|
37
|
+
return cmdStr ? mom.format(cmdStr) : ''; // because calling with blank string results in ISO8601 :(
|
38
|
+
};
|
39
|
+
}
|
40
|
+
function convertToMoment(input, timeZone, timeZoneOffset, locale) {
|
41
|
+
var mom;
|
42
|
+
if (timeZone === 'local') {
|
43
|
+
mom = moment(input);
|
44
|
+
}
|
45
|
+
else if (timeZone === 'UTC') {
|
46
|
+
mom = moment.utc(input);
|
47
|
+
}
|
48
|
+
else if (moment.tz) {
|
49
|
+
mom = moment.tz(input, timeZone);
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
mom = moment.utc(input);
|
53
|
+
if (timeZoneOffset != null) {
|
54
|
+
mom.utcOffset(timeZoneOffset);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
mom.locale(locale);
|
58
|
+
return mom;
|
59
|
+
}
|
60
|
+
function parseCmdStr(cmdStr) {
|
61
|
+
var parts = cmdStr.match(/^(.*?)\{(.*)\}(.*)$/); // TODO: lookbehinds for escape characters
|
62
|
+
if (parts) {
|
63
|
+
var middle = parseCmdStr(parts[2]);
|
64
|
+
return {
|
65
|
+
head: parts[1],
|
66
|
+
middle: middle,
|
67
|
+
tail: parts[3],
|
68
|
+
whole: parts[1] + middle.whole + parts[3]
|
69
|
+
};
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
return {
|
73
|
+
head: null,
|
74
|
+
middle: null,
|
75
|
+
tail: null,
|
76
|
+
whole: cmdStr
|
77
|
+
};
|
78
|
+
}
|
79
|
+
}
|
80
|
+
function formatRange(cmd, formatStart, formatEnd, separator) {
|
81
|
+
if (cmd.middle) {
|
82
|
+
var startHead = formatStart(cmd.head);
|
83
|
+
var startMiddle = formatRange(cmd.middle, formatStart, formatEnd, separator);
|
84
|
+
var startTail = formatStart(cmd.tail);
|
85
|
+
var endHead = formatEnd(cmd.head);
|
86
|
+
var endMiddle = formatRange(cmd.middle, formatStart, formatEnd, separator);
|
87
|
+
var endTail = formatEnd(cmd.tail);
|
88
|
+
if (startHead === endHead && startTail === endTail) {
|
89
|
+
return startHead +
|
90
|
+
(startMiddle === endMiddle ? startMiddle : startMiddle + separator + endMiddle) +
|
91
|
+
startTail;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
return formatStart(cmd.whole) + separator + formatEnd(cmd.whole);
|
95
|
+
}
|
96
|
+
|
97
|
+
exports.default = main;
|
98
|
+
exports.toDuration = toDuration;
|
99
|
+
exports.toMoment = toMoment;
|
100
|
+
|
101
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
102
|
+
|
103
|
+
}));
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar Moment Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("moment"),require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","moment","@fullcalendar/core"],t):(e=e||self,t(e.FullCalendarMoment={},e.moment,e.FullCalendar))}(this,function(e,t,n){"use strict";function r(e,t){if(!(t instanceof n.Calendar))throw new Error("must supply a Calendar instance");return u(e,t.dateEnv.timeZone,null,t.dateEnv.locale.codes[0])}function a(e){return t.duration(e)}function o(e,t){var n=i(e);if(t.end){var r=u(t.start.array,t.timeZone,t.start.timeZoneOffset,t.localeCodes[0]),a=u(t.end.array,t.timeZone,t.end.timeZoneOffset,t.localeCodes[0]);return d(n,l(r),l(a),t.separator)}return u(t.date.array,t.timeZone,t.date.timeZoneOffset,t.localeCodes[0]).format(n.whole)}function l(e){return function(t){return t?e.format(t):""}}function u(e,n,r,a){var o;return"local"===n?o=t(e):"UTC"===n?o=t.utc(e):t.tz?o=t.tz(e,n):(o=t.utc(e),null!=r&&o.utcOffset(r)),o.locale(a),o}function i(e){var t=e.match(/^(.*?)\{(.*)\}(.*)$/);if(t){var n=i(t[2]);return{head:t[1],middle:n,tail:t[3],whole:t[1]+n.whole+t[3]}}return{head:null,middle:null,tail:null,whole:e}}function d(e,t,n,r){if(e.middle){var a=t(e.head),o=d(e.middle,t,n,r),l=t(e.tail),u=n(e.head),i=d(e.middle,t,n,r),f=n(e.tail);if(a===u&&l===f)return a+(o===i?o:o+r+i)+l}return t(e.whole)+r+n(e.whole)}t=t&&t.hasOwnProperty("default")?t.default:t;var f=n.createPlugin({cmdFormatter:o});e.default=f,e.toDuration=a,e.toMoment=r,Object.defineProperty(e,"__esModule",{value:!0})});
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/*!
|
2
|
+
FullCalendar RRule Plugin v4.0.2
|
3
|
+
Docs & License: https://fullcalendar.io/
|
4
|
+
(c) 2019 Adam Shaw
|
5
|
+
*/
|
6
|
+
(function (global, factory) {
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rrule'), require('@fullcalendar/core')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['exports', 'rrule', '@fullcalendar/core'], factory) :
|
9
|
+
(global = global || self, factory(global.FullCalendarRrule = {}, global.rrule, global.FullCalendar));
|
10
|
+
}(this, function (exports, rrule, core) { 'use strict';
|
11
|
+
|
12
|
+
/*! *****************************************************************************
|
13
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
14
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
15
|
+
this file except in compliance with the License. You may obtain a copy of the
|
16
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
|
18
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
19
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
20
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
21
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
22
|
+
|
23
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
24
|
+
and limitations under the License.
|
25
|
+
***************************************************************************** */
|
26
|
+
|
27
|
+
var __assign = function() {
|
28
|
+
__assign = Object.assign || function __assign(t) {
|
29
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
30
|
+
s = arguments[i];
|
31
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
32
|
+
}
|
33
|
+
return t;
|
34
|
+
};
|
35
|
+
return __assign.apply(this, arguments);
|
36
|
+
};
|
37
|
+
|
38
|
+
var EVENT_DEF_PROPS = {
|
39
|
+
rrule: null,
|
40
|
+
duration: core.createDuration
|
41
|
+
};
|
42
|
+
var recurring = {
|
43
|
+
parse: function (rawEvent, leftoverProps, dateEnv) {
|
44
|
+
if (rawEvent.rrule != null) {
|
45
|
+
var props = core.refineProps(rawEvent, EVENT_DEF_PROPS, {}, leftoverProps);
|
46
|
+
var parsed = parseRRule(props.rrule, dateEnv);
|
47
|
+
if (parsed) {
|
48
|
+
return {
|
49
|
+
typeData: parsed.rrule,
|
50
|
+
allDayGuess: parsed.allDayGuess,
|
51
|
+
duration: props.duration
|
52
|
+
};
|
53
|
+
}
|
54
|
+
}
|
55
|
+
return null;
|
56
|
+
},
|
57
|
+
expand: function (rrule, framingRange) {
|
58
|
+
// we WANT an inclusive start and in exclusive end, but the js rrule lib will only do either BOTH
|
59
|
+
// inclusive or BOTH exclusive, which is stupid: https://github.com/jakubroztocil/rrule/issues/84
|
60
|
+
// Workaround: make inclusive, which will generate extra occurences, and then trim.
|
61
|
+
return rrule.between(framingRange.start, framingRange.end, true)
|
62
|
+
.filter(function (date) {
|
63
|
+
return date.valueOf() < framingRange.end.valueOf();
|
64
|
+
});
|
65
|
+
}
|
66
|
+
};
|
67
|
+
var main = core.createPlugin({
|
68
|
+
recurringTypes: [recurring]
|
69
|
+
});
|
70
|
+
function parseRRule(input, dateEnv) {
|
71
|
+
var allDayGuess = null;
|
72
|
+
var rrule$1;
|
73
|
+
if (typeof input === 'string') {
|
74
|
+
rrule$1 = rrule.rrulestr(input);
|
75
|
+
}
|
76
|
+
else if (typeof input === 'object' && input) { // non-null object
|
77
|
+
var refined = __assign({}, input); // copy
|
78
|
+
if (typeof refined.dtstart === 'string') {
|
79
|
+
var dtstartMeta = dateEnv.createMarkerMeta(refined.dtstart);
|
80
|
+
if (dtstartMeta) {
|
81
|
+
refined.dtstart = dtstartMeta.marker;
|
82
|
+
allDayGuess = dtstartMeta.isTimeUnspecified;
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
delete refined.dtstart;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
if (typeof refined.until === 'string') {
|
89
|
+
refined.until = dateEnv.createMarker(refined.until);
|
90
|
+
}
|
91
|
+
if (refined.freq != null) {
|
92
|
+
refined.freq = convertConstant(refined.freq);
|
93
|
+
}
|
94
|
+
if (refined.wkst != null) {
|
95
|
+
refined.wkst = convertConstant(refined.wkst);
|
96
|
+
}
|
97
|
+
else {
|
98
|
+
refined.wkst = (dateEnv.weekDow - 1 + 7) % 7; // convert Sunday-first to Monday-first
|
99
|
+
}
|
100
|
+
if (refined.byweekday != null) {
|
101
|
+
refined.byweekday = convertConstants(refined.byweekday); // the plural version
|
102
|
+
}
|
103
|
+
rrule$1 = new rrule.RRule(refined);
|
104
|
+
}
|
105
|
+
if (rrule$1) {
|
106
|
+
return { rrule: rrule$1, allDayGuess: allDayGuess };
|
107
|
+
}
|
108
|
+
return null;
|
109
|
+
}
|
110
|
+
function convertConstants(input) {
|
111
|
+
if (Array.isArray(input)) {
|
112
|
+
return input.map(convertConstant);
|
113
|
+
}
|
114
|
+
return convertConstant(input);
|
115
|
+
}
|
116
|
+
function convertConstant(input) {
|
117
|
+
if (typeof input === 'string') {
|
118
|
+
return rrule.RRule[input.toUpperCase()];
|
119
|
+
}
|
120
|
+
return input;
|
121
|
+
}
|
122
|
+
|
123
|
+
exports.default = main;
|
124
|
+
|
125
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
126
|
+
|
127
|
+
}));
|