update js libraries

This commit is contained in:
2019-04-20 20:31:51 +02:00
parent 7277670b8b
commit d82b33c60e
8 changed files with 370 additions and 184 deletions

View File

@@ -286,7 +286,19 @@
padding: 4px 8px; padding: 4px 8px;
} }
.daterangepicker.show-ranges .drp-calendar.left { .daterangepicker.show-ranges.single.rtl .drp-calendar.left {
border-right: 1px solid #ddd;
}
.daterangepicker.show-ranges.single.ltr .drp-calendar.left {
border-left: 1px solid #ddd;
}
.daterangepicker.show-ranges.rtl .drp-calendar.right {
border-right: 1px solid #ddd;
}
.daterangepicker.show-ranges.ltr .drp-calendar.left {
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
} }
@@ -325,64 +337,74 @@
/* Larger Screen Styling */ /* Larger Screen Styling */
@media (min-width: 564px) { @media (min-width: 564px) {
.daterangepicker { .daterangepicker {
width: auto; } width: auto;
}
.daterangepicker .ranges ul { .daterangepicker .ranges ul {
width: 140px; } width: 140px;
}
.daterangepicker.single .ranges ul { .daterangepicker.single .ranges ul {
width: 100%; } width: 100%;
}
.daterangepicker.single .drp-calendar.left { .daterangepicker.single .drp-calendar.left {
clear: none; } clear: none;
.daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .drp-calendar { }
float: left; }
.daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .drp-calendar { .daterangepicker.single .ranges, .daterangepicker.single .drp-calendar {
float: right; } float: left;
.daterangepicker.ltr { }
.daterangepicker {
direction: ltr; direction: ltr;
text-align: left; } text-align: left;
.daterangepicker.ltr .drp-calendar.left { }
.daterangepicker .drp-calendar.left {
clear: left; clear: left;
margin-right: 0; } margin-right: 0;
.daterangepicker.ltr .drp-calendar.left .calendar-table { }
.daterangepicker .drp-calendar.left .calendar-table {
border-right: none; border-right: none;
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 0; } border-bottom-right-radius: 0;
.daterangepicker.ltr .drp-calendar.right { }
margin-left: 0; }
.daterangepicker.ltr .drp-calendar.right .calendar-table { .daterangepicker .drp-calendar.right {
margin-left: 0;
}
.daterangepicker .drp-calendar.right .calendar-table {
border-left: none; border-left: none;
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-left-radius: 0; } border-bottom-left-radius: 0;
.daterangepicker.ltr .drp-calendar.left .calendar-table { }
padding-right: 8px; }
.daterangepicker.ltr .ranges, .daterangepicker.ltr .drp-calendar { .daterangepicker .drp-calendar.left .calendar-table {
float: left; } padding-right: 8px;
.daterangepicker.rtl { }
direction: rtl;
text-align: right; } .daterangepicker .ranges, .daterangepicker .drp-calendar {
.daterangepicker.rtl .drp-calendar.left { float: left;
clear: right; }
margin-left: 0; } }
.daterangepicker.rtl .drp-calendar.left .calendar-table {
border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0; }
.daterangepicker.rtl .drp-calendar.right {
margin-right: 0; }
.daterangepicker.rtl .drp-calendar.right .calendar-table {
border-right: none;
border-top-right-radius: 0;
border-bottom-right-radius: 0; }
.daterangepicker.rtl .drp-calendar.left .calendar-table {
padding-left: 12px; }
.daterangepicker.rtl .ranges, .daterangepicker.rtl .drp-calendar {
text-align: right;
float: right; } }
@media (min-width: 730px) { @media (min-width: 730px) {
.daterangepicker .ranges { .daterangepicker .ranges {
width: auto; } width: auto;
.daterangepicker.ltr .ranges { }
float: left; }
.daterangepicker .ranges {
float: left;
}
.daterangepicker.rtl .ranges { .daterangepicker.rtl .ranges {
float: right; } float: right;
}
.daterangepicker .drp-calendar.left { .daterangepicker .drp-calendar.left {
clear: none !important; } } clear: none !important;
}
}

View File

