version 1.2.4 : report de r111041
maj des libs fullcalendar (3.9.0) et moment (2.22.2)svn/root/tags/spip-3.2.3/plugins/organiseur
parent
7678f94db6
commit
77daae37a6
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,9 @@
|
||||
/*!
|
||||
* FullCalendar v3.5.1 Print Stylesheet
|
||||
* FullCalendar v3.9.0
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
* (c) 2018 Adam Shaw
|
||||
*//*!
|
||||
* FullCalendar v3.9.0 Print Stylesheet
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2018 Adam Shaw
|
||||
*/.fc-bg,.fc-bgevent-container,.fc-bgevent-skeleton,.fc-business-container,.fc-event .fc-resizer,.fc-helper-container,.fc-helper-skeleton,.fc-highlight-container,.fc-highlight-skeleton{display:none}.fc tbody .fc-row,.fc-time-grid{min-height:0!important}.fc-time-grid .fc-event.fc-not-end:after,.fc-time-grid .fc-event.fc-not-start:before{content:"..."}.fc{max-width:100%!important}.fc-event{background:#fff!important;color:#000!important;page-break-inside:avoid}.fc hr,.fc tbody,.fc td,.fc th,.fc thead,.fc-row{border-color:#ccc!important;background:#fff!important}.fc tbody .fc-row{height:auto!important}.fc tbody .fc-row .fc-content-skeleton{position:static;padding-bottom:0!important}.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td{padding-bottom:1em}.fc tbody .fc-row .fc-content-skeleton table{height:1em}.fc-more,.fc-more-cell{display:none!important}.fc tr.fc-limited{display:table-row!important}.fc td.fc-limited{display:table-cell!important}.fc-agenda-view .fc-axis,.fc-popover{display:none}.fc-slats,.fc-time-grid hr{display:none!important}.fc button,.fc-button-group,.fc-time-grid .fc-event .fc-time span{display:none}.fc-time-grid .fc-content-skeleton{position:static}.fc-time-grid .fc-content-skeleton table{height:4em}.fc-time-grid .fc-event-container{margin:0!important}.fc-time-grid .fc-event{position:static!important;margin:3px 2px!important}.fc-time-grid .fc-event.fc-not-end{border-bottom-width:1px!important}.fc-time-grid .fc-event.fc-not-start{border-top-width:1px!important}.fc-time-grid .fc-event .fc-time{white-space:normal!important}.fc-time-grid .fc-event .fc-time:after{content:attr(data-full)}.fc-day-grid-container,.fc-scroller,.fc-time-grid-container{overflow:visible!important;height:auto!important}.fc-row{border:0!important;margin:0!important}
|
@ -1,282 +1,324 @@
|
||||
/*!
|
||||
* FullCalendar v3.5.1 Google Calendar Plugin
|
||||
* FullCalendar v3.9.0
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
* (c) 2018 Adam Shaw
|
||||
*/
|
||||
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([ 'jquery' ], factory);
|
||||
}
|
||||
else if (typeof exports === 'object') { // Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
}
|
||||
else {
|
||||
factory(jQuery);
|
||||
}
|
||||
})(function($) {
|
||||
|
||||
|
||||
var FC = $.fullCalendar;
|
||||
var Promise = FC.Promise;
|
||||
var EventSource = FC.EventSource;
|
||||
var JsonFeedEventSource = FC.JsonFeedEventSource;
|
||||
var EventSourceParser = FC.EventSourceParser;
|
||||
var applyAll = FC.applyAll;
|
||||
|
||||
;;
|
||||
|
||||
var GcalEventSource = EventSource.extend({
|
||||
|
||||
// TODO: eventually remove "googleCalendar" prefix (API-breaking)
|
||||
googleCalendarApiKey: null,
|
||||
googleCalendarId: null,
|
||||
googleCalendarError: null, // optional function
|
||||
ajaxSettings: null,
|
||||
|
||||
|
||||
fetch: function(start, end, timezone) {
|
||||
var _this = this;
|
||||
var url = this.buildUrl();
|
||||
var requestParams = this.buildRequestParams(start, end, timezone);
|
||||
var ajaxSettings = this.ajaxSettings;
|
||||
var onSuccess = ajaxSettings.success;
|
||||
|
||||
if (!requestParams) { // could have failed
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
return Promise.construct(function(onResolve, onReject) {
|
||||
$.ajax($.extend(
|
||||
{}, // destination
|
||||
JsonFeedEventSource.AJAX_DEFAULTS,
|
||||
ajaxSettings,
|
||||
{
|
||||
url: url,
|
||||
data: requestParams,
|
||||
success: function(responseData) {
|
||||
var rawEventDefs;
|
||||
var successRes;
|
||||
|
||||
if (responseData.error) {
|
||||
_this.reportError('Google Calendar API: ' + responseData.error.message, responseData.error.errors);
|
||||
onReject();
|
||||
}
|
||||
else if (responseData.items) {
|
||||
rawEventDefs = _this.gcalItemsToRawEventDefs(
|
||||
responseData.items,
|
||||
requestParams.timeZone
|
||||
);
|
||||
|
||||
successRes = applyAll(
|
||||
onSuccess,
|
||||
this, // forward `this`
|
||||
// call the success handler(s) and allow it to return a new events array
|
||||
[ rawEventDefs ].concat(Array.prototype.slice.call(arguments, 1))
|
||||
);
|
||||
|
||||
if ($.isArray(successRes)) {
|
||||
rawEventDefs = successRes;
|
||||
}
|
||||
|
||||
onResolve(_this.parseEventDefs(rawEventDefs));
|
||||
}
|
||||
}
|
||||
}
|
||||
));
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
gcalItemsToRawEventDefs: function(items, gcalTimezone) {
|
||||
var _this = this;
|
||||
|
||||
return items.map(function(item) {
|
||||
return _this.gcalItemToRawEventDef(item, gcalTimezone);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
gcalItemToRawEventDef: function(item, gcalTimezone) {
|
||||
var url = item.htmlLink || null;
|
||||
|
||||
// make the URLs for each event show times in the correct timezone
|
||||
if (url && gcalTimezone) {
|
||||
url = injectQsComponent(url, 'ctz=' + gcalTimezone);
|
||||
}
|
||||
|
||||
return {
|
||||
id: item.id,
|
||||
title: item.summary,
|
||||
start: item.start.dateTime || item.start.date, // try timed. will fall back to all-day
|
||||
end: item.end.dateTime || item.end.date, // same
|
||||
url: url,
|
||||
location: item.location,
|
||||
description: item.description
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
buildUrl: function() {
|
||||
return GcalEventSource.API_BASE + '/' +
|
||||
encodeURIComponent(this.googleCalendarId) +
|
||||
'/events?callback=?'; // jsonp
|
||||
},
|
||||
|
||||
|
||||
buildRequestParams: function(start, end, timezone) {
|
||||
var apiKey = this.googleCalendarApiKey || this.calendar.opt('googleCalendarApiKey');
|
||||
var params;
|
||||
|
||||
if (!apiKey) {
|
||||
this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/");
|
||||
return null;
|
||||
}
|
||||
|
||||
// The API expects an ISO8601 datetime with a time and timezone part.
|
||||
// Since the calendar's timezone offset isn't always known, request the date in UTC and pad it by a day on each
|
||||
// side, guaranteeing we will receive all events in the desired range, albeit a superset.
|
||||
// .utc() will set a zone and give it a 00:00:00 time.
|
||||
if (!start.hasZone()) {
|
||||
start = start.clone().utc().add(-1, 'day');
|
||||
}
|
||||
if (!end.hasZone()) {
|
||||
end = end.clone().utc().add(1, 'day');
|
||||
}
|
||||
|
||||
params = $.extend(
|
||||
this.ajaxSettings.data || {},
|
||||
{
|
||||
key: apiKey,
|
||||
timeMin: start.format(),
|
||||
timeMax: end.format(),
|
||||
singleEvents: true,
|
||||
maxResults: 9999
|
||||
}
|
||||
);
|
||||
|
||||
if (timezone && timezone !== 'local') {
|
||||
// when sending timezone names to Google, only accepts underscores, not spaces
|
||||
params.timeZone = timezone.replace(' ', '_');
|
||||
}
|
||||
|
||||
return params;
|
||||
},
|
||||
|
||||
|
||||
reportError: function(message, apiErrorObjs) {
|
||||
var calendar = this.calendar;
|
||||
var calendarOnError = calendar.opt('googleCalendarError');
|
||||
var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
|
||||
|
||||
if (this.googleCalendarError) {
|
||||
this.googleCalendarError.apply(calendar, errorObjs);
|
||||
}
|
||||
|
||||
if (calendarOnError) {
|
||||
calendarOnError.apply(calendar, errorObjs);
|
||||
}
|
||||
|
||||
// print error to debug console
|
||||
FC.warn.apply(null, [ message ].concat(apiErrorObjs || []));
|
||||
},
|
||||
|
||||
|
||||
getPrimitive: function() {
|
||||
return this.googleCalendarId;
|
||||
},
|
||||
|
||||
|
||||
applyManualRawProps: function(rawProps) {
|
||||
var superSuccess = EventSource.prototype.applyManualRawProps.apply(this, arguments);
|
||||
var googleCalendarId = rawProps.googleCalendarId;
|
||||
|
||||
if (googleCalendarId == null && rawProps.url) {
|
||||
googleCalendarId = parseGoogleCalendarId(rawProps.url);
|
||||
}
|
||||
|
||||
if (googleCalendarId != null) {
|
||||
this.googleCalendarId = googleCalendarId;
|
||||
|
||||
return superSuccess;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
applyOtherRawProps: function(rawProps) {
|
||||
this.ajaxSettings = rawProps;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
GcalEventSource.API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
|
||||
|
||||
|
||||
GcalEventSource.allowRawProps({
|
||||
// manually process...
|
||||
url: false,
|
||||
googleCalendarId: false,
|
||||
|
||||
// automatically transfer...
|
||||
googleCalendarApiKey: true,
|
||||
googleCalendarError: true
|
||||
});
|
||||
|
||||
|
||||
GcalEventSource.parse = function(rawInput, calendar) {
|
||||
var rawProps;
|
||||
|
||||
if (typeof rawInput === 'object') { // long form. might fail in applyManualRawProps
|
||||
rawProps = rawInput;
|
||||
}
|
||||
else if (typeof rawInput === 'string') { // short form
|
||||
rawProps = { url: rawInput }; // url will be parsed with parseGoogleCalendarId
|
||||
}
|
||||
|
||||
if (rawProps) {
|
||||
return EventSource.parse.call(this, rawProps, calendar);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
function parseGoogleCalendarId(url) {
|
||||
var match;
|
||||
|
||||
// detect if the ID was specified as a single string.
|
||||
// will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars.
|
||||
if (/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) {
|
||||
return url;
|
||||
}
|
||||
// try to scrape it out of a V1 or V3 API feed URL
|
||||
else if (
|
||||
(match = /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url)) ||
|
||||
(match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))
|
||||
) {
|
||||
return decodeURIComponent(match[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Injects a string like "arg=value" into the querystring of a URL
|
||||
function injectQsComponent(url, component) {
|
||||
// inject it after the querystring but before the fragment
|
||||
return url.replace(/(\?.*?)?(#|$)/, function(whole, qs, hash) {
|
||||
return (qs ? qs + '&' : '?') + component + hash;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// expose
|
||||
|
||||
EventSourceParser.registerClass(GcalEventSource);
|
||||
|
||||
FC.GcalEventSource = GcalEventSource;
|
||||
|
||||
;;
|
||||
|
||||
});
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("fullcalendar"), require("jquery"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["fullcalendar", "jquery"], factory);
|
||||
else if(typeof exports === 'object')
|
||||
factory(require("fullcalendar"), require("jquery"));
|
||||
else
|
||||
factory(root["FullCalendar"], root["jQuery"]);
|
||||
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_3__) {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 266);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 1:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*
|
||||
derived from:
|
||||
https://github.com/Microsoft/tslib/blob/v1.6.0/tslib.js
|
||||
|
||||
only include the helpers we need, to keep down filesize
|
||||
*/
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p]; };
|
||||
exports.__extends = function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 266:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var exportHooks = __webpack_require__(1);
|
||||
var GcalEventSource_1 = __webpack_require__(267);
|
||||
exportHooks.EventSourceParser.registerClass(GcalEventSource_1.default);
|
||||
exportHooks.GcalEventSource = GcalEventSource_1.default;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 267:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = __webpack_require__(2);
|
||||
var $ = __webpack_require__(3);
|
||||
var fullcalendar_1 = __webpack_require__(1);
|
||||
var GcalEventSource = /** @class */ (function (_super) {
|
||||
tslib_1.__extends(GcalEventSource, _super);
|
||||
function GcalEventSource() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
GcalEventSource.parse = function (rawInput, calendar) {
|
||||
var rawProps;
|
||||
if (typeof rawInput === 'object') {
|
||||
rawProps = rawInput;
|
||||
}
|
||||
else if (typeof rawInput === 'string') {
|
||||
rawProps = { url: rawInput }; // url will be parsed with parseGoogleCalendarId
|
||||
}
|
||||
if (rawProps) {
|
||||
return fullcalendar_1.EventSource.parse.call(this, rawProps, calendar);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
GcalEventSource.prototype.fetch = function (start, end, timezone) {
|
||||
var _this = this;
|
||||
var url = this.buildUrl();
|
||||
var requestParams = this.buildRequestParams(start, end, timezone);
|
||||
var ajaxSettings = this.ajaxSettings || {};
|
||||
var onSuccess = ajaxSettings.success;
|
||||
if (!requestParams) {
|
||||
return fullcalendar_1.Promise.reject();
|
||||
}
|
||||
this.calendar.pushLoading();
|
||||
return fullcalendar_1.Promise.construct(function (onResolve, onReject) {
|
||||
$.ajax($.extend({}, // destination
|
||||
fullcalendar_1.JsonFeedEventSource.AJAX_DEFAULTS, ajaxSettings, {
|
||||
url: url,
|
||||
data: requestParams,
|
||||
success: function (responseData, status, xhr) {
|
||||
var rawEventDefs;
|
||||
var successRes;
|
||||
_this.calendar.popLoading();
|
||||
if (responseData.error) {
|
||||
_this.reportError('Google Calendar API: ' + responseData.error.message, responseData.error.errors);
|
||||
onReject();
|
||||
}
|
||||
else if (responseData.items) {
|
||||
rawEventDefs = _this.gcalItemsToRawEventDefs(responseData.items, requestParams.timeZone);
|
||||
successRes = fullcalendar_1.applyAll(onSuccess, _this, [responseData, status, xhr]); // passthru
|
||||
if ($.isArray(successRes)) {
|
||||
rawEventDefs = successRes;
|
||||
}
|
||||
onResolve(_this.parseEventDefs(rawEventDefs));
|
||||
}
|
||||
},
|
||||
error: function (xhr, statusText, errorThrown) {
|
||||
_this.reportError('Google Calendar network failure: ' + statusText, [xhr, errorThrown]);
|
||||
_this.calendar.popLoading();
|
||||
onReject();
|
||||
}
|
||||
}));
|
||||
});
|
||||
};
|
||||
GcalEventSource.prototype.gcalItemsToRawEventDefs = function (items, gcalTimezone) {
|
||||
var _this = this;
|
||||
return items.map(function (item) {
|
||||
return _this.gcalItemToRawEventDef(item, gcalTimezone);
|
||||
});
|
||||
};
|
||||
GcalEventSource.prototype.gcalItemToRawEventDef = function (item, gcalTimezone) {
|
||||
var url = item.htmlLink || null;
|
||||
// make the URLs for each event show times in the correct timezone
|
||||
if (url && gcalTimezone) {
|
||||
url = injectQsComponent(url, 'ctz=' + gcalTimezone);
|
||||
}
|
||||
return {
|
||||
id: item.id,
|
||||
title: item.summary,
|
||||
start: item.start.dateTime || item.start.date,
|
||||
end: item.end.dateTime || item.end.date,
|
||||
url: url,
|
||||
location: item.location,
|
||||
description: item.description
|
||||
};
|
||||
};
|
||||
GcalEventSource.prototype.buildUrl = function () {
|
||||
return GcalEventSource.API_BASE + '/' +
|
||||
encodeURIComponent(this.googleCalendarId) +
|
||||
'/events?callback=?'; // jsonp
|
||||
};
|
||||
GcalEventSource.prototype.buildRequestParams = function (start, end, timezone) {
|
||||
var apiKey = this.googleCalendarApiKey || this.calendar.opt('googleCalendarApiKey');
|
||||
var params;
|
||||
if (!apiKey) {
|
||||
this.reportError('Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/');
|
||||
return null;
|
||||
}
|
||||
// The API expects an ISO8601 datetime with a time and timezone part.
|
||||
// Since the calendar's timezone offset isn't always known, request the date in UTC and pad it by a day on each
|
||||
// side, guaranteeing we will receive all events in the desired range, albeit a superset.
|
||||
// .utc() will set a zone and give it a 00:00:00 time.
|
||||
if (!start.hasZone()) {
|
||||
start = start.clone().utc().add(-1, 'day');
|
||||
}
|
||||
if (!end.hasZone()) {
|
||||
end = end.clone().utc().add(1, 'day');
|
||||
}
|
||||
params = $.extend(this.ajaxSettings.data || {}, {
|
||||
key: apiKey,
|
||||
timeMin: start.format(),
|
||||
timeMax: end.format(),
|
||||
singleEvents: true,
|
||||
maxResults: 9999
|
||||
});
|
||||
if (timezone && timezone !== 'local') {
|
||||
// when sending timezone names to Google, only accepts underscores, not spaces
|
||||
params.timeZone = timezone.replace(' ', '_');
|
||||
}
|
||||
return params;
|
||||
};
|
||||
GcalEventSource.prototype.reportError = function (message, apiErrorObjs) {
|
||||
var calendar = this.calendar;
|
||||
var calendarOnError = calendar.opt('googleCalendarError');
|
||||
var errorObjs = apiErrorObjs || [{ message: message }]; // to be passed into error handlers
|
||||
if (this.googleCalendarError) {
|
||||
this.googleCalendarError.apply(calendar, errorObjs);
|
||||
}
|
||||
if (calendarOnError) {
|
||||
calendarOnError.apply(calendar, errorObjs);
|
||||
}
|
||||
// print error to debug console
|
||||
fullcalendar_1.warn.apply(null, [message].concat(apiErrorObjs || []));
|
||||
};
|
||||
GcalEventSource.prototype.getPrimitive = function () {
|
||||
return this.googleCalendarId;
|
||||
};
|
||||
GcalEventSource.prototype.applyManualStandardProps = function (rawProps) {
|
||||
var superSuccess = fullcalendar_1.EventSource.prototype.applyManualStandardProps.apply(this, arguments);
|
||||
var googleCalendarId = rawProps.googleCalendarId;
|
||||
if (googleCalendarId == null && rawProps.url) {
|
||||
googleCalendarId = parseGoogleCalendarId(rawProps.url);
|
||||
}
|
||||
if (googleCalendarId != null) {
|
||||
this.googleCalendarId = googleCalendarId;
|
||||
return superSuccess;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
GcalEventSource.prototype.applyMiscProps = function (rawProps) {
|
||||
if (!this.ajaxSettings) {
|
||||
this.ajaxSettings = {};
|
||||
}
|
||||
$.extend(this.ajaxSettings, rawProps);
|
||||
};
|
||||
GcalEventSource.API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
|
||||
return GcalEventSource;
|
||||
}(fullcalendar_1.EventSource));
|
||||
exports.default = GcalEventSource;
|
||||
GcalEventSource.defineStandardProps({
|
||||
// manually process...
|
||||
url: false,
|
||||
googleCalendarId: false,
|
||||
// automatically transfer...
|
||||
googleCalendarApiKey: true,
|
||||
googleCalendarError: true
|
||||
});
|
||||
function parseGoogleCalendarId(url) {
|
||||
var match;
|
||||
// detect if the ID was specified as a single string.
|
||||
// will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars.
|
||||
if (/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) {
|
||||
return url;
|
||||
}
|
||||
else if ((match = /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url)) ||
|
||||
(match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))) {
|
||||
return decodeURIComponent(match[1]);
|
||||
}
|
||||
}
|
||||
// Injects a string like "arg=value" into the querystring of a URL
|
||||
function injectQsComponent(url, component) {
|
||||
// inject it after the querystring but before the fragment
|
||||
return url.replace(/(\?.*?)?(#|$)/, function (whole, qs, hash) {
|
||||
return (qs ? qs + '&' : '?') + component + hash;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
});
|
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* FullCalendar v3.5.1 Google Calendar Plugin
|
||||
* FullCalendar v3.9.0
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
* (c) 2018 Adam Shaw
|
||||
*/
|
||||
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function r(e){var r;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(r=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(r=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(r[1]):void 0}function a(e,r){return e.replace(/(\?.*?)?(#|$)/,function(e,a,t){return(a?a+"&":"?")+r+t})}var t=e.fullCalendar,o=t.Promise,n=t.EventSource,l=t.JsonFeedEventSource,i=t.EventSourceParser,s=t.applyAll,c=n.extend({googleCalendarApiKey:null,googleCalendarId:null,googleCalendarError:null,ajaxSettings:null,fetch:function(r,a,t){var n=this,i=this.buildUrl(),c=this.buildRequestParams(r,a,t),u=this.ajaxSettings,d=u.success;return c?o.construct(function(r,a){e.ajax(e.extend({},l.AJAX_DEFAULTS,u,{url:i,data:c,success:function(t){var o,l;t.error?(n.reportError("Google Calendar API: "+t.error.message,t.error.errors),a()):t.items&&(o=n.gcalItemsToRawEventDefs(t.items,c.timeZone),l=s(d,this,[o].concat(Array.prototype.slice.call(arguments,1))),e.isArray(l)&&(o=l),r(n.parseEventDefs(o)))}}))}):o.reject()},gcalItemsToRawEventDefs:function(e,r){var a=this;return e.map(function(e){return a.gcalItemToRawEventDef(e,r)})},gcalItemToRawEventDef:function(e,r){var t=e.htmlLink||null;return t&&r&&(t=a(t,"ctz="+r)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:t,location:e.location,description:e.description}},buildUrl:function(){return c.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},buildRequestParams:function(r,a,t){var o,n=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return n?(r.hasZone()||(r=r.clone().utc().add(-1,"day")),a.hasZone()||(a=a.clone().utc().add(1,"day")),o=e.extend(this.ajaxSettings.data||{},{key:n,timeMin:r.format(),timeMax:a.format(),singleEvents:!0,maxResults:9999}),t&&"local"!==t&&(o.timeZone=t.replace(" ","_")),o):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},reportError:function(e,r){var a=this.calendar,o=a.opt("googleCalendarError"),n=r||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(a,n),o&&o.apply(a,n),t.warn.apply(null,[e].concat(r||[]))},getPrimitive:function(){return this.googleCalendarId},applyManualRawProps:function(e){var a=n.prototype.applyManualRawProps.apply(this,arguments),t=e.googleCalendarId;return null==t&&e.url&&(t=r(e.url)),null!=t&&(this.googleCalendarId=t,a)},applyOtherRawProps:function(e){this.ajaxSettings=e}});c.API_BASE="https://www.googleapis.com/calendar/v3/calendars",c.allowRawProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0}),c.parse=function(e,r){var a;return"object"==typeof e?a=e:"string"==typeof e&&(a={url:e}),!!a&&n.parse.call(this,a,r)},i.registerClass(c),t.GcalEventSource=c});
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fullcalendar"),require("jquery")):"function"==typeof define&&define.amd?define(["fullcalendar","jquery"],t):"object"==typeof exports?t(require("fullcalendar"),require("jquery")):t(e.FullCalendar,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=266)}({1:function(t,r){t.exports=e},2:function(e,t){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};t.__extends=function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},266:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(267);o.EventSourceParser.registerClass(n.default),o.GcalEventSource=n.default},267:function(e,t,r){function o(e){var t;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}function n(e,t){return e.replace(/(\?.*?)?(#|$)/,function(e,r,o){return(r?r+"&":"?")+t+o})}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),l=r(3),i=r(1),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.parse=function(e,t){var r;return"object"==typeof e?r=e:"string"==typeof e&&(r={url:e}),!!r&&i.EventSource.parse.call(this,r,t)},t.prototype.fetch=function(e,t,r){var o=this,n=this.buildUrl(),a=this.buildRequestParams(e,t,r),u=this.ajaxSettings||{},c=u.success;return a?(this.calendar.pushLoading(),i.Promise.construct(function(e,t){l.ajax(l.extend({},i.JsonFeedEventSource.AJAX_DEFAULTS,u,{url:n,data:a,success:function(r,n,u){var s,p;o.calendar.popLoading(),r.error?(o.reportError("Google Calendar API: "+r.error.message,r.error.errors),t()):r.items&&(s=o.gcalItemsToRawEventDefs(r.items,a.timeZone),p=i.applyAll(c,o,[r,n,u]),l.isArray(p)&&(s=p),e(o.parseEventDefs(s)))},error:function(e,r,n){o.reportError("Google Calendar network failure: "+r,[e,n]),o.calendar.popLoading(),t()}}))})):i.Promise.reject()},t.prototype.gcalItemsToRawEventDefs=function(e,t){var r=this;return e.map(function(e){return r.gcalItemToRawEventDef(e,t)})},t.prototype.gcalItemToRawEventDef=function(e,t){var r=e.htmlLink||null;return r&&t&&(r=n(r,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:r,location:e.location,description:e.description}},t.prototype.buildUrl=function(){return t.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},t.prototype.buildRequestParams=function(e,t,r){var o,n=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return n?(e.hasZone()||(e=e.clone().utc().add(-1,"day")),t.hasZone()||(t=t.clone().utc().add(1,"day")),o=l.extend(this.ajaxSettings.data||{},{key:n,timeMin:e.format(),timeMax:t.format(),singleEvents:!0,maxResults:9999}),r&&"local"!==r&&(o.timeZone=r.replace(" ","_")),o):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},t.prototype.reportError=function(e,t){var r=this.calendar,o=r.opt("googleCalendarError"),n=t||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(r,n),o&&o.apply(r,n),i.warn.apply(null,[e].concat(t||[]))},t.prototype.getPrimitive=function(){return this.googleCalendarId},t.prototype.applyManualStandardProps=function(e){var t=i.EventSource.prototype.applyManualStandardProps.apply(this,arguments),r=e.googleCalendarId;return null==r&&e.url&&(r=o(e.url)),null!=r&&(this.googleCalendarId=r,t)},t.prototype.applyMiscProps=function(e){this.ajaxSettings||(this.ajaxSettings={}),l.extend(this.ajaxSettings,e)},t.API_BASE="https://www.googleapis.com/calendar/v3/calendars",t}(i.EventSource);t.default=u,u.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(e,r){e.exports=t}})});
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
!function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,a){!function(){a.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(),e.fullCalendar.datepickerLocale("af","af",{closeText:"Selekteer",prevText:"Vorige",nextText:"Volgende",currentText:"Vandag",monthNames:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],dayNamesShort:["Son","Maa","Din","Woe","Don","Vry","Sat"],dayNamesMin:["So","Ma","Di","Wo","Do","Vr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("af",{buttonText:{year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayHtml:"Heeldag",eventLimitText:"Addisionele",noEventsMessage:"Daar is geen gebeurtenis"})});
|
||||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("moment"),require("fullcalendar")):"function"==typeof define&&define.amd?define(["moment","fullcalendar"],n):"object"==typeof exports?n(require("moment"),require("fullcalendar")):n(e.moment,e.FullCalendar)}("undefined"!=typeof self?self:this,function(e,n){return function(e){function n(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var a={};return n.m=e,n.c=a,n.d=function(e,a,t){n.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=65)}({0:function(n,a){n.exports=e},1:function(e,a){e.exports=n},65:function(e,n,a){Object.defineProperty(n,"__esModule",{value:!0}),a(66);var t=a(1);t.datepickerLocale("af","af",{closeText:"Selekteer",prevText:"Vorige",nextText:"Volgende",currentText:"Vandag",monthNames:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],dayNamesShort:["Son","Maa","Din","Woe","Don","Vry","Sat"],dayNamesMin:["So","Ma","Di","Wo","Do","Vr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),t.locale("af",{buttonText:{year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayHtml:"Heeldag",eventLimitText:"Addisionele",noEventsMessage:"Daar is geen gebeurtenisse nie"})},66:function(e,n,a){!function(e,n){n(a(0))}(0,function(e){return e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,n,a){return e<12?a?"vm":"VM":a?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})})}})});
|