vanilla-calendar-picker
Advanced tools
Comparing version 2.11.2 to 2.11.3
{ | ||
"name": "vanilla-calendar-picker", | ||
"version": "2.11.2", | ||
"version": "2.11.3", | ||
"description": "Vanilla Calendar is a versatile JavaScript date and time picker with TypeScript support, making it compatible with any JavaScript framework or library. It is designed to be lightweight, simple to use, and feature-rich without relying on external dependencies.", | ||
@@ -57,6 +57,4 @@ "homepage": "https://github.com/ghiscoding/vanilla-calendar-picker", | ||
"./package.json": "./package.json", | ||
"./build/vanilla-calendar.min.css": "./build/vanilla-calendar.min.css", | ||
"./build/vanilla-calendar.layout.min.css": "./build/vanilla-calendar.layout.min.css", | ||
"./build/themes/light.min.css": "./build/themes/light.min.css", | ||
"./build/themes/dark.min.css": "./build/themes/dark.min.css" | ||
"./build/*": "./build/*", | ||
"./build/themes/*": "./build/themes/*" | ||
}, | ||
@@ -63,0 +61,0 @@ "devDependencies": {}, |
/*! name: vanilla-calendar-picker | url: https://github.com/uvarov-frontend/vanilla-calendar-picker */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VanillaCalendarUtilities={})}(this,(function(e){"use strict";const t=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,n=e=>new Date(`${e}T00:00:00`);e.getDate=e=>n(e),e.getDateString=e=>t(e),e.parseDates=e=>(e=>e.reduce(((e,a)=>{if(a instanceof Date||"number"==typeof a){const t=a instanceof Date?a:new Date(a);e.push(t.toISOString().substring(0,10))}else a.match(/^(\d{4}-\d{2}-\d{2})$/g)?e.push(a):a.replace(/(\d{4}-\d{2}-\d{2}).*?(\d{4}-\d{2}-\d{2})/g,((a,i,o)=>{const r=n(i),d=n(o),s=new Date(r.getTime());for(;s<=d;s.setDate(s.getDate()+1))e.push(t(s));return a}));return e}),[]))(e),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); | ||
(function(global, factory) { | ||
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.VanillaCalendarUtilities = {})); | ||
})(this, function(exports2) { | ||
"use strict"; | ||
const getDateString$1 = (date) => { | ||
const year = date.getFullYear(); | ||
const month = String(date.getMonth() + 1).padStart(2, "0"); | ||
const day = String(date.getDate()).padStart(2, "0"); | ||
return `${year}-${month}-${day}`; | ||
}; | ||
const getDate$1 = (date) => /* @__PURE__ */ new Date(`${date}T00:00:00`); | ||
const parseDates$1 = (dates) => dates.reduce((accumulator, date) => { | ||
if (date instanceof Date || typeof date === "number") { | ||
const d = date instanceof Date ? date : new Date(date); | ||
accumulator.push(d.toISOString().substring(0, 10)); | ||
} else if (date.match(/^(\d{4}-\d{2}-\d{2})$/g)) { | ||
accumulator.push(date); | ||
} else { | ||
date.replace(/(\d{4}-\d{2}-\d{2}).*?(\d{4}-\d{2}-\d{2})/g, (_, startDateStr, endDateStr) => { | ||
const startDate = getDate$1(startDateStr); | ||
const endDate = getDate$1(endDateStr); | ||
const currentDate = new Date(startDate.getTime()); | ||
for (currentDate; currentDate <= endDate; currentDate.setDate(currentDate.getDate() + 1)) { | ||
accumulator.push(getDateString$1(currentDate)); | ||
} | ||
return _; | ||
}); | ||
} | ||
return accumulator; | ||
}, []); | ||
const parseDates = (dates) => parseDates$1(dates); | ||
const getDateString = (date) => getDateString$1(date); | ||
const getDate = (date) => getDate$1(date); | ||
exports2.getDate = getDate; | ||
exports2.getDateString = getDateString; | ||
exports2.parseDates = parseDates; | ||
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" }); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
426619
5424
1