Browse Source

Fix luxon for cms kit

pull/5569/head
Halil İbrahim Kalkan 6 years ago
parent
commit
25e391c4b9
  1. 151
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.js
  2. 6
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.js.map
  3. 6
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.min.js
  4. 6
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.min.js.map

151
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.js

@ -127,11 +127,7 @@ var luxon = (function (exports) {
if (typeof o === "string") return _arrayLikeToArray(o, minLen); if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1); var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Object" && o.constructor) n = o.constructor.name;
<<<<<<< HEAD
if (n === "Map" || n === "Set") return Array.from(n);
=======
if (n === "Map" || n === "Set") return Array.from(o); if (n === "Map" || n === "Set") return Array.from(o);
>>>>>>> rel-3.2
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
} }
@ -286,15 +282,6 @@ var luxon = (function (exports) {
month: s, month: s,
day: n day: n
}; };
<<<<<<< HEAD
var DATE_MED_WITH_WEEKDAY = {
year: n,
month: s,
day: n,
weekday: s
};
=======
>>>>>>> rel-3.2
var DATE_FULL = { var DATE_FULL = {
year: n, year: n,
month: l, month: l,
@ -677,21 +664,6 @@ var luxon = (function (exports) {
return normalized; return normalized;
} }
function formatOffset(offset, format) { function formatOffset(offset, format) {
<<<<<<< HEAD
var hours = Math.trunc(Math.abs(offset / 60)),
minutes = Math.trunc(Math.abs(offset % 60)),
sign = offset >= 0 ? "+" : "-";
switch (format) {
case "short":
return "" + sign + padStart(hours, 2) + ":" + padStart(minutes, 2);
case "narrow":
return "" + sign + hours + (minutes > 0 ? ":" + minutes : "");
case "techie":
return "" + sign + padStart(hours, 2) + padStart(minutes, 2);
=======
var hours = Math.trunc(offset / 60), var hours = Math.trunc(offset / 60),
minutes = Math.abs(offset % 60), minutes = Math.abs(offset % 60),
sign = hours >= 0 && !Object.is(hours, -0) ? "+" : "-", sign = hours >= 0 && !Object.is(hours, -0) ? "+" : "-",
@ -706,7 +678,6 @@ var luxon = (function (exports) {
case "techie": case "techie":
return "" + sign + padStart(Math.abs(hours), 2) + padStart(minutes, 2); return "" + sign + padStart(Math.abs(hours), 2) + padStart(minutes, 2);
>>>>>>> rel-3.2
default: default:
throw new RangeError("Value format " + format + " is out of range for property format"); throw new RangeError("Value format " + format + " is out of range for property format");
@ -859,12 +830,6 @@ var luxon = (function (exports) {
case stringify(DATE_MED): case stringify(DATE_MED):
return "LLL d, yyyy"; return "LLL d, yyyy";
<<<<<<< HEAD
case stringify(DATE_MED_WITH_WEEKDAY):
return "EEE, LLL d, yyyy";
=======
>>>>>>> rel-3.2
case stringify(DATE_FULL): case stringify(DATE_FULL):
return "LLLL d, yyyy"; return "LLLL d, yyyy";
@ -2972,11 +2937,7 @@ var luxon = (function (exports) {
var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,
<<<<<<< HEAD
isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,
=======
isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/, isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,
>>>>>>> rel-3.2
isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + offsetRegex.source + "?"), isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + offsetRegex.source + "?"),
isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"), isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"),
isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,
@ -3026,11 +2987,7 @@ var luxon = (function (exports) {
} // ISO duration parsing } // ISO duration parsing
<<<<<<< HEAD
var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
=======
var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?)$/; var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?)$/;
>>>>>>> rel-3.2
function extractISODuration(match) { function extractISODuration(match) {
var s = match[0], var s = match[0],
@ -3218,10 +3175,6 @@ var luxon = (function (exports) {
}, },
casualMatrix = Object.assign({ casualMatrix = Object.assign({
years: { years: {
<<<<<<< HEAD
quarters: 4,
=======
>>>>>>> rel-3.2
months: 12, months: 12,
weeks: 52, weeks: 52,
days: 365, days: 365,
@ -3236,10 +3189,6 @@ var luxon = (function (exports) {
days: 91, days: 91,
hours: 91 * 24, hours: 91 * 24,
minutes: 91 * 24 * 60, minutes: 91 * 24 * 60,
<<<<<<< HEAD
seconds: 91 * 24 * 60 * 60,
=======
>>>>>>> rel-3.2
milliseconds: 91 * 24 * 60 * 60 * 1000 milliseconds: 91 * 24 * 60 * 60 * 1000
}, },
months: { months: {
@ -3255,10 +3204,6 @@ var luxon = (function (exports) {
daysInMonthAccurate = 146097.0 / 4800, daysInMonthAccurate = 146097.0 / 4800,
accurateMatrix = Object.assign({ accurateMatrix = Object.assign({
years: { years: {
<<<<<<< HEAD
quarters: 4,
=======
>>>>>>> rel-3.2
months: 12, months: 12,
weeks: daysInYearAccurate / 7, weeks: daysInYearAccurate / 7,
days: daysInYearAccurate, days: daysInYearAccurate,
@ -3812,10 +3757,7 @@ var luxon = (function (exports) {
accumulated = {}, accumulated = {},
vals = this.toObject(); vals = this.toObject();
var lastUnit; var lastUnit;
<<<<<<< HEAD
=======
normalizeValues(this.matrix, vals); normalizeValues(this.matrix, vals);
>>>>>>> rel-3.2
for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits), _step2; !(_step2 = _iterator2()).done;) { for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits), _step2; !(_step2 = _iterator2()).done;) {
var k = _step2.value; var k = _step2.value;
@ -4084,11 +4026,7 @@ var luxon = (function (exports) {
* * **Accessors** Use {@link start} and {@link end} to get the start and end. * * **Accessors** Use {@link start} and {@link end} to get the start and end.
* * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}. * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}.
* * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}. * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}.
<<<<<<< HEAD
* * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}.
=======
* * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs} * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}
>>>>>>> rel-3.2
* * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}. * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}.
*/ */
@ -4209,31 +4147,6 @@ var luxon = (function (exports) {
e = _split[1]; e = _split[1];
if (s && e) { if (s && e) {
<<<<<<< HEAD
var start, startIsValid;
try {
start = DateTime.fromISO(s, opts);
startIsValid = start.isValid;
} catch (e) {
startIsValid = false;
}
var end, endIsValid;
try {
end = DateTime.fromISO(e, opts);
endIsValid = end.isValid;
} catch (e) {
endIsValid = false;
}
if (startIsValid && endIsValid) {
return Interval.fromDateTimes(start, end);
}
if (startIsValid) {
=======
var start = DateTime.fromISO(s, opts), var start = DateTime.fromISO(s, opts),
end = DateTime.fromISO(e, opts); end = DateTime.fromISO(e, opts);
@ -4242,17 +4155,12 @@ var luxon = (function (exports) {
} }
if (start.isValid) { if (start.isValid) {
>>>>>>> rel-3.2
var dur = Duration.fromISO(e, opts); var dur = Duration.fromISO(e, opts);
if (dur.isValid) { if (dur.isValid) {
return Interval.after(start, dur); return Interval.after(start, dur);
} }
<<<<<<< HEAD
} else if (endIsValid) {
=======
} else if (end.isValid) { } else if (end.isValid) {
>>>>>>> rel-3.2
var _dur = Duration.fromISO(s, opts); var _dur = Duration.fromISO(s, opts);
if (_dur.isValid) { if (_dur.isValid) {
@ -4320,11 +4228,7 @@ var luxon = (function (exports) {
; ;
_proto.hasSame = function hasSame(unit) { _proto.hasSame = function hasSame(unit) {
<<<<<<< HEAD
return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;
=======
return this.isValid ? this.e.minus(1).hasSame(this.s, unit) : false; return this.isValid ? this.e.minus(1).hasSame(this.s, unit) : false;
>>>>>>> rel-3.2
} }
/** /**
* Return whether this Interval has the same start and end DateTimes. * Return whether this Interval has the same start and end DateTimes.
@ -4912,11 +4816,7 @@ var luxon = (function (exports) {
/** /**
* Return an array of standalone week names. * Return an array of standalone week names.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
<<<<<<< HEAD
* @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
=======
* @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
>>>>>>> rel-3.2
* @param {Object} opts - options * @param {Object} opts - options
* @param {string} [opts.locale] - the locale code * @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system * @param {string} [opts.numberingSystem=null] - the numbering system
@ -4946,11 +4846,7 @@ var luxon = (function (exports) {
* Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
* changes the string. * changes the string.
* See {@link weekdays} * See {@link weekdays}
<<<<<<< HEAD
* @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
=======
* @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
>>>>>>> rel-3.2
* @param {Object} opts - options * @param {Object} opts - options
* @param {string} [opts.locale=null] - the locale code * @param {string} [opts.locale=null] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system * @param {string} [opts.numberingSystem=null] - the numbering system
@ -5244,22 +5140,6 @@ var luxon = (function (exports) {
}; };
} }
<<<<<<< HEAD
var NBSP = String.fromCharCode(160);
var spaceOrNBSP = "( |" + NBSP + ")";
var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g");
function fixListRegex(s) {
// make dots optional and also make them literal
// make space and non breakable space characters interchangeable
return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP);
}
function stripInsensitivities(s) {
return s.replace(/\./g, "") // ignore dots that were made optional
.replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp
.toLowerCase();
=======
function fixListRegex(s) { function fixListRegex(s) {
// make dots optional and also make them literal // make dots optional and also make them literal
return s.replace(/\./, "\\.?"); return s.replace(/\./, "\\.?");
@ -5267,7 +5147,6 @@ var luxon = (function (exports) {
function stripInsensitivities(s) { function stripInsensitivities(s) {
return s.replace(/\./, "").toLowerCase(); return s.replace(/\./, "").toLowerCase();
>>>>>>> rel-3.2
} }
function oneOf(strings, startIndex) { function oneOf(strings, startIndex) {
@ -6032,22 +5911,6 @@ var luxon = (function (exports) {
function adjustTime(inst, dur) { function adjustTime(inst, dur) {
<<<<<<< HEAD
var oPre = inst.o,
year = inst.c.year + Math.trunc(dur.years),
month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,
c = Object.assign({}, inst.c, {
year: year,
month: month,
day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
}),
millisToAdd = Duration.fromObject({
years: dur.years - Math.trunc(dur.years),
quarters: dur.quarters - Math.trunc(dur.quarters),
months: dur.months - Math.trunc(dur.months),
weeks: dur.weeks - Math.trunc(dur.weeks),
days: dur.days - Math.trunc(dur.days),
=======
var _dur; var _dur;
var keys = Object.keys(dur.values); var keys = Object.keys(dur.values);
@ -6066,7 +5929,6 @@ var luxon = (function (exports) {
day: Math.min(inst.c.day, daysInMonth(year, month)) + dur.days + dur.weeks * 7 day: Math.min(inst.c.day, daysInMonth(year, month)) + dur.days + dur.weeks * 7
}), }),
millisToAdd = Duration.fromObject({ millisToAdd = Duration.fromObject({
>>>>>>> rel-3.2
hours: dur.hours, hours: dur.hours,
minutes: dur.minutes, minutes: dur.minutes,
seconds: dur.seconds, seconds: dur.seconds,
@ -8174,19 +8036,6 @@ var luxon = (function (exports) {
return DATE_MED; return DATE_MED;
} }
/** /**
<<<<<<< HEAD
* {@link toLocaleString} format like 'Fri, Oct 14, 1983'
* @type {Object}
*/
}, {
key: "DATE_MED_WITH_WEEKDAY",
get: function get() {
return DATE_MED_WITH_WEEKDAY;
}
/**
=======
>>>>>>> rel-3.2
* {@link toLocaleString} format like 'October 14, 1983' * {@link toLocaleString} format like 'October 14, 1983'
* @type {Object} * @type {Object}
*/ */

6
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.js.map

File diff suppressed because one or more lines are too long

6
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.min.js

File diff suppressed because one or more lines are too long

6
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/luxon/luxon.min.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save