@@ -1,5 +1,5 @@
/** /**
* @version: 3.0.3 * @version: 3.0.4
* @author: Dan Grossman http://www.dangrossman.info/ * @author: Dan Grossman http://www.dangrossman.info/
* @copyright: Copyright (c) 2012-2018 Dan Grossman. All rights reserved. * @copyright: Copyright (c) 2012-2018 Dan Grossman. All rights reserved.
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
@@ -11,6 +11,7 @@
// AMD. Make globaly available as well // AMD. Make globaly available as well
define(['moment', 'jquery'], function (moment, jquery) { define(['moment', 'jquery'], function (moment, jquery) {
if (!jquery.fn) jquery.fn = {}; // webpack server rendering if (!jquery.fn) jquery.fn = {}; // webpack server rendering
if (typeof moment !== 'function' && moment.default) moment = moment.default
return factory(moment, jquery); return factory(moment, jquery);
}); });
} else if (typeof module === 'object' && module.exports) { } else if (typeof module === 'object' && module.exports) {
@@ -488,7 +489,7 @@
this.endDate = moment(endDate); this.endDate = moment(endDate);
if (!this.timePicker) if (!this.timePicker)
this.endDate = this.endDate.add(1,'d').startOf('day').subtract(1,'second'); this.endDate = this.endDate.endOf('day');
if (this.timePicker && this.timePickerIncrement) if (this.timePicker && this.timePickerIncrement)
this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
@@ -575,6 +576,9 @@
if (this.endDate) { if (this.endDate) {
hour = parseInt(this.container.find('.left .hourselect').val(), 10); hour = parseInt(this.container.find('.left .hourselect').val(), 10);
minute = parseInt(this.container.find('.left .minuteselect').val(), 10); minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
if (isNaN(minute)) {
minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10);
}
second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
if (!this.timePicker24Hour) { if (!this.timePicker24Hour) {
var ampm = this.container.find('.left .ampmselect').val(); var ampm = this.container.find('.left .ampmselect').val();
@@ -586,6 +590,9 @@
} else { } else {
hour = parseInt(this.container.find('.right .hourselect').val(), 10); hour = parseInt(this.container.find('.right .hourselect').val(), 10);
minute = parseInt(this.container.find('.right .minuteselect').val(), 10); minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
if (isNaN(minute)) {
minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10);
}
second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
if (!this.timePicker24Hour) { if (!this.timePicker24Hour) {
var ampm = this.container.find('.right .ampmselect').val(); var ampm = this.container.find('.right .ampmselect').val();
@@ -709,7 +716,7 @@
var monthHtml = '<select class="monthselect">'; var monthHtml = '<select class="monthselect">';
for (var m = 0; m < 12; m++) { for (var m = 0; m < 12; m++) {
if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) { if ((!inMinYear || (minDate && m >= minDate.month())) && (!inMaxYear || (maxDate && m <= maxDate.month()))) {
monthHtml += "<option value='" + m + "'" + monthHtml += "<option value='" + m + "'" +
(m === currentMonth ? " selected='selected'" : "") + (m === currentMonth ? " selected='selected'" : "") +
">" + this.locale.monthNames[m] + "</option>"; ">" + this.locale.monthNames[m] + "</option>";
@@ -786,7 +793,7 @@
//grey out the dates in other months displayed at beginning and end of this calendar //grey out the dates in other months displayed at beginning and end of this calendar
if (calendar[row][col].month() != calendar[1][1].month()) if (calendar[row][col].month() != calendar[1][1].month())
classes.push('off'); classes.push('off', 'ends');
//don't allow selection of dates before the minimum date //don't allow selection of dates before the minimum date
if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day')) if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day'))
@@ -851,7 +858,7 @@
var html, selected, minDate, maxDate = this.maxDate; var html, selected, minDate, maxDate = this.maxDate;
if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isAfter(this.maxDate))) if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)))
maxDate = this.startDate.clone().add(this.maxSpan); maxDate = this.startDate.clone().add(this.maxSpan);
if (side == 'left') { if (side == 'left') {
@@ -865,9 +872,9 @@
var timeSelector = this.container.find('.drp-calendar.right .calendar-time'); var timeSelector = this.container.find('.drp-calendar.right .calendar-time');
if (timeSelector.html() != '') { if (timeSelector.html() != '') {
selected.hour(selected.hour() || timeSelector.find('.hourselect option:selected').val()); selected.hour(!isNaN(selected.hour()) ? selected.hour() : timeSelector.find('.hourselect option:selected').val());
selected.minute(selected.minute() || timeSelector.find('.minuteselect option:selected').val()); selected.minute(!isNaN(selected.minute()) ? selected.minute() : timeSelector.find('.minuteselect option:selected').val());
selected.second(selected.second() || timeSelector.find('.secondselect option:selected').val()); selected.second(!isNaN(selected.second()) ? selected.second() : timeSelector.find('.secondselect option:selected').val());
if (!this.timePicker24Hour) { if (!this.timePicker24Hour) {
var ampm = timeSelector.find('.ampmselect option:selected').val(); var ampm = timeSelector.find('.ampmselect option:selected').val();
@@ -1030,44 +1037,68 @@
containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;
else else
containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;
// Force the container to it's actual width
this.container.css({
top: 0,
left: 0,
right: 'auto'
});
var containerWidth = this.container.outerWidth();
this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('drop-up'); this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('drop-up');
if (this.opens == 'left') { if (this.opens == 'left') {
var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth();
if (containerWidth + containerRight > $(window).width()) {
this.container.css({ this.container.css({
top: containerTop, top: containerTop,
right: parentRightEdge - this.element.offset().left - this.element.outerWidth(),
left: 'auto'
});
if (this.container.offset().left < 0) {
this.container.css({
right: 'auto', right: 'auto',
left: 9 left: 9
}); });
}
} else if (this.opens == 'center') {
this.container.css({
top: containerTop,
left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2
- this.container.outerWidth() / 2,
right: 'auto'
});
if (this.container.offset().left < 0) {
this.container.css({
right: 'auto',
left: 9
});
}
} else { } else {
this.container.css({ this.container.css({
top: containerTop, top: containerTop,
left: this.element.offset().left - parentOffset.left, right: containerRight,
right: 'auto' left: 'auto'
}); });
if (this.container.offset().left + this.container.outerWidth() > $(window).width()) { }
} else if (this.opens == 'center') {
var containerLeft = this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2
- containerWidth / 2;
if (containerLeft < 0) {
this.container.css({ this.container.css({
top: containerTop,
right: 'auto',
left: 9
});
} else if (containerLeft + containerWidth > $(window).width()) {
this.container.css({
top: containerTop,
left: 'auto', left: 'auto',
right: 0 right: 0
}); });
} else {
this.container.css({
top: containerTop,
left: containerLeft,
right: 'auto'
});
}
} else {
var containerLeft = this.element.offset().left - parentOffset.left;
if (containerLeft + containerWidth > $(window).width()) {
this.container.css({
top: containerTop,
left: 'auto',
right: 0
});
} else {
this.container.css({
top: containerTop,
left: containerLeft,
right: 'auto'
});
} }
} }
}, },
@@ -1272,6 +1303,9 @@
hour = 0; hour = 0;
} }
var minute = parseInt(this.container.find('.left .minuteselect').val(), 10); var minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
if (isNaN(minute)) {
minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10);
}
var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
date = date.clone().hour(hour).minute(minute).second(second); date = date.clone().hour(hour).minute(minute).second(second);
} }
@@ -1292,6 +1326,9 @@
hour = 0; hour = 0;
} }
var minute = parseInt(this.container.find('.right .minuteselect').val(), 10); var minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
if (isNaN(minute)) {
minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10);
}
var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
date = date.clone().hour(hour).minute(minute).second(second); date = date.clone().hour(hour).minute(minute).second(second);
} }
@@ -1320,7 +1357,7 @@
var i = 0; var i = 0;
for (var range in this.ranges) { for (var range in this.ranges) {
if (this.timePicker) { if (this.timePicker) {
var format = this.timePickerSeconds ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD hh:mm"; var format = this.timePickerSeconds ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm";
//ignore times when comparing dates if time picker seconds is not enabled //ignore times when comparing dates if time picker seconds is not enabled
if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) { if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) {
customRange = false; customRange = false;
@@ -1408,6 +1445,9 @@
var hour = parseInt(cal.find('.hourselect').val(), 10); var hour = parseInt(cal.find('.hourselect').val(), 10);
var minute = parseInt(cal.find('.minuteselect').val(), 10); var minute = parseInt(cal.find('.minuteselect').val(), 10);
if (isNaN(minute)) {
minute = parseInt(cal.find('.minuteselect option:last').val(), 10);
}
var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0; var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0;
if (!this.timePicker24Hour) { if (!this.timePicker24Hour) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.4 * Vue.js v2.6.10
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@@ -481,7 +481,7 @@
* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
* skipping \u10000-\uEFFFF due to it freezing up PhantomJS * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
*/ */
var unicodeLetters = 'a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD'; var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
/** /**
* Check if a string starts with $ or _ * Check if a string starts with $ or _
@@ -506,7 +506,7 @@
/** /**
* Parse simple path. * Parse simple path.
*/ */
var bailRE = new RegExp(("[^" + unicodeLetters + ".$_\\d]")); var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
function parsePath (path) { function parsePath (path) {
if (bailRE.test(path)) { if (bailRE.test(path)) {
return return
@@ -1410,7 +1410,7 @@
} }
function validateComponentName (name) { function validateComponentName (name) {
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + unicodeLetters + "]*$")).test(name)) { if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
warn( warn(
'Invalid component name: "' + name + '". Component names ' + 'Invalid component name: "' + name + '". Component names ' +
'should conform to valid custom element name in html5 specification.' 'should conform to valid custom element name in html5 specification.'
@@ -1825,6 +1825,10 @@
/* */ /* */
function handleError (err, vm, info) { function handleError (err, vm, info) {
// Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
// See: https://github.com/vuejs/vuex/issues/1505
pushTarget();
try {
if (vm) { if (vm) {
var cur = vm; var cur = vm;
while ((cur = cur.$parent)) { while ((cur = cur.$parent)) {
@@ -1842,6 +1846,9 @@
} }
} }
globalHandleError(err, vm, info); globalHandleError(err, vm, info);
} finally {
popTarget();
}
} }
function invokeWithErrorHandling ( function invokeWithErrorHandling (
@@ -1854,8 +1861,11 @@
var res; var res;
try { try {
res = args ? handler.apply(context, args) : handler.call(context); res = args ? handler.apply(context, args) : handler.call(context);
if (res && !res._isVue && isPromise(res)) { if (res && !res._isVue && isPromise(res) && !res._handled) {
res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
// issue #9511
// avoid catch triggering multiple times when nested calls
res._handled = true;
} }
} catch (e) { } catch (e) {
handleError(e, vm, info); handleError(e, vm, info);
@@ -2538,26 +2548,37 @@
prevSlots prevSlots
) { ) {
var res; var res;
var hasNormalSlots = Object.keys(normalSlots).length > 0;
var isStable = slots ? !!slots.$stable : !hasNormalSlots;
var key = slots && slots.$key;
if (!slots) { if (!slots) {
res = {}; res = {};
} else if (slots._normalized) { } else if (slots._normalized) {
// fast path 1: child component re-render only, parent did not change // fast path 1: child component re-render only, parent did not change
return slots._normalized return slots._normalized
} else if (slots.$stable && prevSlots && prevSlots !== emptyObject) { } else if (
// fast path 2: stable scoped slots, only need to normalize once isStable &&
prevSlots &&
prevSlots !== emptyObject &&
key === prevSlots.$key &&
!hasNormalSlots &&
!prevSlots.$hasNormal
) {
// fast path 2: stable scoped slots w/ no normal slots to proxy,
// only need to normalize once
return prevSlots return prevSlots
} else { } else {
res = {}; res = {};
for (var key in slots) { for (var key$1 in slots) {
if (slots[key] && key[0] !== '$') { if (slots[key$1] && key$1[0] !== '$') {
res[key] = normalizeScopedSlot(normalSlots, key, slots[key]); res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
} }
} }
} }
// expose normal slots on scopedSlots // expose normal slots on scopedSlots
for (var key$1 in normalSlots) { for (var key$2 in normalSlots) {
if (!(key$1 in res)) { if (!(key$2 in res)) {
res[key$1] = proxyNormalSlot(normalSlots, key$1); res[key$2] = proxyNormalSlot(normalSlots, key$2);
} }
} }
// avoriaz seems to mock a non-extensible $scopedSlots object // avoriaz seems to mock a non-extensible $scopedSlots object
@@ -2565,18 +2586,22 @@
if (slots && Object.isExtensible(slots)) { if (slots && Object.isExtensible(slots)) {
(slots)._normalized = res; (slots)._normalized = res;
} }
def(res, '$stable', slots ? !!slots.$stable : true); def(res, '$stable', isStable);
def(res, '$key', key);
def(res, '$hasNormal', hasNormalSlots);
return res return res
} }
function normalizeScopedSlot(normalSlots, key, fn) { function normalizeScopedSlot(normalSlots, key, fn) {
var normalized = function (scope) { var normalized = function () {
var res = fn(scope || {}); var res = arguments.length ? fn.apply(null, arguments) : fn({});
res = res && typeof res === 'object' && !Array.isArray(res) res = res && typeof res === 'object' && !Array.isArray(res)
? [res] // single vnode ? [res] // single vnode
: normalizeChildren(res); : normalizeChildren(res);
return res && res.length === 0 return res && (
? undefined res.length === 0 ||
(res.length === 1 && res[0].isComment) // #9658
) ? undefined
: res : res
}; };
// this is a slot using the new v-slot syntax without scope. although it is // this is a slot using the new v-slot syntax without scope. although it is
@@ -2756,12 +2781,13 @@
: data.attrs || (data.attrs = {}); : data.attrs || (data.attrs = {});
} }
var camelizedKey = camelize(key); var camelizedKey = camelize(key);
if (!(key in hash) && !(camelizedKey in hash)) { var hyphenatedKey = hyphenate(key);
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
hash[key] = value[key]; hash[key] = value[key];
if (isSync) { if (isSync) {
var on = data.on || (data.on = {}); var on = data.on || (data.on = {});
on[("update:" + camelizedKey)] = function ($event) { on[("update:" + key)] = function ($event) {
value[key] = $event; value[key] = $event;
}; };
} }
@@ -2860,14 +2886,16 @@
function resolveScopedSlots ( function resolveScopedSlots (
fns, // see flow/vnode fns, // see flow/vnode
res,
// the following are added in 2.6
hasDynamicKeys, hasDynamicKeys,
res contentHashKey
) { ) {
res = res || { $stable: !hasDynamicKeys }; res = res || { $stable: !hasDynamicKeys };
for (var i = 0; i < fns.length; i++) { for (var i = 0; i < fns.length; i++) {
var slot = fns[i]; var slot = fns[i];
if (Array.isArray(slot)) { if (Array.isArray(slot)) {
resolveScopedSlots(slot, hasDynamicKeys, res); resolveScopedSlots(slot, res, hasDynamicKeys);
} else if (slot) { } else if (slot) {
// marker for reverse proxying v-slot without scope on this.$slots // marker for reverse proxying v-slot without scope on this.$slots
if (slot.proxy) { if (slot.proxy) {
@@ -2876,6 +2904,9 @@
res[slot.key] = slot.fn; res[slot.key] = slot.fn;
} }
} }
if (contentHashKey) {
(res).$key = contentHashKey;
}
return res return res
} }
@@ -3590,17 +3621,23 @@
return factory.resolved return factory.resolved
} }
var owner = currentRenderingInstance;
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
// already pending
factory.owners.push(owner);
}
if (isTrue(factory.loading) && isDef(factory.loadingComp)) { if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
return factory.loadingComp return factory.loadingComp
} }
var owner = currentRenderingInstance; if (owner && !isDef(factory.owners)) {
if (isDef(factory.owners)) {
// already pending
factory.owners.push(owner);
} else {
var owners = factory.owners = [owner]; var owners = factory.owners = [owner];
var sync = true; var sync = true;
var timerLoading = null;
var timerTimeout = null
;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
var forceRender = function (renderCompleted) { var forceRender = function (renderCompleted) {
for (var i = 0, l = owners.length; i < l; i++) { for (var i = 0, l = owners.length; i < l; i++) {
@@ -3609,6 +3646,14 @@
if (renderCompleted) { if (renderCompleted) {
owners.length = 0; owners.length = 0;
if (timerLoading !== null) {
clearTimeout(timerLoading);
timerLoading = null;
}
if (timerTimeout !== null) {
clearTimeout(timerTimeout);
timerTimeout = null;
}
} }
}; };
@@ -3655,7 +3700,8 @@
if (res.delay === 0) { if (res.delay === 0) {
factory.loading = true; factory.loading = true;
} else { } else {
setTimeout(function () { timerLoading = setTimeout(function () {
timerLoading = null;
if (isUndef(factory.resolved) && isUndef(factory.error)) { if (isUndef(factory.resolved) && isUndef(factory.error)) {
factory.loading = true; factory.loading = true;
forceRender(false); forceRender(false);
@@ -3665,7 +3711,8 @@
} }
if (isDef(res.timeout)) { if (isDef(res.timeout)) {
setTimeout(function () { timerTimeout = setTimeout(function () {
timerTimeout = null;
if (isUndef(factory.resolved)) { if (isUndef(factory.resolved)) {
reject( reject(
"timeout (" + (res.timeout) + "ms)" "timeout (" + (res.timeout) + "ms)"
@@ -4053,9 +4100,12 @@
// check if there are dynamic scopedSlots (hand-written or compiled but with // check if there are dynamic scopedSlots (hand-written or compiled but with
// dynamic slot names). Static scoped slots compiled from template has the // dynamic slot names). Static scoped slots compiled from template has the
// "$stable" marker. // "$stable" marker.
var newScopedSlots = parentVnode.data.scopedSlots;
var oldScopedSlots = vm.$scopedSlots;
var hasDynamicScopedSlot = !!( var hasDynamicScopedSlot = !!(
(parentVnode.data.scopedSlots && !parentVnode.data.scopedSlots.$stable) || (newScopedSlots && !newScopedSlots.$stable) ||
(vm.$scopedSlots !== emptyObject && !vm.$scopedSlots.$stable) (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
); );
// Any static slot children from the parent may have changed during parent's // Any static slot children from the parent may have changed during parent's
@@ -4208,12 +4258,22 @@
// timestamp can either be hi-res (relative to page load) or low-res // timestamp can either be hi-res (relative to page load) or low-res
// (relative to UNIX epoch), so in order to compare time we have to use the // (relative to UNIX epoch), so in order to compare time we have to use the
// same timestamp type when saving the flush timestamp. // same timestamp type when saving the flush timestamp.
if (inBrowser && getNow() > document.createEvent('Event').timeStamp) { // All IE versions use low-res event timestamps, and have problematic clock
// if the low-res timestamp which is bigger than the event timestamp // implementations (#9632)
// (which is evaluated AFTER) it means the event is using a hi-res timestamp, if (inBrowser && !isIE) {
// and we need to use the hi-res version for event listeners as well. var performance = window.performance;
if (
performance &&
typeof performance.now === 'function' &&
getNow() > document.createEvent('Event').timeStamp
) {
// if the event timestamp, although evaluated AFTER the Date.now(), is
// smaller than it, it means the event is using a hi-res timestamp,
// and we need to use the hi-res version for event listener timestamps as
// well.
getNow = function () { return performance.now(); }; getNow = function () { return performance.now(); };
} }
}
/** /**
* Flush both queues and run the watchers. * Flush both queues and run the watchers.
@@ -5377,7 +5437,7 @@
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.4'; Vue.version = '2.6.10';
/* */ /* */
@@ -7463,9 +7523,19 @@
var original = handler; var original = handler;
handler = original._wrapper = function (e) { handler = original._wrapper = function (e) {
if ( if (
// no bubbling, should always fire.
// this is just a safety net in case event.timeStamp is unreliable in
// certain weird environments...
e.target === e.currentTarget ||
// event is fired after handler attachment
e.timeStamp >= attachedTimestamp || e.timeStamp >= attachedTimestamp ||
// bail for environments that have buggy event.timeStamp implementations
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
// #9681 QtWebEngine event.timeStamp is negative value
e.timeStamp <= 0 ||
// #9448 bail if event is fired in another document in a multi-page // #9448 bail if event is fired in another document in a multi-page
// electron/nw.js app // electron/nw.js app, since event.timeStamp will be using a different
// starting reference
e.target.ownerDocument !== document e.target.ownerDocument !== document
) { ) {
return original.apply(this, arguments) return original.apply(this, arguments)
@@ -7529,10 +7599,11 @@
} }
for (key in oldProps) { for (key in oldProps) {
if (isUndef(props[key])) { if (!(key in props)) {
elm[key] = ''; elm[key] = '';
} }
} }
for (key in props) { for (key in props) {
cur = props[key]; cur = props[key];
// ignore children if the node has textContent or innerHTML, // ignore children if the node has textContent or innerHTML,
@@ -7548,15 +7619,7 @@
} }
} }
// skip the update if old and new VDOM state is the same. if (key === 'value' && elm.tagName !== 'PROGRESS') {
// the only exception is `value` where the DOM value may be temporarily
// out of sync with VDOM state due to focus, composition and modifiers.
// This also covers #4521 by skipping the unnecesarry `checked` update.
if (key !== 'value' && cur === oldProps[key]) {
continue
}
if (key === 'value') {
// store value as _value as well since // store value as _value as well since
// non-string values will be stringified // non-string values will be stringified
elm._value = cur; elm._value = cur;
@@ -7576,8 +7639,18 @@
while (svg.firstChild) { while (svg.firstChild) {
elm.appendChild(svg.firstChild); elm.appendChild(svg.firstChild);
} }
} else { } else if (
// skip the update if old and new VDOM state is the same.
// `value` is handled separately because the DOM value may be temporarily
// out of sync with VDOM state due to focus, composition and modifiers.
// This #4521 by skipping the unnecesarry `checked` update.
cur !== oldProps[key]
) {
// some property updates can throw
// e.g. `value` on <progress> w/ non-finite value
try {
elm[key] = cur; elm[key] = cur;
} catch (e) {}
} }
} }
} }
@@ -8078,8 +8151,8 @@
var context = activeInstance; var context = activeInstance;
var transitionNode = activeInstance.$vnode; var transitionNode = activeInstance.$vnode;
while (transitionNode && transitionNode.parent) { while (transitionNode && transitionNode.parent) {
transitionNode = transitionNode.parent;
context = transitionNode.context; context = transitionNode.context;
transitionNode = transitionNode.parent;
} }
var isAppear = !context._isMounted || !vnode.isRootInsert; var isAppear = !context._isMounted || !vnode.isRootInsert;
@@ -9169,7 +9242,7 @@
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
var startTagClose = /^\s*(\/?)>/; var startTagClose = /^\s*(\/?)>/;
@@ -9431,7 +9504,7 @@
) { ) {
options.warn( options.warn(
("tag <" + (stack[i].tag) + "> has no matching end tag."), ("tag <" + (stack[i].tag) + "> has no matching end tag."),
{ start: stack[i].start } { start: stack[i].start, end: stack[i].end }
); );
} }
if (options.end) { if (options.end) {
@@ -9468,7 +9541,7 @@
var argRE = /:(.*)$/; var argRE = /:(.*)$/;
var bindRE = /^:|^\.|^v-bind:/; var bindRE = /^:|^\.|^v-bind:/;
var modifierRE = /\.[^.]+/g; var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
var slotRE = /^v-slot(:|$)|^#/; var slotRE = /^v-slot(:|$)|^#/;
@@ -9645,7 +9718,7 @@
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref, shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
shouldKeepComment: options.comments, shouldKeepComment: options.comments,
outputSourceRange: options.outputSourceRange, outputSourceRange: options.outputSourceRange,
start: function start (tag, attrs, unary, start$1) { start: function start (tag, attrs, unary, start$1, end) {
// check namespace. // check namespace.
// inherit parent ns if there is one // inherit parent ns if there is one
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag); var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
@@ -9664,6 +9737,7 @@
{ {
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.end = end;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
cumulated[attr.name] = attr; cumulated[attr.name] = attr;
return cumulated return cumulated
@@ -9785,7 +9859,7 @@
text = preserveWhitespace ? ' ' : ''; text = preserveWhitespace ? ' ' : '';
} }
if (text) { if (text) {
if (whitespaceOption === 'condense') { if (!inPre && whitespaceOption === 'condense') {
// condense consecutive whitespaces into single space // condense consecutive whitespaces into single space
text = text.replace(whitespaceRE$1, ' '); text = text.replace(whitespaceRE$1, ' ');
} }
@@ -10646,7 +10720,7 @@
/* */ /* */
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/;
var fnInvokeRE = /\([^)]*?\);*$/; var fnInvokeRE = /\([^)]*?\);*$/;
var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
@@ -10781,7 +10855,13 @@
} }
function genKeyFilter (keys) { function genKeyFilter (keys) {
return ("if(('keyCode' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;") return (
// make sure the key filters only apply to KeyboardEvents
// #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
// key events that do not have keyCode property...
"if(!$event.type.indexOf('key')&&" +
(keys.map(genFilterCode).join('&&')) + ")return null;"
)
} }
function genFilterCode (key) { function genFilterCode (key) {
@@ -11142,26 +11222,68 @@
// components with only scoped slots to skip forced updates from parent. // components with only scoped slots to skip forced updates from parent.
// but in some cases we have to bail-out of this optimization // but in some cases we have to bail-out of this optimization
// for example if the slot contains dynamic names, has v-if or v-for on them... // for example if the slot contains dynamic names, has v-if or v-for on them...
var needsForceUpdate = Object.keys(slots).some(function (key) { var needsForceUpdate = el.for || Object.keys(slots).some(function (key) {
var slot = slots[key]; var slot = slots[key];
return slot.slotTargetDynamic || slot.if || slot.for return (
slot.slotTargetDynamic ||
slot.if ||
slot.for ||
containsSlotChild(slot) // is passing down slot from parent which may be dynamic
)
}); });
// OR when it is inside another scoped slot (the reactivity is disconnected)
// #9438 // #9534: if a component with scoped slots is inside a conditional branch,
// it's possible for the same component to be reused but with different
// compiled slot content. To avoid that, we generate a unique key based on
// the generated code of all the slot contents.
var needsKey = !!el.if;
// OR when it is inside another scoped slot or v-for (the reactivity may be
// disconnected due to the intermediate scope variable)
// #9438, #9506
// TODO: this can be further optimized by properly analyzing in-scope bindings
// and skip force updating ones that do not actually use scope variables.
if (!needsForceUpdate) { if (!needsForceUpdate) {
var parent = el.parent; var parent = el.parent;
while (parent) { while (parent) {
if (parent.slotScope && parent.slotScope !== emptySlotScopeToken) { if (
(parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
parent.for
) {
needsForceUpdate = true; needsForceUpdate = true;
break break
} }
if (parent.if) {
needsKey = true;
}
parent = parent.parent; parent = parent.parent;
} }
} }
return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) { var generatedSlots = Object.keys(slots)
return genScopedSlot(slots[key], state) .map(function (key) { return genScopedSlot(slots[key], state); })
}).join(',')) + "]" + (needsForceUpdate ? ",true" : "") + ")") .join(',');
return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")")
}
function hash(str) {
var hash = 5381;
var i = str.length;
while(i) {
hash = (hash * 33) ^ str.charCodeAt(--i);
}
return hash >>> 0
}
function containsSlotChild (el) {
if (el.type === 1) {
if (el.tag === 'slot') {
return true
}
return el.children.some(containsSlotChild)
}
return false
} }
function genScopedSlot ( function genScopedSlot (
@@ -11486,12 +11608,14 @@
function repeat$1 (str, n) { function repeat$1 (str, n) {
var result = ''; var result = '';
if (n > 0) {
while (true) { // eslint-disable-line while (true) { // eslint-disable-line
if (n & 1) { result += str; } if (n & 1) { result += str; }
n >>>= 1; n >>>= 1;
if (n <= 0) { break } if (n <= 0) { break }
str += str; str += str;
} }
}
return result return result
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,21 +1,21 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script> <script type="text/javascript" src="js/jquery-3.4.0.min.js"></script>
<script type="text/javascript" src="js/moment-2.24.0.min.js"></script> <script type="text/javascript" src="js/moment-2.24.0.min.js"></script>
<script type="text/javascript" src="js/daterangepicker-3.0.3.js"></script> <script type="text/javascript" src="js/daterangepicker-3.0.4.js"></script>
<script type="text/javascript" src="js/invaders.js"></script> <script type="text/javascript" src="js/invaders.js"></script>
{{#isProduction}} {{#isProduction}}
<script type="text/javascript" src="js/vue-2.6.4.min.js"></script> <script type="text/javascript" src="js/vue-2.6.10.min.js"></script>
{{/isProduction}} {{/isProduction}}
{{^isProduction}} {{^isProduction}}
<script type="text/javascript" src="js/vue-2.6.4-dev.js"></script> <script type="text/javascript" src="js/vue-2.6.10-dev.js"></script>
{{/isProduction}} {{/isProduction}}
<script type="text/javascript" src="js/ui.js"></script> <script type="text/javascript" src="js/ui.js"></script>
<link rel="stylesheet" type="text/css" href="css/design.css"> <link rel="stylesheet" type="text/css" href="css/design.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/invaders.css"> <link rel="stylesheet" type="text/css" href="css/invaders.css">
<link rel="stylesheet" type="text/css" href="css/daterangepicker-3.0.3.css" /> <link rel="stylesheet" type="text/css" href="css/daterangepicker-3.0.4.css" />
</head> </head>