@fullcalendar/luxon
Advanced tools
Comparing version 5.3.1 to 5.4.0
/*! | ||
FullCalendar v5.3.1 | ||
FullCalendar v5.3.2 | ||
Docs & License: https://fullcalendar.io/ | ||
@@ -28,3 +28,3 @@ (c) 2020 Adam Shaw | ||
({ __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]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -57,3 +57,3 @@ }; | ||
zone: dateEnv.timeZone, | ||
locale: dateEnv.locale.codes[0] | ||
locale: dateEnv.locale.codes[0], | ||
}); | ||
@@ -78,3 +78,3 @@ } | ||
return luxonToArray(luxon.DateTime.fromMillis(ms, { | ||
zone: this.timeZoneName | ||
zone: this.timeZoneName, | ||
})); | ||
@@ -95,3 +95,3 @@ }; | ||
cmdFormatter: formatWithCmdStr, | ||
namedTimeZonedImpl: LuxonNamedTimeZone | ||
namedTimeZonedImpl: LuxonNamedTimeZone, | ||
}); | ||
@@ -106,3 +106,3 @@ function luxonToArray(datetime) { | ||
datetime.second, | ||
datetime.millisecond | ||
datetime.millisecond, | ||
]; | ||
@@ -120,3 +120,3 @@ } | ||
second: arr[5], | ||
millisecond: arr[6] | ||
millisecond: arr[6], | ||
}); | ||
@@ -132,13 +132,11 @@ } | ||
tail: parts[3], | ||
whole: parts[1] + middle.whole + parts[3] | ||
whole: parts[1] + middle.whole + parts[3], | ||
}; | ||
} | ||
else { | ||
return { | ||
head: null, | ||
middle: null, | ||
tail: null, | ||
whole: cmdStr | ||
}; | ||
} | ||
return { | ||
head: null, | ||
middle: null, | ||
tail: null, | ||
whole: cmdStr, | ||
}; | ||
} | ||
@@ -164,5 +162,3 @@ function formatRange(cmd, formatStart, formatEnd, separator) { | ||
} | ||
else { | ||
return startWhole + separator + endWhole; | ||
} | ||
return startWhole + separator + endWhole; | ||
} | ||
@@ -176,4 +172,6 @@ | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
return exports; | ||
}({}, FullCalendar, luxon)); |
/*! | ||
FullCalendar v5.3.1 | ||
FullCalendar v5.3.2 | ||
Docs & License: https://fullcalendar.io/ | ||
(c) 2020 Adam Shaw | ||
*/ | ||
var FullCalendarLuxon=function(e,t,r){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.offsetForArray=function(e){return l(e,this.timeZoneName).offset},t.prototype.timestampToArray=function(e){return[(t=r.DateTime.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t},t}(t.NamedTimeZoneImpl);var i=t.createPlugin({cmdFormatter:function(e,t){var r=function e(t){var r=t.match(/^(.*?)\{(.*)\}(.*)$/);if(r){var n=e(r[2]);return{head:r[1],middle:n,tail:r[3],whole:r[1]+n.whole+r[3]}}return{head:null,middle:null,tail:null,whole:t}}(e);if(t.end){var n=l(t.start.array,t.timeZone,t.localeCodes[0]),o=l(t.end.array,t.timeZone,t.localeCodes[0]);return function e(t,r,n,o){if(t.middle){var a=r(t.head),i=e(t.middle,r,n,o),l=r(t.tail),u=n(t.head),c=e(t.middle,r,n,o),d=n(t.tail);if(a===u&&l===d)return a+(i===c?i:i+o+c)+l}var m=r(t.whole),f=n(t.whole);return m===f?m:m+o+f}(r,n.toFormat.bind(n),o.toFormat.bind(o),t.defaultSeparator)}return l(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(r.whole)},namedTimeZonedImpl:a});function l(e,t,n){return r.DateTime.fromObject({zone:t,locale:n,year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]})}return t.globalPlugins.push(i),e.default=i,e.toLuxonDateTime=function(e,n){if(!(n instanceof t.CalendarApi))throw new Error("must supply a CalendarApi instance");var o=n.getCurrentData().dateEnv;return r.DateTime.fromJSDate(e,{zone:o.timeZone,locale:o.locale.codes[0]})},e.toLuxonDuration=function(e,n){if(!(n instanceof t.CalendarApi))throw new Error("must supply a CalendarApi instance");var a=n.getCurrentData().dateEnv;return r.Duration.fromObject(o(o({},e),{locale:a.locale.codes[0]}))},e}({},FullCalendar,luxon); | ||
var FullCalendarLuxon=function(e,t,r){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.offsetForArray=function(e){return l(e,this.timeZoneName).offset},t.prototype.timestampToArray=function(e){return[(t=r.DateTime.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t},t}(t.NamedTimeZoneImpl);var i=t.createPlugin({cmdFormatter:function(e,t){var r=function e(t){var r=t.match(/^(.*?)\{(.*)\}(.*)$/);if(r){var n=e(r[2]);return{head:r[1],middle:n,tail:r[3],whole:r[1]+n.whole+r[3]}}return{head:null,middle:null,tail:null,whole:t}}(e);if(t.end){var n=l(t.start.array,t.timeZone,t.localeCodes[0]),o=l(t.end.array,t.timeZone,t.localeCodes[0]);return function e(t,r,n,o){if(t.middle){var a=r(t.head),i=e(t.middle,r,n,o),l=r(t.tail),u=n(t.head),c=e(t.middle,r,n,o),d=n(t.tail);if(a===u&&l===d)return a+(i===c?i:i+o+c)+l}var f=r(t.whole),m=n(t.whole);if(f===m)return f;return f+o+m}(r,n.toFormat.bind(n),o.toFormat.bind(o),t.defaultSeparator)}return l(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(r.whole)},namedTimeZonedImpl:a});function l(e,t,n){return r.DateTime.fromObject({zone:t,locale:n,year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]})}return t.globalPlugins.push(i),e.default=i,e.toLuxonDateTime=function(e,n){if(!(n instanceof t.CalendarApi))throw new Error("must supply a CalendarApi instance");var o=n.getCurrentData().dateEnv;return r.DateTime.fromJSDate(e,{zone:o.timeZone,locale:o.locale.codes[0]})},e.toLuxonDuration=function(e,n){if(!(n instanceof t.CalendarApi))throw new Error("must supply a CalendarApi instance");var a=n.getCurrentData().dateEnv;return r.Duration.fromObject(o(o({},e),{locale:a.locale.codes[0]}))},Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,luxon); |
32
main.js
/*! | ||
FullCalendar v5.3.1 | ||
FullCalendar v5.3.2 | ||
Docs & License: https://fullcalendar.io/ | ||
@@ -17,3 +17,3 @@ (c) 2020 Adam Shaw | ||
zone: dateEnv.timeZone, | ||
locale: dateEnv.locale.codes[0] | ||
locale: dateEnv.locale.codes[0], | ||
}); | ||
@@ -38,3 +38,3 @@ } | ||
return luxonToArray(DateTime.fromMillis(ms, { | ||
zone: this.timeZoneName | ||
zone: this.timeZoneName, | ||
})); | ||
@@ -55,3 +55,3 @@ }; | ||
cmdFormatter: formatWithCmdStr, | ||
namedTimeZonedImpl: LuxonNamedTimeZone | ||
namedTimeZonedImpl: LuxonNamedTimeZone, | ||
}); | ||
@@ -66,3 +66,3 @@ function luxonToArray(datetime) { | ||
datetime.second, | ||
datetime.millisecond | ||
datetime.millisecond, | ||
]; | ||
@@ -80,3 +80,3 @@ } | ||
second: arr[5], | ||
millisecond: arr[6] | ||
millisecond: arr[6], | ||
}); | ||
@@ -92,13 +92,11 @@ } | ||
tail: parts[3], | ||
whole: parts[1] + middle.whole + parts[3] | ||
whole: parts[1] + middle.whole + parts[3], | ||
}; | ||
} | ||
else { | ||
return { | ||
head: null, | ||
middle: null, | ||
tail: null, | ||
whole: cmdStr | ||
}; | ||
} | ||
return { | ||
head: null, | ||
middle: null, | ||
tail: null, | ||
whole: cmdStr, | ||
}; | ||
} | ||
@@ -124,5 +122,3 @@ function formatRange(cmd, formatStart, formatEnd, separator) { | ||
} | ||
else { | ||
return startWhole + separator + endWhole; | ||
} | ||
return startWhole + separator + endWhole; | ||
} | ||
@@ -129,0 +125,0 @@ |
{ | ||
"name": "@fullcalendar/luxon", | ||
"version": "5.3.1", | ||
"version": "5.4.0", | ||
"title": "FullCalendar Luxon Plugin", | ||
@@ -8,4 +8,4 @@ "description": "A connector to the Luxon date library", | ||
"dependencies": { | ||
"@fullcalendar/common": "~5.3.1", | ||
"tslib": "^2.0.0" | ||
"@fullcalendar/common": "~5.4.0", | ||
"tslib": "^2.0.3" | ||
}, | ||
@@ -16,6 +16,7 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@fullcalendar/core-preact": "5.4.0", | ||
"luxon": "^1.12.1" | ||
}, | ||
"type": "module", | ||
"main": "main.js", | ||
"main": "main.cjs.js", | ||
"module": "main.js", | ||
"types": "main.d.ts", | ||
@@ -37,2 +38,2 @@ "jsdelivr": "main.global.min.js", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27874
9
408
2
No
+ Added@fullcalendar/common@5.4.0(transitive)
- Removed@fullcalendar/common@5.3.1(transitive)
Updated@fullcalendar/common@~5.4.0
Updatedtslib@^2.0.3