@paperless/core 0.1.0-alpha.407 → 0.1.0-alpha.409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/{paperless/p-53dca131.entry.js → build/p-75aa8c67.entry.js} +2 -2
- package/dist/build/p-78770cf6.js +2 -0
- package/dist/build/p-78770cf6.js.map +1 -0
- package/dist/build/{p-0309be9d.entry.js → p-7e91daa4.entry.js} +2 -2
- package/dist/build/p-7e91daa4.entry.js.map +1 -0
- package/dist/build/{p-ca41ea7f.entry.js → p-b24e06bd.entry.js} +2 -2
- package/dist/build/p-b24e06bd.entry.js.map +1 -0
- package/dist/build/{p-bbde7cba.entry.js → p-b338c29f.entry.js} +2 -2
- package/dist/build/{p-2b08e371.entry.js → p-b5710d1b.entry.js} +2 -2
- package/dist/{paperless/p-3b6c4710.entry.js → build/p-c8a39486.entry.js} +2 -2
- package/dist/build/p-d3820966.entry.js +2 -0
- package/dist/build/{p-8fb43cc7.entry.js.map → p-d3820966.entry.js.map} +1 -1
- package/dist/{paperless/p-78948e08.entry.js → build/p-f1cb5979.entry.js} +2 -2
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +3 -3
- package/dist/cjs/p-calendar.cjs.entry.js +0 -7
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +13 -20
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-divider.cjs.entry.js +1 -1
- package/dist/cjs/p-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/p-modal-body_4.cjs.entry.js +4 -4
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/cjs/{popper-d7a0f999.js → popper-6eb3f461.js} +4 -5
- package/dist/cjs/popper-6eb3f461.js.map +1 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -1
- package/dist/collection/components/atoms/button/button.component.css +1 -1
- package/dist/collection/components/atoms/divider/divider.component.css +1 -1
- package/dist/collection/components/atoms/icon/icon.component.css +1 -1
- package/dist/collection/components/atoms/loader/loader.component.css +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
- package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -1
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -1
- package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -1
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +0 -7
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +22 -27
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/components/backdrop.component.js +1 -1
- package/dist/components/button.component.js +1 -1
- package/dist/components/calendar.component.js +0 -7
- package/dist/components/calendar.component.js.map +1 -1
- package/dist/components/divider.component.js +1 -1
- package/dist/components/icon.component.js +1 -1
- package/dist/components/loader.component.js +1 -1
- package/dist/components/modal-body.component.js +1 -1
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/modal-container.component.js +1 -1
- package/dist/components/modal-container.component.js.map +1 -1
- package/dist/components/modal-footer.component.js +1 -1
- package/dist/components/modal-header.component.js +1 -1
- package/dist/components/modal-header.component.js.map +1 -1
- package/dist/components/p-datepicker.js +14 -21
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/popper.js +3 -4
- package/dist/components/popper.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-backdrop.entry.js +1 -1
- package/dist/esm/p-button_3.entry.js +3 -3
- package/dist/esm/p-calendar.entry.js +0 -7
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +13 -20
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-divider.entry.js +1 -1
- package/dist/esm/p-dropdown_2.entry.js +1 -1
- package/dist/esm/p-modal-body_4.entry.js +4 -4
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-tooltip.entry.js +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/esm/{popper-42db9fbd.js → popper-d15dbc3d.js} +4 -5
- package/dist/esm/popper-d15dbc3d.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/{build/p-53dca131.entry.js → paperless/p-75aa8c67.entry.js} +2 -2
- package/dist/paperless/p-78770cf6.js +2 -0
- package/dist/paperless/p-78770cf6.js.map +1 -0
- package/dist/paperless/{p-0309be9d.entry.js → p-7e91daa4.entry.js} +2 -2
- package/dist/paperless/p-7e91daa4.entry.js.map +1 -0
- package/dist/paperless/{p-ca41ea7f.entry.js → p-b24e06bd.entry.js} +2 -2
- package/dist/paperless/p-b24e06bd.entry.js.map +1 -0
- package/dist/paperless/{p-bbde7cba.entry.js → p-b338c29f.entry.js} +2 -2
- package/dist/paperless/{p-2b08e371.entry.js → p-b5710d1b.entry.js} +2 -2
- package/dist/{build/p-3b6c4710.entry.js → paperless/p-c8a39486.entry.js} +2 -2
- package/dist/paperless/p-d3820966.entry.js +2 -0
- package/dist/paperless/{p-8fb43cc7.entry.js.map → p-d3820966.entry.js.map} +1 -1
- package/dist/{build/p-78948e08.entry.js → paperless/p-f1cb5979.entry.js} +2 -2
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +5 -5
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +27 -42
- package/package.json +3 -3
- package/dist/build/p-0309be9d.entry.js.map +0 -1
- package/dist/build/p-8fb43cc7.entry.js +0 -2
- package/dist/build/p-ca41ea7f.entry.js.map +0 -1
- package/dist/build/p-f86fcdf4.js +0 -2
- package/dist/build/p-f86fcdf4.js.map +0 -1
- package/dist/cjs/popper-d7a0f999.js.map +0 -1
- package/dist/esm/popper-42db9fbd.js.map +0 -1
- package/dist/paperless/p-0309be9d.entry.js.map +0 -1
- package/dist/paperless/p-8fb43cc7.entry.js +0 -2
- package/dist/paperless/p-ca41ea7f.entry.js.map +0 -1
- package/dist/paperless/p-f86fcdf4.js +0 -2
- package/dist/paperless/p-f86fcdf4.js.map +0 -1
- /package/dist/build/{p-53dca131.entry.js.map → p-75aa8c67.entry.js.map} +0 -0
- /package/dist/build/{p-bbde7cba.entry.js.map → p-b338c29f.entry.js.map} +0 -0
- /package/dist/build/{p-2b08e371.entry.js.map → p-b5710d1b.entry.js.map} +0 -0
- /package/dist/build/{p-3b6c4710.entry.js.map → p-c8a39486.entry.js.map} +0 -0
- /package/dist/build/{p-78948e08.entry.js.map → p-f1cb5979.entry.js.map} +0 -0
- /package/dist/paperless/{p-53dca131.entry.js.map → p-75aa8c67.entry.js.map} +0 -0
- /package/dist/paperless/{p-bbde7cba.entry.js.map → p-b338c29f.entry.js.map} +0 -0
- /package/dist/paperless/{p-2b08e371.entry.js.map → p-b5710d1b.entry.js.map} +0 -0
- /package/dist/paperless/{p-3b6c4710.entry.js.map → p-c8a39486.entry.js.map} +0 -0
- /package/dist/paperless/{p-78948e08.entry.js.map → p-f1cb5979.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-calendar.entry.js","mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE;AACxD,EAAE,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAC7B,EA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,CAAC,QAAQ,CAAC;QAC7B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC/B;QACE,OAAO,KAAK,CAAC;OAChB;KACJ;IAED,OAAO,IAAI,CAAC;GACf;EAEO,gBAAgB;IACpB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAEtC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IAEjC,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;GAC9B;;;;;;;;;;;;;","names":[],"sources":["../../node_modules/date-fns/esm/addDays/index.js","../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/getDay/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getYear/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setDate/index.js","../../node_modules/date-fns/esm/setYear/index.js","./src/components/molecules/calendar/calendar.component.scss?tag=p-calendar&encapsulation=shadow","./src/components/molecules/calendar/calendar.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\n\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\n\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}",":host {\n @apply block bg-white p-2;\n @apply w-[14rem];\n\n .view-day,\n .view-month,\n .view-year {\n @apply flex flex-col gap-2;\n @apply w-full h-[12rem];\n }\n\n .header {\n @apply flex justify-between items-center gap-1;\n @apply text-base;\n @apply w-full;\n\n span {\n @apply cursor-pointer h-8 px-2 rounded text-storm;\n\n &.disabled {\n @apply cursor-default;\n }\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.year {\n @apply font-semibold;\n }\n }\n\n .nav {\n @apply relative flex justify-center items-center cursor-pointer;\n @apply no-underline;\n @apply text-indigo;\n @apply w-6 h-6 rounded-round;\n transition-duration: 0.2s;\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.disabled {\n @apply opacity-0;\n }\n }\n }\n\n .view-day {\n @apply h-auto min-h-[12rem];\n\n .dates {\n @apply grid gap-1;\n grid-template-columns: repeat(7, 1fr);\n\n > span {\n @apply text-storm-medium font-semibold text-xs;\n @apply w-6;\n @apply self-center justify-self-center text-center;\n }\n\n > time {\n @apply flex justify-center items-center;\n @apply cursor-pointer;\n @apply w-6 h-6 box-border;\n @apply justify-self-center self-center;\n @apply rounded-round;\n\n @apply text-storm text-sm;\n @apply border border-solid border-transparent;\n\n transition-duration: 0.2s;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.other-month,\n &.disabled {\n @apply opacity-40 cursor-default;\n }\n\n &.disabled {\n @apply line-through;\n }\n\n &:hover:not(.disabled):not(.active):not(.other-month) {\n @apply bg-indigo-light text-storm;\n }\n }\n }\n }\n\n .view-month,\n .view-year {\n .items {\n @apply relative grid overflow-y-auto gap-1 w-full;\n @apply h-full items-center;\n grid-template-columns: repeat(3, 1fr);\n\n > div {\n @apply cursor-pointer;\n @apply flex justify-center items-center;\n @apply text-sm h-8 px-2 rounded;\n @apply text-storm;\n @apply border border-solid border-transparent;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.disabled {\n @apply line-through;\n @apply opacity-40 cursor-default;\n }\n\n &:hover:not(.disabled):not(.active) {\n @apply bg-mystic;\n }\n }\n }\n }\n\n .view-month {\n .items {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .view-year {\n .header {\n @apply justify-center;\n }\n }\n}\n\n:host(.variant-default) {\n @apply rounded shadow-4;\n}\n\n:host(.variant-embedded) {\n @apply p-0;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n addDays,\n addMonths,\n addYears,\n endOfMonth,\n format,\n getDay,\n getDaysInMonth,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isSameYear,\n isValid,\n setDate,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n} from 'date-fns';\n\n@Component({\n tag: 'p-calendar',\n styleUrl: 'calendar.component.scss',\n shadow: true,\n})\nexport class Calendar {\n /**\n * The variant of the button\n */\n @Prop() variant: 'default' | 'embedded' = 'default';\n\n /**\n * The current value\n */\n @Prop() value?: Date | 'string';\n\n /**\n * Wether to automatically preselect today\n */\n @Prop() preselectToday: boolean = false;\n\n /**\n * Disabled dates\n */\n @Prop() disabledDates?: Array<Date | 'string'> | string;\n\n /**\n * Min date\n */\n @Prop() minDate: Date | 'string' = new Date(1970, 0, 1);\n\n /**\n * Max date\n */\n @Prop() maxDate: Date | 'string' = this._getAutomaticMax();\n\n /**\n * Wether to disable the weekends\n */\n @Prop() disableWeekends: boolean = false;\n\n /**\n * The mode of the datepicker\n */\n @Prop() mode: 'year' | 'month' | 'day' = 'day';\n\n /**\n * Event when the value changes\n */\n @Event() valueChange: EventEmitter<any>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _today = new Date();\n @State() private _view: 'year' | 'month' | 'day' = this.mode;\n @State() private _viewDate = this._today;\n\n @State() private _value: Date;\n @State() private _minDate: Date;\n @State() private _maxDate: Date;\n @State() private _disabledDates: Date[] = [];\n\n private _weekDays = Array.from(Array(7).keys());\n\n componentWillLoad() {\n if (this.disabledDates) {\n this._parseDisabledDates(this.disabledDates);\n }\n\n if (this.minDate) {\n this._parseMinDate(this.minDate);\n }\n\n if (this.maxDate) {\n this._parseMaxDate(this.maxDate);\n }\n\n this._parseValue(this.value);\n\n if (this._value) {\n this._viewDate = this._value;\n }\n }\n\n componentDidRender() {\n if (this._view === 'year') {\n this._scrollYearIntoView();\n }\n }\n\n @Watch('value')\n private _parseValue(value: string | Date) {\n console.log('[Calendar] parse value', value, this._el);\n if (!value && this.preselectToday) {\n value = new Date();\n }\n\n if (typeof value === 'string') {\n value = new Date(value);\n }\n\n this._setValue(value);\n }\n\n @Watch('minDate')\n private _parseMinDate(minDate: string | Date) {\n if (typeof minDate === 'string') {\n minDate = new Date(minDate);\n }\n\n if (!isValid(minDate)) {\n return;\n }\n\n this._minDate = minDate;\n }\n\n @Watch('maxDate')\n private _parseMaxDate(maxDate: string | Date) {\n if (typeof maxDate === 'string') {\n maxDate = new Date(maxDate);\n }\n\n if (!isValid(maxDate)) {\n return;\n }\n\n this._maxDate = maxDate;\n }\n\n @Watch('disabledDates')\n private _parseDisabledDates(disabledDates: Array<string | Date> | string) {\n if (typeof disabledDates === 'string') {\n disabledDates = JSON.parse(disabledDates);\n }\n\n if (!disabledDates || !Array.isArray(disabledDates)) {\n return;\n }\n\n // normalize all to date\n this._disabledDates = disabledDates\n .map((date) => {\n if (typeof date === 'string') {\n return new Date(date);\n }\n\n return date;\n })\n .filter((date) => isValid(date));\n }\n\n render() {\n return (\n <Host class={`p-calendar variant-${this.variant}`}>\n {this._getView()}\n </Host>\n );\n }\n\n private _getView() {\n if (this._view === 'year') {\n return this._getYearView();\n }\n\n if (this._view === 'month') {\n return this._getMonthView();\n }\n\n return this._getDayView();\n }\n\n /* With this, we shall hack the system in ways no one would ever have thought.\n <div class=\"col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7\"></div>\n */\n private _getDayView() {\n const daysInMonth = this._generateDaysInMonth();\n return (\n <div class=\"view-day\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('month', -1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('month')}\n class={!this._canChangeView('month') && 'disabled'}\n >\n {format(this._viewDate, 'MMMM')}\n </span>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('month', 1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"dates\">\n {this._weekDays.map((weekday) => (\n <span>\n {format(\n addDays(new Date(2022, 7, 1), weekday),\n 'eee'\n )}\n </span>\n ))}\n {daysInMonth.map((day) => {\n return (\n <time\n class={`day ${day.active && 'active'} ${\n day.disabled && 'disabled'\n } ${day.current && 'current'} ${\n day.offset !== false &&\n `col-start-${day.offset}`\n }`}\n onClick={() => this._setValue(day.date)}\n >\n {day.day}\n </time>\n );\n })}\n </div>\n </div>\n );\n }\n\n private _getMonthView() {\n const months = this._generateMonths();\n return (\n <div class=\"view-month\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('year', -1) && 'disabled'\n }`}\n onClick={() => this._changeYear(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('year', 1) && 'disabled'\n }`}\n onClick={() => this._changeYear(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"items\">\n {months.map((month) => (\n <div\n onClick={() => this._setMonth(month.month)}\n class={`month ${month.active && 'active'} ${\n month.disabled && 'disabled'\n } ${month.current && 'current'}`}\n >\n {format(setMonth(new Date(), month.month), 'MMMM')}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _getYearView() {\n const years = this._generateYears();\n return (\n <div class=\"view-year\">\n <div class=\"header\">\n <div>\n <span class=\"year disabled\">\n {years?.[0].year} - {years?.[years.length - 1].year}\n </span>\n </div>\n </div>\n <div class=\"items\">\n {years.map((year) => (\n <div\n onClick={() => this._setYear(year.year)}\n class={`year ${year.active && 'active'} ${\n year.current && 'current'\n }`}\n >\n {year.year}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _setYear(year: number) {\n const date = setYear(this._viewDate, year);\n if (this.mode === 'year') {\n return this._setValue(setMonth(setDate(date, 1), 0));\n }\n\n this._viewDate = setYear(this._viewDate, year);\n this._view = 'month';\n }\n\n private _setMonth(month: number) {\n const date = setMonth(this._viewDate, month);\n if (this.mode === 'month') {\n return this._setValue(setDate(date, 1));\n }\n\n this._viewDate = date;\n this._view = 'day';\n }\n\n private _changeMonth(amount = 1) {\n const allowed = this._canSetAmount('month', amount);\n if (!allowed) {\n return;\n }\n\n const newDate = addMonths(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _changeYear(amount = 1) {\n const allowed = this._canSetAmount('year', amount);\n if (!allowed) {\n return;\n }\n\n let newDate = addYears(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _setValue(value: Date) {\n console.log('[Calendar] set value', value, this._el);\n\n if (value === null) {\n this._value = null;\n this.valueChange.emit(null);\n return;\n }\n\n console.log('[Calendar] value is not null', value, this._el);\n if (!isValid(value)) {\n return;\n }\n\n console.log('[Calendar] value is valid', value, this._el);\n if (this._isDisabledDay(value)) {\n return;\n }\n\n console.log('[Calendar] value is not disabled', value, this._el);\n value = startOfDay(value);\n const isSameValue = isSameDay(value, this._value);\n\n if (isSameValue) {\n return;\n }\n\n console.log(\n '[Calendar] value is not the same as previous value',\n value,\n this._el\n );\n\n this._value = value;\n this.valueChange.emit(value);\n console.log('[Calendar] value is set', value, this._el);\n }\n\n private _generateDaysInMonth() {\n const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());\n\n return days.map((day) => {\n day = day + 1;\n const date = setDate(this._viewDate, day);\n\n const dayOfWeek = getDay(date);\n return {\n day,\n date,\n offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,\n current: isSameDay(date, this._today),\n active: isSameDay(date, this._value),\n disabled: this._isDisabledDay(date),\n };\n });\n }\n\n private _isDisabledDay(day: Date) {\n return (\n isBefore(day, this._minDate) ||\n (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||\n ((getDay(day) === 0 || getDay(day) === 6) &&\n this.disableWeekends) ||\n this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0\n );\n }\n\n private _generateMonths() {\n const year = getYear(this._viewDate);\n const months = Array.from(Array(12).keys());\n\n return months.map((month) => {\n const date = new Date(year, month, 1);\n return {\n month,\n current: isSameMonth(this._today, date),\n active: isSameMonth(this._value, date),\n disabled:\n isAfter(date, this._maxDate) ||\n isBefore(endOfMonth(date), this._minDate),\n };\n });\n }\n\n private _generateYears() {\n const maxYear = getYear(this._maxDate) + 1;\n const minYear = getYear(this._minDate);\n\n return Array.from(Array(maxYear - minYear).keys()).map((index) => {\n const year = minYear + index;\n return {\n year,\n current: getYear(this._today) === year,\n active: getYear(this._value) === year,\n };\n });\n }\n\n private _scrollYearIntoView() {\n const items = this._el.shadowRoot.querySelector('.view-year .items');\n if (!items) {\n return;\n }\n\n const active = items.querySelector('.year.active') as HTMLElement;\n if (active) {\n return items.scrollTo({\n top: active.offsetTop,\n });\n }\n\n const current = items.querySelector('.year.current') as HTMLElement;\n if (current) {\n return items.scrollTo({\n top: current.offsetTop,\n });\n }\n }\n\n private _changeView(view: 'year' | 'month') {\n if (!this._canChangeView(view)) {\n return;\n }\n\n this._view = view;\n }\n\n private _canChangeView(view: 'year' | 'month') {\n if (view === 'year') {\n if (isSameYear(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n if (isSameMonth(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n private _canSetAmount(type: 'month' | 'year', amount = 1) {\n if (type === 'month') {\n const newDate = addMonths(this._viewDate, amount);\n const startNewDate = startOfMonth(newDate);\n if (\n (isBefore(startNewDate, this._minDate) &&\n !isSameDay(startNewDate, this._minDate)) ||\n isAfter(startNewDate, endOfMonth(this._maxDate))\n ) {\n return false;\n }\n }\n\n if (type === 'year') {\n let newDate = addYears(this._viewDate, amount);\n const year = getYear(newDate);\n if (\n year < getYear(this._minDate) ||\n year > getYear(this._maxDate)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n private _getAutomaticMax() {\n const date = addYears(new Date(), 50);\n\n let year = getYear(date);\n year = Math.ceil(year / 10) * 10;\n\n return setYear(date, year);\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-calendar.entry.js","mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE;AACxD,EAAE,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAC7B,EAAE,IAAI,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC/B,EAAE,IAAI,MAAM,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AACtC;AACA,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE;AACrB,IAAI,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,GAAG;AACH;AACA,EAAE,IAAI,CAAC,MAAM,EAAE;AACf;AACA,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AACxC,EAAE,OAAO,IAAI,CAAC;AACd;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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C/C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;MAC9B,IACI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC/B;QACE,OAAO,KAAK,CAAC;OAChB;KACJ;IAED,OAAO,IAAI,CAAC;GACf;EAEO,gBAAgB;IACpB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAEtC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IAEjC,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;GAC9B;;;;;;;;;;;;;","names":[],"sources":["../../node_modules/date-fns/esm/addDays/index.js","../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/getDay/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getYear/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setDate/index.js","../../node_modules/date-fns/esm/setYear/index.js","./src/components/molecules/calendar/calendar.component.scss?tag=p-calendar&encapsulation=shadow","./src/components/molecules/calendar/calendar.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\n\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\n\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}",":host {\n @apply block bg-white p-2;\n @apply w-[14rem];\n\n .view-day,\n .view-month,\n .view-year {\n @apply flex flex-col gap-2;\n @apply w-full h-[12rem];\n }\n\n .header {\n @apply flex justify-between items-center gap-1;\n @apply text-base;\n @apply w-full;\n\n span {\n @apply cursor-pointer h-8 px-2 rounded text-storm;\n\n &.disabled {\n @apply cursor-default;\n }\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.year {\n @apply font-semibold;\n }\n }\n\n .nav {\n @apply relative flex justify-center items-center cursor-pointer;\n @apply no-underline;\n @apply text-indigo;\n @apply w-6 h-6 rounded-round;\n transition-duration: 0.2s;\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.disabled {\n @apply opacity-0;\n }\n }\n }\n\n .view-day {\n @apply h-auto min-h-[12rem];\n\n .dates {\n @apply grid gap-1;\n grid-template-columns: repeat(7, 1fr);\n\n > span {\n @apply text-storm-medium font-semibold text-xs;\n @apply w-6;\n @apply self-center justify-self-center text-center;\n }\n\n > time {\n @apply flex justify-center items-center;\n @apply cursor-pointer;\n @apply w-6 h-6 box-border;\n @apply justify-self-center self-center;\n @apply rounded-round;\n\n @apply text-storm text-sm;\n @apply border border-solid border-transparent;\n\n transition-duration: 0.2s;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.other-month,\n &.disabled {\n @apply opacity-40 cursor-default;\n }\n\n &.disabled {\n @apply line-through;\n }\n\n &:hover:not(.disabled):not(.active):not(.other-month) {\n @apply bg-indigo-light text-storm;\n }\n }\n }\n }\n\n .view-month,\n .view-year {\n .items {\n @apply relative grid overflow-y-auto gap-1 w-full;\n @apply h-full items-center;\n grid-template-columns: repeat(3, 1fr);\n\n > div {\n @apply cursor-pointer;\n @apply flex justify-center items-center;\n @apply text-sm h-8 px-2 rounded;\n @apply text-storm;\n @apply border border-solid border-transparent;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.disabled {\n @apply line-through;\n @apply opacity-40 cursor-default;\n }\n\n &:hover:not(.disabled):not(.active) {\n @apply bg-mystic;\n }\n }\n }\n }\n\n .view-month {\n .items {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .view-year {\n .header {\n @apply justify-center;\n }\n }\n}\n\n:host(.variant-default) {\n @apply rounded shadow-4;\n}\n\n:host(.variant-embedded) {\n @apply p-0;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n addDays,\n addMonths,\n addYears,\n endOfMonth,\n format,\n getDay,\n getDaysInMonth,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isSameYear,\n isValid,\n setDate,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n} from 'date-fns';\n\n@Component({\n tag: 'p-calendar',\n styleUrl: 'calendar.component.scss',\n shadow: true,\n})\nexport class Calendar {\n /**\n * The variant of the button\n */\n @Prop() variant: 'default' | 'embedded' = 'default';\n\n /**\n * The current value\n */\n @Prop() value?: Date | 'string';\n\n /**\n * Wether to automatically preselect today\n */\n @Prop() preselectToday: boolean = false;\n\n /**\n * Disabled dates\n */\n @Prop() disabledDates?: Array<Date | 'string'> | string;\n\n /**\n * Min date\n */\n @Prop() minDate: Date | 'string' = new Date(1970, 0, 1);\n\n /**\n * Max date\n */\n @Prop() maxDate: Date | 'string' = this._getAutomaticMax();\n\n /**\n * Wether to disable the weekends\n */\n @Prop() disableWeekends: boolean = false;\n\n /**\n * The mode of the datepicker\n */\n @Prop() mode: 'year' | 'month' | 'day' = 'day';\n\n /**\n * Event when the value changes\n */\n @Event() valueChange: EventEmitter<any>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _today = new Date();\n @State() private _view: 'year' | 'month' | 'day' = this.mode;\n @State() private _viewDate = this._today;\n\n @State() private _value: Date;\n @State() private _minDate: Date;\n @State() private _maxDate: Date;\n @State() private _disabledDates: Date[] = [];\n\n private _weekDays = Array.from(Array(7).keys());\n\n componentWillLoad() {\n if (this.disabledDates) {\n this._parseDisabledDates(this.disabledDates);\n }\n\n if (this.minDate) {\n this._parseMinDate(this.minDate);\n }\n\n if (this.maxDate) {\n this._parseMaxDate(this.maxDate);\n }\n\n this._parseValue(this.value);\n\n if (this._value) {\n this._viewDate = this._value;\n }\n }\n\n componentDidRender() {\n if (this._view === 'year') {\n this._scrollYearIntoView();\n }\n }\n\n @Watch('value')\n private _parseValue(value: string | Date) {\n if (!value && this.preselectToday) {\n value = new Date();\n }\n\n if (typeof value === 'string') {\n value = new Date(value);\n }\n\n this._setValue(value);\n }\n\n @Watch('minDate')\n private _parseMinDate(minDate: string | Date) {\n if (typeof minDate === 'string') {\n minDate = new Date(minDate);\n }\n\n if (!isValid(minDate)) {\n return;\n }\n\n this._minDate = minDate;\n }\n\n @Watch('maxDate')\n private _parseMaxDate(maxDate: string | Date) {\n if (typeof maxDate === 'string') {\n maxDate = new Date(maxDate);\n }\n\n if (!isValid(maxDate)) {\n return;\n }\n\n this._maxDate = maxDate;\n }\n\n @Watch('disabledDates')\n private _parseDisabledDates(disabledDates: Array<string | Date> | string) {\n if (typeof disabledDates === 'string') {\n disabledDates = JSON.parse(disabledDates);\n }\n\n if (!disabledDates || !Array.isArray(disabledDates)) {\n return;\n }\n\n // normalize all to date\n this._disabledDates = disabledDates\n .map((date) => {\n if (typeof date === 'string') {\n return new Date(date);\n }\n\n return date;\n })\n .filter((date) => isValid(date));\n }\n\n render() {\n return (\n <Host class={`p-calendar variant-${this.variant}`}>\n {this._getView()}\n </Host>\n );\n }\n\n private _getView() {\n if (this._view === 'year') {\n return this._getYearView();\n }\n\n if (this._view === 'month') {\n return this._getMonthView();\n }\n\n return this._getDayView();\n }\n\n /* With this, we shall hack the system in ways no one would ever have thought.\n <div class=\"col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7\"></div>\n */\n private _getDayView() {\n const daysInMonth = this._generateDaysInMonth();\n return (\n <div class=\"view-day\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('month', -1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('month')}\n class={!this._canChangeView('month') && 'disabled'}\n >\n {format(this._viewDate, 'MMMM')}\n </span>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('month', 1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"dates\">\n {this._weekDays.map((weekday) => (\n <span>\n {format(\n addDays(new Date(2022, 7, 1), weekday),\n 'eee'\n )}\n </span>\n ))}\n {daysInMonth.map((day) => {\n return (\n <time\n class={`day ${day.active && 'active'} ${\n day.disabled && 'disabled'\n } ${day.current && 'current'} ${\n day.offset !== false &&\n `col-start-${day.offset}`\n }`}\n onClick={() => this._setValue(day.date)}\n >\n {day.day}\n </time>\n );\n })}\n </div>\n </div>\n );\n }\n\n private _getMonthView() {\n const months = this._generateMonths();\n return (\n <div class=\"view-month\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('year', -1) && 'disabled'\n }`}\n onClick={() => this._changeYear(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('year', 1) && 'disabled'\n }`}\n onClick={() => this._changeYear(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"items\">\n {months.map((month) => (\n <div\n onClick={() => this._setMonth(month.month)}\n class={`month ${month.active && 'active'} ${\n month.disabled && 'disabled'\n } ${month.current && 'current'}`}\n >\n {format(setMonth(new Date(), month.month), 'MMMM')}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _getYearView() {\n const years = this._generateYears();\n return (\n <div class=\"view-year\">\n <div class=\"header\">\n <div>\n <span class=\"year disabled\">\n {years?.[0].year} - {years?.[years.length - 1].year}\n </span>\n </div>\n </div>\n <div class=\"items\">\n {years.map((year) => (\n <div\n onClick={() => this._setYear(year.year)}\n class={`year ${year.active && 'active'} ${\n year.current && 'current'\n }`}\n >\n {year.year}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _setYear(year: number) {\n const date = setYear(this._viewDate, year);\n if (this.mode === 'year') {\n return this._setValue(setMonth(setDate(date, 1), 0));\n }\n\n this._viewDate = setYear(this._viewDate, year);\n this._view = 'month';\n }\n\n private _setMonth(month: number) {\n const date = setMonth(this._viewDate, month);\n if (this.mode === 'month') {\n return this._setValue(setDate(date, 1));\n }\n\n this._viewDate = date;\n this._view = 'day';\n }\n\n private _changeMonth(amount = 1) {\n const allowed = this._canSetAmount('month', amount);\n if (!allowed) {\n return;\n }\n\n const newDate = addMonths(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _changeYear(amount = 1) {\n const allowed = this._canSetAmount('year', amount);\n if (!allowed) {\n return;\n }\n\n let newDate = addYears(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _setValue(value: Date) {\n if (value === null) {\n this._value = null;\n this.valueChange.emit(null);\n return;\n }\n\n if (!isValid(value)) {\n return;\n }\n\n if (this._isDisabledDay(value)) {\n return;\n }\n\n value = startOfDay(value);\n const isSameValue = isSameDay(value, this._value);\n\n if (isSameValue) {\n return;\n }\n\n this._value = value;\n this.valueChange.emit(value);\n }\n\n private _generateDaysInMonth() {\n const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());\n\n return days.map((day) => {\n day = day + 1;\n const date = setDate(this._viewDate, day);\n\n const dayOfWeek = getDay(date);\n return {\n day,\n date,\n offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,\n current: isSameDay(date, this._today),\n active: isSameDay(date, this._value),\n disabled: this._isDisabledDay(date),\n };\n });\n }\n\n private _isDisabledDay(day: Date) {\n return (\n isBefore(day, this._minDate) ||\n (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||\n ((getDay(day) === 0 || getDay(day) === 6) &&\n this.disableWeekends) ||\n this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0\n );\n }\n\n private _generateMonths() {\n const year = getYear(this._viewDate);\n const months = Array.from(Array(12).keys());\n\n return months.map((month) => {\n const date = new Date(year, month, 1);\n return {\n month,\n current: isSameMonth(this._today, date),\n active: isSameMonth(this._value, date),\n disabled:\n isAfter(date, this._maxDate) ||\n isBefore(endOfMonth(date), this._minDate),\n };\n });\n }\n\n private _generateYears() {\n const maxYear = getYear(this._maxDate) + 1;\n const minYear = getYear(this._minDate);\n\n return Array.from(Array(maxYear - minYear).keys()).map((index) => {\n const year = minYear + index;\n return {\n year,\n current: getYear(this._today) === year,\n active: getYear(this._value) === year,\n };\n });\n }\n\n private _scrollYearIntoView() {\n const items = this._el.shadowRoot.querySelector('.view-year .items');\n if (!items) {\n return;\n }\n\n const active = items.querySelector('.year.active') as HTMLElement;\n if (active) {\n return items.scrollTo({\n top: active.offsetTop,\n });\n }\n\n const current = items.querySelector('.year.current') as HTMLElement;\n if (current) {\n return items.scrollTo({\n top: current.offsetTop,\n });\n }\n }\n\n private _changeView(view: 'year' | 'month') {\n if (!this._canChangeView(view)) {\n return;\n }\n\n this._view = view;\n }\n\n private _canChangeView(view: 'year' | 'month') {\n if (view === 'year') {\n if (isSameYear(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n if (isSameMonth(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n private _canSetAmount(type: 'month' | 'year', amount = 1) {\n if (type === 'month') {\n const newDate = addMonths(this._viewDate, amount);\n const startNewDate = startOfMonth(newDate);\n if (\n (isBefore(startNewDate, this._minDate) &&\n !isSameDay(startNewDate, this._minDate)) ||\n isAfter(startNewDate, endOfMonth(this._maxDate))\n ) {\n return false;\n }\n }\n\n if (type === 'year') {\n let newDate = addYears(this._viewDate, amount);\n const year = getYear(newDate);\n if (\n year < getYear(this._minDate) ||\n year > getYear(this._maxDate)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n private _getAutomaticMax() {\n const date = addYears(new Date(), 50);\n\n let year = getYear(date);\n year = Math.ceil(year / 10) * 10;\n\n return setYear(date, year);\n }\n}\n"],"version":3}
|
|
@@ -3939,8 +3939,7 @@ const Datepicker = class {
|
|
|
3939
3939
|
}
|
|
3940
3940
|
return format(this._value, this.format);
|
|
3941
3941
|
}
|
|
3942
|
-
|
|
3943
|
-
console.log('[Datepicker] parse value', value, this._el);
|
|
3942
|
+
parseValue(value) {
|
|
3944
3943
|
if (!value && this.preselectToday) {
|
|
3945
3944
|
value = new Date();
|
|
3946
3945
|
}
|
|
@@ -3949,7 +3948,7 @@ const Datepicker = class {
|
|
|
3949
3948
|
}
|
|
3950
3949
|
this._setValue(value);
|
|
3951
3950
|
}
|
|
3952
|
-
|
|
3951
|
+
parseMinDate(minDate) {
|
|
3953
3952
|
if (typeof minDate === 'string') {
|
|
3954
3953
|
minDate = new Date(minDate);
|
|
3955
3954
|
}
|
|
@@ -3961,7 +3960,7 @@ const Datepicker = class {
|
|
|
3961
3960
|
this._setValue(null);
|
|
3962
3961
|
}
|
|
3963
3962
|
}
|
|
3964
|
-
|
|
3963
|
+
parseMaxDate(maxDate) {
|
|
3965
3964
|
if (typeof maxDate === 'string') {
|
|
3966
3965
|
maxDate = new Date(maxDate);
|
|
3967
3966
|
}
|
|
@@ -3973,7 +3972,7 @@ const Datepicker = class {
|
|
|
3973
3972
|
this._setValue(null);
|
|
3974
3973
|
}
|
|
3975
3974
|
}
|
|
3976
|
-
|
|
3975
|
+
parseDisabledDates(disabledDates) {
|
|
3977
3976
|
if (typeof disabledDates === 'string') {
|
|
3978
3977
|
disabledDates = JSON.parse(disabledDates);
|
|
3979
3978
|
}
|
|
@@ -3995,22 +3994,22 @@ const Datepicker = class {
|
|
|
3995
3994
|
}
|
|
3996
3995
|
componentWillLoad() {
|
|
3997
3996
|
if (this.disabledDates) {
|
|
3998
|
-
this.
|
|
3997
|
+
this.parseDisabledDates(this.disabledDates);
|
|
3999
3998
|
}
|
|
4000
3999
|
if (this.minDate) {
|
|
4001
|
-
this.
|
|
4000
|
+
this.parseMinDate(this.minDate);
|
|
4002
4001
|
}
|
|
4003
4002
|
if (this.maxDate) {
|
|
4004
|
-
this.
|
|
4003
|
+
this.parseMaxDate(this.maxDate);
|
|
4005
4004
|
}
|
|
4006
4005
|
if (this.mode !== 'day' &&
|
|
4007
4006
|
this.format === this._defaultFormats['day']) {
|
|
4008
4007
|
this.format = this._defaultFormats[this.mode];
|
|
4009
4008
|
}
|
|
4010
|
-
this.
|
|
4009
|
+
this.parseValue(this.value);
|
|
4011
4010
|
}
|
|
4012
4011
|
render() {
|
|
4013
|
-
return (h(Host, { class: "p-datepicker" }, h("p-dropdown", { disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, h("p-input-group", { slot: "trigger", icon: "calendar", iconPosition: "start", size: this.size, prefix: this.prefix, label: this.label, helper: this.helper, error: this.error, disabled: this.disabled, focused: this._showDropdown }, h("input", { slot: "input", type: "text", placeholder: this.placeholder, value: this.formattedDate, class: "p-input cursor-pointer", onFocus: () => this._onFocus(), onInput: (ev) => this._onInput(ev) })), h("div", { slot: "items" }, h("p-calendar", { variant: "embedded", value: this._value, onValueChange: ({ detail }) => this.
|
|
4012
|
+
return (h(Host, { class: "p-datepicker" }, h("p-dropdown", { disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, h("p-input-group", { slot: "trigger", icon: "calendar", iconPosition: "start", size: this.size, prefix: this.prefix, label: this.label, helper: this.helper, error: this.error, disabled: this.disabled, focused: this._showDropdown }, h("input", { slot: "input", type: "text", placeholder: this.placeholder, value: this.formattedDate, class: "p-input cursor-pointer", onFocus: () => this._onFocus(), onInput: (ev) => this._onInput(ev) })), h("div", { slot: "items" }, h("p-calendar", { variant: "embedded", value: this._value, onValueChange: ({ detail }) => (this.value = detail), preselectToday: this.preselectToday, disabledDates: this.disabledDates, minDate: this.minDate, maxDate: this.maxDate, disableWeekends: this.disableWeekends, mode: this.mode })))));
|
|
4014
4013
|
}
|
|
4015
4014
|
documentClickHandler({ target }) {
|
|
4016
4015
|
if (!this._showDropdown || childOf(target, this._el)) {
|
|
@@ -4038,33 +4037,27 @@ const Datepicker = class {
|
|
|
4038
4037
|
}, 250);
|
|
4039
4038
|
}
|
|
4040
4039
|
_setValue(value, blur = true) {
|
|
4041
|
-
console.log('[Datepicker] set value', value, this._el);
|
|
4042
4040
|
if (value === null) {
|
|
4043
4041
|
this._value = null;
|
|
4044
4042
|
this.valueChange.emit(null);
|
|
4045
4043
|
return;
|
|
4046
4044
|
}
|
|
4047
|
-
console.log('[Datepicker] value is not null', value, this._el);
|
|
4048
4045
|
if (!isValid(value)) {
|
|
4049
4046
|
return;
|
|
4050
4047
|
}
|
|
4051
|
-
console.log('[Datepicker] value is valid', value, this._el);
|
|
4052
4048
|
if (this._isDisabledDay(value)) {
|
|
4053
4049
|
return;
|
|
4054
4050
|
}
|
|
4055
|
-
console.log('[Datepicker] value is not disabled', value, this._el);
|
|
4056
4051
|
value = startOfDay(value);
|
|
4057
4052
|
const isSameValue = isSameDay(value, this._value);
|
|
4058
4053
|
if (isSameValue) {
|
|
4059
4054
|
return;
|
|
4060
4055
|
}
|
|
4061
|
-
console.log('[Datepicker] value is not the same as previous value', value, this._el);
|
|
4062
4056
|
if (blur) {
|
|
4063
4057
|
this._onBlur();
|
|
4064
4058
|
}
|
|
4065
4059
|
this._value = value;
|
|
4066
4060
|
this.valueChange.emit(value);
|
|
4067
|
-
console.log('[Datepicker] value is set', value, this._el);
|
|
4068
4061
|
}
|
|
4069
4062
|
_isDisabledDay(day) {
|
|
4070
4063
|
return (isBefore(day, this._minDate) ||
|
|
@@ -4073,10 +4066,10 @@ const Datepicker = class {
|
|
|
4073
4066
|
}
|
|
4074
4067
|
get _el() { return getElement(this); }
|
|
4075
4068
|
static get watchers() { return {
|
|
4076
|
-
"value": ["
|
|
4077
|
-
"minDate": ["
|
|
4078
|
-
"maxDate": ["
|
|
4079
|
-
"disabledDates": ["
|
|
4069
|
+
"value": ["parseValue"],
|
|
4070
|
+
"minDate": ["parseMinDate"],
|
|
4071
|
+
"maxDate": ["parseMaxDate"],
|
|
4072
|
+
"disabledDates": ["parseDisabledDates"]
|
|
4080
4073
|
}; }
|
|
4081
4074
|
};
|
|
4082
4075
|
Datepicker.style = datepickerComponentCss;
|