mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 15:32:03 +02:00
vanilla 17.0
This commit is contained in:
parent
d72e748793
commit
a9bcec8e91
1986 changed files with 1613876 additions and 568976 deletions
|
|
@ -69,8 +69,8 @@ Docs & License: https://fullcalendar.io/
|
|||
BootstrapTheme.prototype.baseIconClass = 'fa';
|
||||
BootstrapTheme.prototype.iconClasses = {
|
||||
close: 'fa-times',
|
||||
prev: 'fa-chevron-left',
|
||||
next: 'fa-chevron-right',
|
||||
prev: 'oi-chevron-left',
|
||||
next: 'oi-chevron-right',
|
||||
prevYear: 'fa-angle-double-left',
|
||||
nextYear: 'fa-angle-double-right'
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1071,7 +1071,9 @@ Docs & License: https://fullcalendar.io/
|
|||
for (var id in droppableStore) {
|
||||
var component = droppableStore[id].component;
|
||||
var offsetTracker = offsetTrackers[id];
|
||||
if (offsetTracker.isWithinClipping(offsetLeft, offsetTop)) {
|
||||
if (offsetTracker && // Odoo patch - backport fix
|
||||
offsetTracker.isWithinClipping(offsetLeft, offsetTop)
|
||||
) {
|
||||
var originLeft = offsetTracker.computeLeft();
|
||||
var originTop = offsetTracker.computeTop();
|
||||
var positionLeft = offsetLeft - originLeft;
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
/*!
|
||||
FullCalendar Moment Timezone Plugin v4.4.0
|
||||
Docs & License: https://fullcalendar.io/
|
||||
(c) 2019 Adam Shaw
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('moment-timezone/builds/moment-timezone-with-data'), require('@fullcalendar/core')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'moment', 'moment-timezone/builds/moment-timezone-with-data', '@fullcalendar/core'], factory) :
|
||||
(global = global || self, factory(global.FullCalendarMomentTimezone = {}, global.moment, global.moment, global.FullCalendar));
|
||||
}(this, function (exports, momentNs, momentTimezoneWithData, core) { 'use strict';
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
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]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
var moment = momentNs; // the directly callable function
|
||||
var MomentNamedTimeZone = /** @class */ (function (_super) {
|
||||
__extends(MomentNamedTimeZone, _super);
|
||||
function MomentNamedTimeZone() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
MomentNamedTimeZone.prototype.offsetForArray = function (a) {
|
||||
return moment.tz(a, this.timeZoneName).utcOffset();
|
||||
};
|
||||
MomentNamedTimeZone.prototype.timestampToArray = function (ms) {
|
||||
return moment.tz(ms, this.timeZoneName).toArray();
|
||||
};
|
||||
return MomentNamedTimeZone;
|
||||
}(core.NamedTimeZoneImpl));
|
||||
var main = core.createPlugin({
|
||||
namedTimeZonedImpl: MomentNamedTimeZone
|
||||
});
|
||||
|
||||
exports.default = main;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
}));
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
/*!
|
||||
FullCalendar Moment Plugin v4.4.0
|
||||
Docs & License: https://fullcalendar.io/
|
||||
(c) 2019 Adam Shaw
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('@fullcalendar/core')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'moment', '@fullcalendar/core'], factory) :
|
||||
(global = global || self, factory(global.FullCalendarMoment = {}, global.moment, global.FullCalendar));
|
||||
}(this, function (exports, momentNs, core) { 'use strict';
|
||||
|
||||
var moment = momentNs; // the directly callable function
|
||||
function toMoment(date, calendar) {
|
||||
if (!(calendar instanceof core.Calendar)) {
|
||||
throw new Error('must supply a Calendar instance');
|
||||
}
|
||||
return convertToMoment(date, calendar.dateEnv.timeZone, null, calendar.dateEnv.locale.codes[0]);
|
||||
}
|
||||
function toDuration(fcDuration) {
|
||||
return moment.duration(fcDuration); // moment accepts all the props that fc.Duration already has!
|
||||
}
|
||||
function formatWithCmdStr(cmdStr, arg) {
|
||||
var cmd = parseCmdStr(cmdStr);
|
||||
if (arg.end) {
|
||||
var startMom = convertToMoment(arg.start.array, arg.timeZone, arg.start.timeZoneOffset, arg.localeCodes[0]);
|
||||
var endMom = convertToMoment(arg.end.array, arg.timeZone, arg.end.timeZoneOffset, arg.localeCodes[0]);
|
||||
return formatRange(cmd, createMomentFormatFunc(startMom), createMomentFormatFunc(endMom), arg.separator);
|
||||
}
|
||||
return convertToMoment(arg.date.array, arg.timeZone, arg.date.timeZoneOffset, arg.localeCodes[0]).format(cmd.whole); // TODO: test for this
|
||||
}
|
||||
var main = core.createPlugin({
|
||||
cmdFormatter: formatWithCmdStr
|
||||
});
|
||||
function createMomentFormatFunc(mom) {
|
||||
return function (cmdStr) {
|
||||
return cmdStr ? mom.format(cmdStr) : ''; // because calling with blank string results in ISO8601 :(
|
||||
};
|
||||
}
|
||||
function convertToMoment(input, timeZone, timeZoneOffset, locale) {
|
||||
var mom;
|
||||
if (timeZone === 'local') {
|
||||
mom = moment(input);
|
||||
}
|
||||
else if (timeZone === 'UTC') {
|
||||
mom = moment.utc(input);
|
||||
}
|
||||
else if (moment.tz) {
|
||||
mom = moment.tz(input, timeZone);
|
||||
}
|
||||
else {
|
||||
mom = moment.utc(input);
|
||||
if (timeZoneOffset != null) {
|
||||
mom.utcOffset(timeZoneOffset);
|
||||
}
|
||||
}
|
||||
mom.locale(locale);
|
||||
return mom;
|
||||
}
|
||||
function parseCmdStr(cmdStr) {
|
||||
var parts = cmdStr.match(/^(.*?)\{(.*)\}(.*)$/); // TODO: lookbehinds for escape characters
|
||||
if (parts) {
|
||||
var middle = parseCmdStr(parts[2]);
|
||||
return {
|
||||
head: parts[1],
|
||||
middle: middle,
|
||||
tail: parts[3],
|
||||
whole: parts[1] + middle.whole + parts[3]
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
head: null,
|
||||
middle: null,
|
||||
tail: null,
|
||||
whole: cmdStr
|
||||
};
|
||||
}
|
||||
}
|
||||
function formatRange(cmd, formatStart, formatEnd, separator) {
|
||||
if (cmd.middle) {
|
||||
var startHead = formatStart(cmd.head);
|
||||
var startMiddle = formatRange(cmd.middle, formatStart, formatEnd, separator);
|
||||
var startTail = formatStart(cmd.tail);
|
||||
var endHead = formatEnd(cmd.head);
|
||||
var endMiddle = formatRange(cmd.middle, formatStart, formatEnd, separator);
|
||||
var endTail = formatEnd(cmd.tail);
|
||||
if (startHead === endHead && startTail === endTail) {
|
||||
return startHead +
|
||||
(startMiddle === endMiddle ? startMiddle : startMiddle + separator + endMiddle) +
|
||||
startTail;
|
||||
}
|
||||
}
|
||||
var startWhole = formatStart(cmd.whole);
|
||||
var endWhole = formatEnd(cmd.whole);
|
||||
if (startWhole === endWhole) {
|
||||
return startWhole;
|
||||
}
|
||||
else {
|
||||
return startWhole + separator + endWhole;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = main;
|
||||
exports.toDuration = toDuration;
|
||||
exports.toMoment = toMoment;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue