Browse Source

Released version 4.16.1

codeClimate v4.16.1
jos 8 years ago
parent
commit
6de24a283c
8 changed files with 463 additions and 116 deletions
  1. +1
    -1
      HISTORY.md
  2. +7
    -7
      dist/vis-graph3d.min.js
  3. +13
    -13
      dist/vis-network.min.js
  4. +13
    -13
      dist/vis-timeline-graph2d.min.js
  5. +405
    -58
      dist/vis.js
  6. +1
    -1
      dist/vis.map
  7. +22
    -22
      dist/vis.min.js
  8. +1
    -1
      package.json

+ 1
- 1
HISTORY.md View File

@ -2,7 +2,7 @@
http://visjs.org http://visjs.org
## not yet released, version 4.16.1-SNAPSHOT
## 2016-04-18, version 4.16.1
### Timeline ### Timeline

+ 7
- 7
dist/vis-graph3d.min.js
File diff suppressed because it is too large
View File


+ 13
- 13
dist/vis-network.min.js
File diff suppressed because it is too large
View File


+ 13
- 13
dist/vis-timeline-graph2d.min.js
File diff suppressed because it is too large
View File


+ 405
- 58
dist/vis.js View File

@ -4,8 +4,8 @@
* *
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 4.16.0
* @date 2016-04-07
* @version 4.16.1
* @date 2016-04-18
* *
* @license * @license
* Copyright (C) 2011-2016 Almende B.V, http://almende.com * Copyright (C) 2011-2016 Almende B.V, http://almende.com
@ -1525,7 +1525,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {//! moment.js /* WEBPACK VAR INJECTION */(function(module) {//! moment.js
//! version : 2.12.0
//! version : 2.13.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT //! license : MIT
//! momentjs.com //! momentjs.com
@ -1602,7 +1602,9 @@ return /******/ (function(modules) { // webpackBootstrap
invalidMonth : null, invalidMonth : null,
invalidFormat : false, invalidFormat : false,
userInvalidated : false, userInvalidated : false,
iso : false
iso : false,
parsedDateParts : [],
meridiem : null
}; };
} }
@ -1613,9 +1615,30 @@ return /******/ (function(modules) { // webpackBootstrap
return m._pf; return m._pf;
} }
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function (fun) {
var t = Object(this);
var len = t.length >>> 0;
for (var i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function valid__isValid(m) { function valid__isValid(m) {
if (m._isValid == null) { if (m._isValid == null) {
var flags = getParsingFlags(m); var flags = getParsingFlags(m);
var parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
});
m._isValid = !isNaN(m._d.getTime()) && m._isValid = !isNaN(m._d.getTime()) &&
flags.overflow < 0 && flags.overflow < 0 &&
!flags.empty && !flags.empty &&
@ -1623,7 +1646,8 @@ return /******/ (function(modules) { // webpackBootstrap
!flags.invalidWeekday && !flags.invalidWeekday &&
!flags.nullInput && !flags.nullInput &&
!flags.invalidFormat && !flags.invalidFormat &&
!flags.userInvalidated;
!flags.userInvalidated &&
(!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) { if (m._strict) {
m._isValid = m._isValid && m._isValid = m._isValid &&
@ -1766,6 +1790,9 @@ return /******/ (function(modules) { // webpackBootstrap
var firstTime = true; var firstTime = true;
return extend(function () { return extend(function () {
if (utils_hooks__hooks.deprecationHandler != null) {
utils_hooks__hooks.deprecationHandler(null, msg);
}
if (firstTime) { if (firstTime) {
warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack);
firstTime = false; firstTime = false;
@ -1777,6 +1804,9 @@ return /******/ (function(modules) { // webpackBootstrap
var deprecations = {}; var deprecations = {};
function deprecateSimple(name, msg) { function deprecateSimple(name, msg) {
if (utils_hooks__hooks.deprecationHandler != null) {
utils_hooks__hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) { if (!deprecations[name]) {
warn(msg); warn(msg);
deprecations[name] = true; deprecations[name] = true;
@ -1784,6 +1814,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
utils_hooks__hooks.suppressDeprecationWarnings = false; utils_hooks__hooks.suppressDeprecationWarnings = false;
utils_hooks__hooks.deprecationHandler = null;
function isFunction(input) { function isFunction(input) {
return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
@ -1833,6 +1864,22 @@ return /******/ (function(modules) { // webpackBootstrap
} }
} }
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function (obj) {
var i, res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
// internal storage for locale config files // internal storage for locale config files
var locales = {}; var locales = {};
var globalLocale; var globalLocale;
@ -1987,7 +2034,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
function locale_locales__listLocales() { function locale_locales__listLocales() {
return Object.keys(locales);
return keys(locales);
} }
var aliases = {}; var aliases = {};
@ -2066,7 +2113,7 @@ return /******/ (function(modules) { // webpackBootstrap
Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
} }
var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
@ -2119,7 +2166,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
return function (mom) { return function (mom) {
var output = '';
var output = '', i;
for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
} }
@ -2248,6 +2295,23 @@ return /******/ (function(modules) { // webpackBootstrap
var WEEK = 7; var WEEK = 7;
var WEEKDAY = 8; var WEEKDAY = 8;
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function (o) {
// I know
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth(year, month) { function daysInMonth(year, month) {
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
} }
@ -2310,15 +2374,63 @@ return /******/ (function(modules) { // webpackBootstrap
this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
} }
function units_month__handleStrictParse(monthName, format, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = create_utc__createUTC([2000, i]);
this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse (monthName, format, strict) { function localeMonthsParse (monthName, format, strict) {
var i, mom, regex; var i, mom, regex;
if (this._monthsParseExact) {
return units_month__handleStrictParse.call(this, monthName, format, strict);
}
if (!this._monthsParse) { if (!this._monthsParse) {
this._monthsParse = []; this._monthsParse = [];
this._longMonthsParse = []; this._longMonthsParse = [];
this._shortMonthsParse = []; this._shortMonthsParse = [];
} }
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for (i = 0; i < 12; i++) { for (i = 0; i < 12; i++) {
// make the regex if we don't have it already // make the regex if we don't have it already
mom = create_utc__createUTC([2000, i]); mom = create_utc__createUTC([2000, i]);
@ -2444,8 +2556,8 @@ return /******/ (function(modules) { // webpackBootstrap
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex; this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')$', 'i');
this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')$', 'i');
this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
} }
function checkOverflow (m) { function checkOverflow (m) {
@ -2672,7 +2784,7 @@ return /******/ (function(modules) { // webpackBootstrap
// MOMENTS // MOMENTS
var getSetYear = makeGetSet('FullYear', false);
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear () { function getIsLeapYear () {
return isLeapYear(this.year()); return isLeapYear(this.year());
@ -2941,6 +3053,9 @@ return /******/ (function(modules) { // webpackBootstrap
config._a[HOUR] > 0) { config._a[HOUR] > 0) {
getParsingFlags(config).bigHour = undefined; getParsingFlags(config).bigHour = undefined;
} }
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
// handle meridiem // handle meridiem
config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
@ -3081,7 +3196,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (input === undefined) { if (input === undefined) {
config._d = new Date(utils_hooks__hooks.now()); config._d = new Date(utils_hooks__hooks.now());
} else if (isDate(input)) { } else if (isDate(input)) {
config._d = new Date(+input);
config._d = new Date(input.valueOf());
} else if (typeof input === 'string') { } else if (typeof input === 'string') {
configFromString(config); configFromString(config);
} else if (isArray(input)) { } else if (isArray(input)) {
@ -3201,7 +3316,7 @@ return /******/ (function(modules) { // webpackBootstrap
this._milliseconds = +milliseconds + this._milliseconds = +milliseconds +
seconds * 1e3 + // 1000 seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60 minutes * 6e4 + // 1000 * 60
hours * 36e5; // 1000 * 60 * 60
hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a // Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately // day when working around DST, we need to store them separately
this._days = +days + this._days = +days +
@ -3271,9 +3386,9 @@ return /******/ (function(modules) { // webpackBootstrap
var res, diff; var res, diff;
if (model._isUTC) { if (model._isUTC) {
res = model.clone(); res = model.clone();
diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);
diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();
// Use low-level api, because this fn is low-level api. // Use low-level api, because this fn is low-level api.
res._d.setTime(+res._d + diff);
res._d.setTime(res._d.valueOf() + diff);
utils_hooks__hooks.updateOffset(res, false); utils_hooks__hooks.updateOffset(res, false);
return res; return res;
} else { } else {
@ -3434,7 +3549,7 @@ return /******/ (function(modules) { // webpackBootstrap
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
// and further modified to allow for strings containing both week and day // and further modified to allow for strings containing both week and day
var isoRegex = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;
var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
function create__createDuration (input, key) { function create__createDuration (input, key) {
var duration = input, var duration = input,
@ -3578,7 +3693,7 @@ return /******/ (function(modules) { // webpackBootstrap
updateOffset = updateOffset == null ? true : updateOffset; updateOffset = updateOffset == null ? true : updateOffset;
if (milliseconds) { if (milliseconds) {
mom._d.setTime(+mom._d + milliseconds * isAdding);
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
} }
if (days) { if (days) {
get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);
@ -3623,9 +3738,9 @@ return /******/ (function(modules) { // webpackBootstrap
} }
units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
if (units === 'millisecond') { if (units === 'millisecond') {
return +this > +localInput;
return this.valueOf() > localInput.valueOf();
} else { } else {
return +localInput < +this.clone().startOf(units);
return localInput.valueOf() < this.clone().startOf(units).valueOf();
} }
} }
@ -3636,14 +3751,16 @@ return /******/ (function(modules) { // webpackBootstrap
} }
units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
if (units === 'millisecond') { if (units === 'millisecond') {
return +this < +localInput;
return this.valueOf() < localInput.valueOf();
} else { } else {
return +this.clone().endOf(units) < +localInput;
return this.clone().endOf(units).valueOf() < localInput.valueOf();
} }
} }
function isBetween (from, to, units) {
return this.isAfter(from, units) && this.isBefore(to, units);
function isBetween (from, to, units, inclusivity) {
inclusivity = inclusivity || '()';
return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
(inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
} }
function isSame (input, units) { function isSame (input, units) {
@ -3654,10 +3771,10 @@ return /******/ (function(modules) { // webpackBootstrap
} }
units = normalizeUnits(units || 'millisecond'); units = normalizeUnits(units || 'millisecond');
if (units === 'millisecond') { if (units === 'millisecond') {
return +this === +localInput;
return this.valueOf() === localInput.valueOf();
} else { } else {
inputMs = +localInput;
return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));
inputMs = localInput.valueOf();
return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
} }
} }
@ -3724,10 +3841,12 @@ return /******/ (function(modules) { // webpackBootstrap
adjust = (b - anchor) / (anchor2 - anchor); adjust = (b - anchor) / (anchor2 - anchor);
} }
return -(wholeMonthDiff + adjust);
//check for negative zero, return zero if negative zero
return -(wholeMonthDiff + adjust) || 0;
} }
utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
function toString () { function toString () {
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
@ -3748,7 +3867,10 @@ return /******/ (function(modules) { // webpackBootstrap
} }
function format (inputString) { function format (inputString) {
var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);
if (!inputString) {
inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output); return this.localeData().postformat(output);
} }
@ -3827,6 +3949,7 @@ return /******/ (function(modules) { // webpackBootstrap
case 'week': case 'week':
case 'isoWeek': case 'isoWeek':
case 'day': case 'day':
case 'date':
this.hours(0); this.hours(0);
/* falls through */ /* falls through */
case 'hour': case 'hour':
@ -3860,19 +3983,25 @@ return /******/ (function(modules) { // webpackBootstrap
if (units === undefined || units === 'millisecond') { if (units === undefined || units === 'millisecond') {
return this; return this;
} }
// 'date' is an alias for 'day', so it should be considered as such.
if (units === 'date') {
units = 'day';
}
return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
} }
function to_type__valueOf () { function to_type__valueOf () {
return +this._d - ((this._offset || 0) * 60000);
return this._d.valueOf() - ((this._offset || 0) * 60000);
} }
function unix () { function unix () {
return Math.floor(+this / 1000);
return Math.floor(this.valueOf() / 1000);
} }
function toDate () { function toDate () {
return this._offset ? new Date(+this) : this._d;
return this._offset ? new Date(this.valueOf()) : this._d;
} }
function toArray () { function toArray () {
@ -4141,9 +4270,15 @@ return /******/ (function(modules) { // webpackBootstrap
addRegexToken('d', match1to2); addRegexToken('d', match1to2);
addRegexToken('e', match1to2); addRegexToken('e', match1to2);
addRegexToken('E', match1to2); addRegexToken('E', match1to2);
addRegexToken('dd', matchWord);
addRegexToken('ddd', matchWord);
addRegexToken('dddd', matchWord);
addRegexToken('dd', function (isStrict, locale) {
return locale.weekdaysMinRegex(isStrict);
});
addRegexToken('ddd', function (isStrict, locale) {
return locale.weekdaysShortRegex(isStrict);
});
addRegexToken('dddd', function (isStrict, locale) {
return locale.weekdaysRegex(isStrict);
});
addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
var weekday = config._locale.weekdaysParse(input, token, config._strict); var weekday = config._locale.weekdaysParse(input, token, config._strict);
@ -4196,9 +4331,77 @@ return /******/ (function(modules) { // webpackBootstrap
return this._weekdaysMin[m.day()]; return this._weekdaysMin[m.day()];
} }
function day_of_week__handleStrictParse(weekdayName, format, strict) {
var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = create_utc__createUTC([2000, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse (weekdayName, format, strict) { function localeWeekdaysParse (weekdayName, format, strict) {
var i, mom, regex; var i, mom, regex;
if (this._weekdaysParseExact) {
return day_of_week__handleStrictParse.call(this, weekdayName, format, strict);
}
if (!this._weekdaysParse) { if (!this._weekdaysParse) {
this._weekdaysParse = []; this._weekdaysParse = [];
this._minWeekdaysParse = []; this._minWeekdaysParse = [];
@ -4209,7 +4412,7 @@ return /******/ (function(modules) { // webpackBootstrap
for (i = 0; i < 7; i++) { for (i = 0; i < 7; i++) {
// make the regex if we don't have it already // make the regex if we don't have it already
mom = local__createLocal([2000, 1]).day(i);
mom = create_utc__createUTC([2000, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) { if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
@ -4265,6 +4468,99 @@ return /******/ (function(modules) { // webpackBootstrap
return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
} }
var defaultWeekdaysRegex = matchWord;
function weekdaysRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
return this._weekdaysStrictRegex && isStrict ?
this._weekdaysStrictRegex : this._weekdaysRegex;
}
}
var defaultWeekdaysShortRegex = matchWord;
function weekdaysShortRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
return this._weekdaysShortStrictRegex && isStrict ?
this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
}
}
var defaultWeekdaysMinRegex = matchWord;
function weekdaysMinRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
return this._weekdaysMinStrictRegex && isStrict ?
this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
}
}
function computeWeekdaysParse () {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
i, mom, minp, shortp, longp;
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = create_utc__createUTC([2000, 1]).day(i);
minp = this.weekdaysMin(mom, '');
shortp = this.weekdaysShort(mom, '');
longp = this.weekdays(mom, '');
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
for (i = 0; i < 7; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
}
// FORMATTING // FORMATTING
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
@ -4296,8 +4592,13 @@ return /******/ (function(modules) { // webpackBootstrap
return this.hours() % 12 || 12; return this.hours() % 12 || 12;
} }
function kFormat() {
return this.hours() || 24;
}
addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('H', ['HH', 2], 0, 'hour');
addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('h', ['hh', 2], 0, hFormat);
addFormatToken('k', ['kk', 2], 0, kFormat);
addFormatToken('hmm', 0, 0, function () { addFormatToken('hmm', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
@ -4758,6 +5059,13 @@ return /******/ (function(modules) { // webpackBootstrap
prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;
prototype__proto.weekdaysParse = localeWeekdaysParse; prototype__proto.weekdaysParse = localeWeekdaysParse;
prototype__proto._weekdaysRegex = defaultWeekdaysRegex;
prototype__proto.weekdaysRegex = weekdaysRegex;
prototype__proto._weekdaysShortRegex = defaultWeekdaysShortRegex;
prototype__proto.weekdaysShortRegex = weekdaysShortRegex;
prototype__proto._weekdaysMinRegex = defaultWeekdaysMinRegex;
prototype__proto.weekdaysMinRegex = weekdaysMinRegex;
// Hours // Hours
prototype__proto.isPM = localeIsPM; prototype__proto.isPM = localeIsPM;
prototype__proto._meridiemParse = defaultLocaleMeridiemParse; prototype__proto._meridiemParse = defaultLocaleMeridiemParse;
@ -4769,7 +5077,7 @@ return /******/ (function(modules) { // webpackBootstrap
return locale[field](utc, format); return locale[field](utc, format);
} }
function list (format, index, field, count, setter) {
function listMonthsImpl (format, index, field) {
if (typeof format === 'number') { if (typeof format === 'number') {
index = format; index = format;
format = undefined; format = undefined;
@ -4778,35 +5086,79 @@ return /******/ (function(modules) { // webpackBootstrap
format = format || ''; format = format || '';
if (index != null) { if (index != null) {
return lists__get(format, index, field, setter);
return lists__get(format, index, field, 'month');
} }
var i; var i;
var out = []; var out = [];
for (i = 0; i < count; i++) {
out[i] = lists__get(format, i, field, setter);
for (i = 0; i < 12; i++) {
out[i] = lists__get(format, i, field, 'month');
}
return out;
}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function listWeekdaysImpl (localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (typeof format === 'number') {
index = format;
format = undefined;
}
format = format || '';
} else {
format = localeSorted;
index = format;
localeSorted = false;
if (typeof format === 'number') {
index = format;
format = undefined;
}
format = format || '';
}
var locale = locale_locales__getLocale(),
shift = localeSorted ? locale._week.dow : 0;
if (index != null) {
return lists__get(format, (index + shift) % 7, field, 'day');
}
var i;
var out = [];
for (i = 0; i < 7; i++) {
out[i] = lists__get(format, (i + shift) % 7, field, 'day');
} }
return out; return out;
} }
function lists__listMonths (format, index) { function lists__listMonths (format, index) {
return list(format, index, 'months', 12, 'month');
return listMonthsImpl(format, index, 'months');
} }
function lists__listMonthsShort (format, index) { function lists__listMonthsShort (format, index) {
return list(format, index, 'monthsShort', 12, 'month');
return listMonthsImpl(format, index, 'monthsShort');
} }
function lists__listWeekdays (format, index) {
return list(format, index, 'weekdays', 7, 'day');
function lists__listWeekdays (localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
} }
function lists__listWeekdaysShort (format, index) {
return list(format, index, 'weekdaysShort', 7, 'day');
function lists__listWeekdaysShort (localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
} }
function lists__listWeekdaysMin (format, index) {
return list(format, index, 'weekdaysMin', 7, 'day');
function lists__listWeekdaysMin (localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
} }
locale_locales__getSetGlobalLocale('en', { locale_locales__getSetGlobalLocale('en', {
@ -5177,7 +5529,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Side effect imports // Side effect imports
utils_hooks__hooks.version = '2.12.0';
utils_hooks__hooks.version = '2.13.0';
setHookCallback(local__createLocal); setHookCallback(local__createLocal);
@ -18000,7 +18352,7 @@ return /******/ (function(modules) { // webpackBootstrap
var props = this.props; var props = this.props;
var dom = this.dom; var dom = this.dom;
if (!dom || !dom.container || dom.root.clientWidth == 0) return; // when destroyed, or invisible
if (!dom || !dom.container || dom.root.offsetWidth == 0) return; // when destroyed, or invisible
DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates);
@ -33032,15 +33384,9 @@ return /******/ (function(modules) { // webpackBootstrap
if (newOptions.arrows !== undefined && newOptions.arrows !== null) { if (newOptions.arrows !== undefined && newOptions.arrows !== null) {
if (typeof newOptions.arrows === 'string') { if (typeof newOptions.arrows === 'string') {
var arrows = newOptions.arrows.toLowerCase(); var arrows = newOptions.arrows.toLowerCase();
if (arrows.indexOf("to") != -1) {
parentOptions.arrows.to.enabled = true;
}
if (arrows.indexOf("middle") != -1) {
parentOptions.arrows.middle.enabled = true;
}
if (arrows.indexOf("from") != -1) {
parentOptions.arrows.from.enabled = true;
}
parentOptions.arrows.to.enabled = arrows.indexOf("to") != -1;
parentOptions.arrows.middle.enabled = arrows.indexOf("middle") != -1;
parentOptions.arrows.from.enabled = arrows.indexOf("from") != -1;
} else if (_typeof(newOptions.arrows) === 'object') { } else if (_typeof(newOptions.arrows) === 'object') {
util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', allowDeletion, globalOptions.arrows); util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', allowDeletion, globalOptions.arrows);
util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', allowDeletion, globalOptions.arrows); util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', allowDeletion, globalOptions.arrows);
@ -43827,6 +44173,7 @@ return /******/ (function(modules) { // webpackBootstrap
__type__: { object: object, boolean: boolean } __type__: { object: object, boolean: boolean }
}, },
font: { font: {
align: { string: string },
color: { string: string }, color: { string: string },
size: { number: number }, // px size: { number: number }, // px
face: { string: string }, face: { string: string },

+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 22
- 22
dist/vis.min.js
File diff suppressed because it is too large
View File


+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{ {
"name": "vis", "name": "vis",
"version": "4.16.1-SNAPSHOT",
"version": "4.16.1",
"description": "A dynamic, browser-based visualization library.", "description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/", "homepage": "http://visjs.org/",
"license": "(Apache-2.0 OR MIT)", "license": "(Apache-2.0 OR MIT)",

Loading…
Cancel
Save