@btst/stack 1.4.1 → 1.5.1
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/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.cjs +85 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.mjs +83 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.cjs +237 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.mjs +235 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.cjs +41 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.mjs +39 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.cjs +46 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.mjs +44 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.3.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_c1e3fbdebd5ee34a254141dc5a2dcd28/node_modules/@radix-ui/react-checkbox/dist/index.cjs +296 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.3.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_c1e3fbdebd5ee34a254141dc5a2dcd28/node_modules/@radix-ui/react-checkbox/dist/index.mjs +271 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.cjs +325 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.mjs +299 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_43b950ce9f6b8d55739cce33fe173a1c/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_43b950ce9f6b8d55739cce33fe173a1c/node_modules/@radix-ui/react-primitive/dist/index.mjs +40 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_e0d4db654009398ea41c8e459eeae4ee/node_modules/@radix-ui/react-radio-group/dist/index.cjs +304 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_e0d4db654009398ea41c8e459eeae4ee/node_modules/@radix-ui/react-radio-group/dist/index.mjs +283 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1.1.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_8aae318b88145540882c32de0262377a/node_modules/@radix-ui/react-separator/dist/index.cjs +47 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1.1.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_8aae318b88145540882c32de0262377a/node_modules/@radix-ui/react-separator/dist/index.mjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/DayPicker.cjs +326 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/DayPicker.mjs +320 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/UI.cjs +122 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/UI.mjs +122 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/DateLib.cjs +577 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/DateLib.mjs +573 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Button.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Button.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/CaptionLabel.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/CaptionLabel.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Chevron.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Chevron.mjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Day.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Day.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DayButton.cjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DayButton.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Dropdown.cjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Dropdown.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DropdownNav.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DropdownNav.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Footer.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Footer.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Month.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Month.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthCaption.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthCaption.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthGrid.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthGrid.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Months.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Months.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Nav.cjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Nav.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/NextMonthButton.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/NextMonthButton.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Option.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Option.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Root.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Root.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Select.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Select.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Week.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Week.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumber.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumber.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekday.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekday.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekdays.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekdays.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weeks.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weeks.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/YearsDropdown.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/YearsDropdown.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/custom-components.cjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/custom-components.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatCaption.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatCaption.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatDay.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatDay.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.cjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.mjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/index.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/index.mjs +7 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.cjs +75 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.mjs +73 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.cjs +97 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.mjs +95 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.mjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.cjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.mjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getComponents.cjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getComponents.mjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDates.cjs +61 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDates.mjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDays.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDays.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.mjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.cjs +48 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.mjs +46 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFormatters.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFormatters.mjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getLabels.cjs +55 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getLabels.mjs +53 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.cjs +71 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.mjs +69 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.cjs +53 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.mjs +51 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.cjs +42 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.mjs +40 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.cjs +38 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.mjs +36 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.cjs +39 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.mjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeeks.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeeks.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.cjs +38 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.mjs +36 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.cjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/index.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/index.mjs +11 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelDayButton.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelDayButton.mjs +32 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGrid.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGrid.mjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGridcell.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGridcell.mjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNav.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNav.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNext.cjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNext.mjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelPrevious.cjs +17 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelPrevious.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.cjs +17 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekday.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekday.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/locale/en-US.cjs +69 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/locale/en-US.mjs +67 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useMulti.cjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useMulti.mjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useRange.cjs +47 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useRange.mjs +45 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useSingle.cjs +46 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useSingle.mjs +44 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useAnimation.cjs +176 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useAnimation.mjs +174 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useCalendar.cjs +115 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useCalendar.mjs +113 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useDayPicker.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useDayPicker.mjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useFocus.cjs +58 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useFocus.mjs +56 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useSelection.cjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useSelection.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/addToRange.cjs +97 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/addToRange.mjs +95 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.cjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.mjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.cjs +64 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.mjs +62 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.cjs +32 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.mjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.cjs +76 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.mjs +74 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.cjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.mjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.cjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/toTimeZone.cjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/toTimeZone.mjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/typeguards.cjs +73 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/typeguards.mjs +66 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +7 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +7 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +131 -124
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +131 -124
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +23 -23
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.cjs +28 -12
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.mjs +18 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/edit-post-page.internal.cjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/edit-post-page.internal.mjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/home-page.internal.cjs +9 -7
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/home-page.internal.mjs +9 -7
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/new-post-page.internal.cjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/new-post-page.internal.mjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +7 -5
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +7 -5
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/tag-page.internal.cjs +5 -3
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/tag-page.internal.mjs +5 -3
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +10 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +11 -7
- package/dist/packages/better-stack/src/plugins/blog/client/plugin.cjs +6 -6
- package/dist/packages/better-stack/src/plugins/blog/client/plugin.mjs +6 -6
- package/dist/packages/better-stack/src/plugins/blog/schemas.cjs +17 -17
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +457 -0
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +455 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +299 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +297 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.cjs +118 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.mjs +116 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.cjs +20 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.mjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.cjs +46 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +100 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +98 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.mjs +44 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.cjs +43 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.cjs +165 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.mjs +163 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.mjs +41 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.cjs +84 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.mjs +82 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.cjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.mjs +14 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.cjs +27 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.mjs +25 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.cjs +402 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.mjs +390 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.cjs +29 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.mjs +27 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.cjs +13 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.mjs +11 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.cjs +12 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.mjs +10 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.cjs +12 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.mjs +10 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/index.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/index.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.cjs +275 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.mjs +273 -0
- package/dist/packages/better-stack/src/plugins/cms/db.cjs +76 -0
- package/dist/packages/better-stack/src/plugins/cms/db.mjs +74 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.cjs +54 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.mjs +49 -0
- package/dist/packages/better-stack/src/plugins/cms/utils.cjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/utils.mjs +9 -0
- package/dist/packages/ui/src/components/calendar.cjs +205 -0
- package/dist/packages/ui/src/components/calendar.mjs +188 -0
- package/dist/packages/ui/src/components/checkbox.cjs +34 -0
- package/dist/packages/ui/src/components/checkbox.mjs +32 -0
- package/dist/packages/ui/src/components/date-picker.cjs +41 -0
- package/dist/packages/ui/src/components/date-picker.mjs +39 -0
- package/dist/packages/ui/src/components/form.mjs +1 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.cjs +2 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.mjs +2 -1
- package/dist/packages/ui/src/components/page-wrapper.cjs +20 -0
- package/dist/packages/ui/src/components/page-wrapper.mjs +18 -0
- package/dist/packages/ui/src/components/popover.cjs +41 -0
- package/dist/packages/ui/src/components/popover.mjs +37 -0
- package/dist/packages/ui/src/components/radio-group.cjs +48 -0
- package/dist/packages/ui/src/components/radio-group.mjs +45 -0
- package/dist/packages/ui/src/components/separator.cjs +29 -0
- package/dist/packages/ui/src/components/separator.mjs +27 -0
- package/dist/packages/ui/src/components/table.cjs +89 -0
- package/dist/packages/ui/src/components/table.mjs +82 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/label.cjs +18 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/label.mjs +16 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.cjs +9 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.mjs +7 -0
- package/dist/packages/ui/src/components/ui/auto-form/config.cjs +42 -0
- package/dist/packages/ui/src/components/ui/auto-form/config.mjs +39 -0
- package/dist/packages/ui/src/components/ui/auto-form/dependencies.cjs +48 -0
- package/dist/packages/ui/src/components/ui/auto-form/dependencies.mjs +46 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/array.cjs +103 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/array.mjs +87 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.cjs +38 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.mjs +36 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.cjs +37 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.mjs +35 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/enum.cjs +73 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/enum.mjs +71 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.cjs +63 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.mjs +61 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/input.cjs +32 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/input.mjs +30 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/number.cjs +31 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/number.mjs +29 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/object.cjs +149 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/object.mjs +133 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.cjs +67 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.mjs +65 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/switch.cjs +38 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/switch.mjs +36 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.cjs +31 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.mjs +29 -0
- package/dist/packages/ui/src/components/ui/auto-form/index.cjs +87 -0
- package/dist/packages/ui/src/components/ui/auto-form/index.mjs +78 -0
- package/dist/packages/ui/src/components/ui/auto-form/types.cjs +11 -0
- package/dist/packages/ui/src/components/ui/auto-form/types.mjs +9 -0
- package/dist/packages/ui/src/components/ui/auto-form/utils.cjs +179 -0
- package/dist/packages/ui/src/components/ui/auto-form/utils.mjs +169 -0
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/hooks}/use-route-lifecycle.cjs +8 -9
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/hooks}/use-route-lifecycle.mjs +1 -2
- package/dist/plugins/ai-chat/api/index.d.cts +1 -1
- package/dist/plugins/ai-chat/api/index.d.mts +1 -1
- package/dist/plugins/ai-chat/api/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.cts +56 -250
- package/dist/plugins/ai-chat/query-keys.d.mts +56 -250
- package/dist/plugins/ai-chat/query-keys.d.ts +56 -250
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +103 -363
- package/dist/plugins/blog/query-keys.d.mts +103 -363
- package/dist/plugins/blog/query-keys.d.ts +103 -363
- package/dist/plugins/cms/api/index.cjs +7 -0
- package/dist/plugins/cms/api/index.d.cts +101 -0
- package/dist/plugins/cms/api/index.d.mts +101 -0
- package/dist/plugins/cms/api/index.d.ts +101 -0
- package/dist/plugins/cms/api/index.mjs +1 -0
- package/dist/plugins/cms/client/components/index.cjs +14 -0
- package/dist/plugins/cms/client/components/index.d.cts +20 -0
- package/dist/plugins/cms/client/components/index.d.mts +20 -0
- package/dist/plugins/cms/client/components/index.d.ts +20 -0
- package/dist/plugins/cms/client/components/index.mjs +10 -0
- package/dist/plugins/cms/client/hooks/index.cjs +17 -0
- package/dist/plugins/cms/client/hooks/index.d.cts +203 -0
- package/dist/plugins/cms/client/hooks/index.d.mts +203 -0
- package/dist/plugins/cms/client/hooks/index.d.ts +203 -0
- package/dist/plugins/cms/client/hooks/index.mjs +1 -0
- package/dist/plugins/cms/client/index.cjs +9 -0
- package/dist/plugins/cms/client/index.d.cts +409 -0
- package/dist/plugins/cms/client/index.d.mts +409 -0
- package/dist/plugins/cms/client/index.d.ts +409 -0
- package/dist/plugins/cms/client/index.mjs +2 -0
- package/dist/plugins/cms/client.css +2 -0
- package/dist/plugins/cms/query-keys.cjs +137 -0
- package/dist/plugins/cms/query-keys.d.cts +79 -0
- package/dist/plugins/cms/query-keys.d.mts +79 -0
- package/dist/plugins/cms/query-keys.d.ts +79 -0
- package/dist/plugins/cms/query-keys.mjs +135 -0
- package/dist/plugins/cms/style.css +19 -0
- package/dist/shared/stack.BwkyFwF8.d.cts +135 -0
- package/dist/shared/stack.DBqxCs0V.d.mts +135 -0
- package/dist/shared/stack.DwnJA87a.d.ts +135 -0
- package/dist/shared/stack.NZJogTUn.d.cts +66 -0
- package/dist/shared/stack.NZJogTUn.d.mts +66 -0
- package/dist/shared/stack.NZJogTUn.d.ts +66 -0
- package/package.json +58 -5
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +15 -0
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +4 -1
- package/src/plugins/blog/api/plugin.ts +29 -2
- package/src/plugins/blog/client/components/loading/form-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/loading/list-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/loading/post-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/pages/edit-post-page.internal.tsx +4 -3
- package/src/plugins/blog/client/components/pages/home-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/pages/new-post-page.internal.tsx +4 -3
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/pages/tag-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +9 -9
- package/src/plugins/blog/client/plugin.tsx +10 -9
- package/src/plugins/cms/__tests__/schema-roundtrip.test.ts +611 -0
- package/src/plugins/cms/api/index.ts +1 -0
- package/src/plugins/cms/api/plugin.ts +611 -0
- package/src/plugins/cms/client/components/forms/content-form.tsx +477 -0
- package/src/plugins/cms/client/components/forms/file-upload.tsx +164 -0
- package/src/plugins/cms/client/components/index.tsx +10 -0
- package/src/plugins/cms/client/components/loading/dashboard-skeleton.tsx +22 -0
- package/src/plugins/cms/client/components/loading/editor-skeleton.tsx +35 -0
- package/src/plugins/cms/client/components/loading/index.tsx +3 -0
- package/src/plugins/cms/client/components/loading/list-skeleton.tsx +38 -0
- package/src/plugins/cms/client/components/pages/404-page.tsx +27 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +139 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.tsx +50 -0
- package/src/plugins/cms/client/components/pages/content-list-page.internal.tsx +213 -0
- package/src/plugins/cms/client/components/pages/content-list-page.tsx +45 -0
- package/src/plugins/cms/client/components/pages/dashboard-page.internal.tsx +111 -0
- package/src/plugins/cms/client/components/pages/dashboard-page.tsx +37 -0
- package/src/plugins/cms/client/components/shared/default-error.tsx +30 -0
- package/src/plugins/cms/client/components/shared/empty-state.tsx +26 -0
- package/src/plugins/cms/client/components/shared/page-wrapper.tsx +32 -0
- package/src/plugins/cms/client/components/shared/pagination.tsx +72 -0
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +724 -0
- package/src/plugins/cms/client/hooks/index.tsx +1 -0
- package/src/plugins/cms/client/index.ts +13 -0
- package/src/plugins/cms/client/localization/cms-common.ts +29 -0
- package/src/plugins/cms/client/localization/cms-dashboard.ts +10 -0
- package/src/plugins/cms/client/localization/cms-editor.ts +8 -0
- package/src/plugins/cms/client/localization/cms-list.ts +14 -0
- package/src/plugins/cms/client/localization/cms-toasts.ts +8 -0
- package/src/plugins/cms/client/localization/index.ts +15 -0
- package/src/plugins/cms/client/overrides.ts +166 -0
- package/src/plugins/cms/client/plugin.tsx +494 -0
- package/src/plugins/cms/client.css +2 -0
- package/src/plugins/cms/db.ts +76 -0
- package/src/plugins/cms/query-keys.ts +186 -0
- package/src/plugins/cms/schemas.ts +81 -0
- package/src/plugins/cms/style.css +19 -0
- package/src/plugins/cms/types.ts +220 -0
- package/src/plugins/cms/utils.ts +11 -0
- package/src/plugins/blog/client/components/shared/page-layout.tsx +0 -23
- package/src/plugins/blog/client/components/shared/use-route-lifecycle.tsx +0 -68
- package/dist/shared/{stack.CcI4sYJP.d.cts → stack.DLhzx1-D.d.cts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.mts → stack.DLhzx1-D.d.mts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.ts → stack.DLhzx1-D.d.ts} +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the months to show in the dropdown.
|
|
3
|
+
*
|
|
4
|
+
* This function generates a list of months for the current year, formatted
|
|
5
|
+
* using the provided formatter, and determines whether each month should be
|
|
6
|
+
* disabled based on the navigation range.
|
|
7
|
+
*
|
|
8
|
+
* @param displayMonth The currently displayed month.
|
|
9
|
+
* @param navStart The start date for navigation.
|
|
10
|
+
* @param navEnd The end date for navigation.
|
|
11
|
+
* @param formatters The formatters to use for formatting the month labels.
|
|
12
|
+
* @param dateLib The date library to use for date manipulation.
|
|
13
|
+
* @returns An array of dropdown options representing the months, or `undefined`
|
|
14
|
+
* if no months are available.
|
|
15
|
+
*/
|
|
16
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {
|
|
17
|
+
const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth, } = dateLib;
|
|
18
|
+
const months = eachMonthOfInterval({
|
|
19
|
+
start: startOfYear(displayMonth),
|
|
20
|
+
end: endOfYear(displayMonth),
|
|
21
|
+
});
|
|
22
|
+
const options = months.map((month) => {
|
|
23
|
+
const label = formatters.formatMonthDropdown(month, dateLib);
|
|
24
|
+
const value = getMonth(month);
|
|
25
|
+
const disabled = (navStart && month < startOfMonth(navStart)) ||
|
|
26
|
+
(navEnd && month > startOfMonth(navEnd)) ||
|
|
27
|
+
false;
|
|
28
|
+
return { value, label, disabled };
|
|
29
|
+
});
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { getMonthOptions };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const CalendarDay = require('../classes/CalendarDay.cjs');
|
|
4
|
+
const CalendarWeek = require('../classes/CalendarWeek.cjs');
|
|
5
|
+
const CalendarMonth = require('../classes/CalendarMonth.cjs');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns the months to display in the calendar.
|
|
9
|
+
*
|
|
10
|
+
* This function generates `CalendarMonth` objects for each month to be
|
|
11
|
+
* displayed, including their weeks and days, based on the provided display
|
|
12
|
+
* months and dates.
|
|
13
|
+
*
|
|
14
|
+
* @param displayMonths The months (as dates) to display in the calendar.
|
|
15
|
+
* @param dates The dates to display in the calendar.
|
|
16
|
+
* @param props Options from the DayPicker props context.
|
|
17
|
+
* @param dateLib The date library to use for date manipulation.
|
|
18
|
+
* @returns An array of `CalendarMonth` objects representing the months to
|
|
19
|
+
* display.
|
|
20
|
+
*/
|
|
21
|
+
function getMonths(displayMonths, dates, props, dateLib) {
|
|
22
|
+
const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
23
|
+
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
24
|
+
const firstDateOfFirstWeek = props.broadcastCalendar
|
|
25
|
+
? startOfBroadcastWeek(month, dateLib)
|
|
26
|
+
: props.ISOWeek
|
|
27
|
+
? startOfISOWeek(month)
|
|
28
|
+
: startOfWeek(month);
|
|
29
|
+
const lastDateOfLastWeek = props.broadcastCalendar
|
|
30
|
+
? endOfBroadcastWeek(month)
|
|
31
|
+
: props.ISOWeek
|
|
32
|
+
? endOfISOWeek(endOfMonth(month))
|
|
33
|
+
: endOfWeek(endOfMonth(month));
|
|
34
|
+
/** The dates to display in the month. */
|
|
35
|
+
const monthDates = dates.filter((date) => {
|
|
36
|
+
return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
|
|
37
|
+
});
|
|
38
|
+
const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;
|
|
39
|
+
if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {
|
|
40
|
+
const extraDates = dates.filter((date) => {
|
|
41
|
+
const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;
|
|
42
|
+
return (date > lastDateOfLastWeek &&
|
|
43
|
+
date <= addDays(lastDateOfLastWeek, daysToAdd));
|
|
44
|
+
});
|
|
45
|
+
monthDates.push(...extraDates);
|
|
46
|
+
}
|
|
47
|
+
const weeks = monthDates.reduce((weeks, date) => {
|
|
48
|
+
const weekNumber = props.ISOWeek ? getISOWeek(date) : getWeek(date);
|
|
49
|
+
const week = weeks.find((week) => week.weekNumber === weekNumber);
|
|
50
|
+
const day = new CalendarDay.CalendarDay(date, month, dateLib);
|
|
51
|
+
if (!week) {
|
|
52
|
+
weeks.push(new CalendarWeek.CalendarWeek(weekNumber, [day]));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
week.days.push(day);
|
|
56
|
+
}
|
|
57
|
+
return weeks;
|
|
58
|
+
}, []);
|
|
59
|
+
const dayPickerMonth = new CalendarMonth.CalendarMonth(month, weeks);
|
|
60
|
+
months.push(dayPickerMonth);
|
|
61
|
+
return months;
|
|
62
|
+
}, []);
|
|
63
|
+
if (!props.reverseMonths) {
|
|
64
|
+
return dayPickerMonths;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return dayPickerMonths.reverse();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
exports.getMonths = getMonths;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CalendarDay } from '../classes/CalendarDay.mjs';
|
|
2
|
+
import { CalendarWeek } from '../classes/CalendarWeek.mjs';
|
|
3
|
+
import { CalendarMonth } from '../classes/CalendarMonth.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the months to display in the calendar.
|
|
7
|
+
*
|
|
8
|
+
* This function generates `CalendarMonth` objects for each month to be
|
|
9
|
+
* displayed, including their weeks and days, based on the provided display
|
|
10
|
+
* months and dates.
|
|
11
|
+
*
|
|
12
|
+
* @param displayMonths The months (as dates) to display in the calendar.
|
|
13
|
+
* @param dates The dates to display in the calendar.
|
|
14
|
+
* @param props Options from the DayPicker props context.
|
|
15
|
+
* @param dateLib The date library to use for date manipulation.
|
|
16
|
+
* @returns An array of `CalendarMonth` objects representing the months to
|
|
17
|
+
* display.
|
|
18
|
+
*/
|
|
19
|
+
function getMonths(displayMonths, dates, props, dateLib) {
|
|
20
|
+
const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
21
|
+
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
22
|
+
const firstDateOfFirstWeek = props.broadcastCalendar
|
|
23
|
+
? startOfBroadcastWeek(month, dateLib)
|
|
24
|
+
: props.ISOWeek
|
|
25
|
+
? startOfISOWeek(month)
|
|
26
|
+
: startOfWeek(month);
|
|
27
|
+
const lastDateOfLastWeek = props.broadcastCalendar
|
|
28
|
+
? endOfBroadcastWeek(month)
|
|
29
|
+
: props.ISOWeek
|
|
30
|
+
? endOfISOWeek(endOfMonth(month))
|
|
31
|
+
: endOfWeek(endOfMonth(month));
|
|
32
|
+
/** The dates to display in the month. */
|
|
33
|
+
const monthDates = dates.filter((date) => {
|
|
34
|
+
return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
|
|
35
|
+
});
|
|
36
|
+
const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;
|
|
37
|
+
if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {
|
|
38
|
+
const extraDates = dates.filter((date) => {
|
|
39
|
+
const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;
|
|
40
|
+
return (date > lastDateOfLastWeek &&
|
|
41
|
+
date <= addDays(lastDateOfLastWeek, daysToAdd));
|
|
42
|
+
});
|
|
43
|
+
monthDates.push(...extraDates);
|
|
44
|
+
}
|
|
45
|
+
const weeks = monthDates.reduce((weeks, date) => {
|
|
46
|
+
const weekNumber = props.ISOWeek ? getISOWeek(date) : getWeek(date);
|
|
47
|
+
const week = weeks.find((week) => week.weekNumber === weekNumber);
|
|
48
|
+
const day = new CalendarDay(date, month, dateLib);
|
|
49
|
+
if (!week) {
|
|
50
|
+
weeks.push(new CalendarWeek(weekNumber, [day]));
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
week.days.push(day);
|
|
54
|
+
}
|
|
55
|
+
return weeks;
|
|
56
|
+
}, []);
|
|
57
|
+
const dayPickerMonth = new CalendarMonth(month, weeks);
|
|
58
|
+
months.push(dayPickerMonth);
|
|
59
|
+
return months;
|
|
60
|
+
}, []);
|
|
61
|
+
if (!props.reverseMonths) {
|
|
62
|
+
return dayPickerMonths;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return dayPickerMonths.reverse();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { getMonths };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the start and end months for calendar navigation.
|
|
5
|
+
*
|
|
6
|
+
* @param props The DayPicker props, including navigation and layout options.
|
|
7
|
+
* @param dateLib The date library to use for date manipulation.
|
|
8
|
+
* @returns A tuple containing the start and end months for navigation.
|
|
9
|
+
*/
|
|
10
|
+
function getNavMonths(props, dateLib) {
|
|
11
|
+
let { startMonth, endMonth } = props;
|
|
12
|
+
const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today, } = dateLib;
|
|
13
|
+
// Handle deprecated code
|
|
14
|
+
const { fromYear, toYear, fromMonth, toMonth } = props;
|
|
15
|
+
if (!startMonth && fromMonth) {
|
|
16
|
+
startMonth = fromMonth;
|
|
17
|
+
}
|
|
18
|
+
if (!startMonth && fromYear) {
|
|
19
|
+
startMonth = dateLib.newDate(fromYear, 0, 1);
|
|
20
|
+
}
|
|
21
|
+
if (!endMonth && toMonth) {
|
|
22
|
+
endMonth = toMonth;
|
|
23
|
+
}
|
|
24
|
+
if (!endMonth && toYear) {
|
|
25
|
+
endMonth = newDate(toYear, 11, 31);
|
|
26
|
+
}
|
|
27
|
+
const hasYearDropdown = props.captionLayout === "dropdown" ||
|
|
28
|
+
props.captionLayout === "dropdown-years";
|
|
29
|
+
if (startMonth) {
|
|
30
|
+
startMonth = startOfMonth(startMonth);
|
|
31
|
+
}
|
|
32
|
+
else if (fromYear) {
|
|
33
|
+
startMonth = newDate(fromYear, 0, 1);
|
|
34
|
+
}
|
|
35
|
+
else if (!startMonth && hasYearDropdown) {
|
|
36
|
+
startMonth = startOfYear(addYears(props.today ?? today(), -100));
|
|
37
|
+
}
|
|
38
|
+
if (endMonth) {
|
|
39
|
+
endMonth = endOfMonth(endMonth);
|
|
40
|
+
}
|
|
41
|
+
else if (toYear) {
|
|
42
|
+
endMonth = newDate(toYear, 11, 31);
|
|
43
|
+
}
|
|
44
|
+
else if (!endMonth && hasYearDropdown) {
|
|
45
|
+
endMonth = endOfYear(props.today ?? today());
|
|
46
|
+
}
|
|
47
|
+
return [
|
|
48
|
+
startMonth ? startOfDay(startMonth) : startMonth,
|
|
49
|
+
endMonth ? startOfDay(endMonth) : endMonth,
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.getNavMonths = getNavMonths;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the start and end months for calendar navigation.
|
|
3
|
+
*
|
|
4
|
+
* @param props The DayPicker props, including navigation and layout options.
|
|
5
|
+
* @param dateLib The date library to use for date manipulation.
|
|
6
|
+
* @returns A tuple containing the start and end months for navigation.
|
|
7
|
+
*/
|
|
8
|
+
function getNavMonths(props, dateLib) {
|
|
9
|
+
let { startMonth, endMonth } = props;
|
|
10
|
+
const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today, } = dateLib;
|
|
11
|
+
// Handle deprecated code
|
|
12
|
+
const { fromYear, toYear, fromMonth, toMonth } = props;
|
|
13
|
+
if (!startMonth && fromMonth) {
|
|
14
|
+
startMonth = fromMonth;
|
|
15
|
+
}
|
|
16
|
+
if (!startMonth && fromYear) {
|
|
17
|
+
startMonth = dateLib.newDate(fromYear, 0, 1);
|
|
18
|
+
}
|
|
19
|
+
if (!endMonth && toMonth) {
|
|
20
|
+
endMonth = toMonth;
|
|
21
|
+
}
|
|
22
|
+
if (!endMonth && toYear) {
|
|
23
|
+
endMonth = newDate(toYear, 11, 31);
|
|
24
|
+
}
|
|
25
|
+
const hasYearDropdown = props.captionLayout === "dropdown" ||
|
|
26
|
+
props.captionLayout === "dropdown-years";
|
|
27
|
+
if (startMonth) {
|
|
28
|
+
startMonth = startOfMonth(startMonth);
|
|
29
|
+
}
|
|
30
|
+
else if (fromYear) {
|
|
31
|
+
startMonth = newDate(fromYear, 0, 1);
|
|
32
|
+
}
|
|
33
|
+
else if (!startMonth && hasYearDropdown) {
|
|
34
|
+
startMonth = startOfYear(addYears(props.today ?? today(), -100));
|
|
35
|
+
}
|
|
36
|
+
if (endMonth) {
|
|
37
|
+
endMonth = endOfMonth(endMonth);
|
|
38
|
+
}
|
|
39
|
+
else if (toYear) {
|
|
40
|
+
endMonth = newDate(toYear, 11, 31);
|
|
41
|
+
}
|
|
42
|
+
else if (!endMonth && hasYearDropdown) {
|
|
43
|
+
endMonth = endOfYear(props.today ?? today());
|
|
44
|
+
}
|
|
45
|
+
return [
|
|
46
|
+
startMonth ? startOfDay(startMonth) : startMonth,
|
|
47
|
+
endMonth ? startOfDay(endMonth) : endMonth,
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { getNavMonths };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const dateMatchModifiers = require('../utils/dateMatchModifiers.cjs');
|
|
4
|
+
const getFocusableDate = require('./getFocusableDate.cjs');
|
|
5
|
+
const CalendarDay = require('../classes/CalendarDay.cjs');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Determines the next focusable day in the calendar.
|
|
9
|
+
*
|
|
10
|
+
* This function recursively calculates the next focusable day based on the
|
|
11
|
+
* movement direction and modifiers applied to the days.
|
|
12
|
+
*
|
|
13
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
14
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
15
|
+
* @param refDay The currently focused day.
|
|
16
|
+
* @param calendarStartMonth The earliest month the user can navigate to.
|
|
17
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
18
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
19
|
+
* options.
|
|
20
|
+
* @param dateLib The date library to use for date manipulation.
|
|
21
|
+
* @param attempt The current recursion attempt (used to limit recursion depth).
|
|
22
|
+
* @returns The next focusable day, or `undefined` if no focusable day is found.
|
|
23
|
+
*/
|
|
24
|
+
function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {
|
|
25
|
+
if (attempt > 365) {
|
|
26
|
+
// Limit the recursion to 365 attempts
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const focusableDate = getFocusableDate.getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
30
|
+
const isDisabled = Boolean(props.disabled &&
|
|
31
|
+
dateMatchModifiers.dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
32
|
+
const isHidden = Boolean(props.hidden && dateMatchModifiers.dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
33
|
+
const targetMonth = focusableDate;
|
|
34
|
+
const focusDay = new CalendarDay.CalendarDay(focusableDate, targetMonth, dateLib);
|
|
35
|
+
if (!isDisabled && !isHidden) {
|
|
36
|
+
return focusDay;
|
|
37
|
+
}
|
|
38
|
+
// Recursively attempt to find the next focusable date
|
|
39
|
+
return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.getNextFocus = getNextFocus;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { dateMatchModifiers } from '../utils/dateMatchModifiers.mjs';
|
|
2
|
+
import { getFocusableDate } from './getFocusableDate.mjs';
|
|
3
|
+
import { CalendarDay } from '../classes/CalendarDay.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Determines the next focusable day in the calendar.
|
|
7
|
+
*
|
|
8
|
+
* This function recursively calculates the next focusable day based on the
|
|
9
|
+
* movement direction and modifiers applied to the days.
|
|
10
|
+
*
|
|
11
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
12
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
13
|
+
* @param refDay The currently focused day.
|
|
14
|
+
* @param calendarStartMonth The earliest month the user can navigate to.
|
|
15
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
16
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
17
|
+
* options.
|
|
18
|
+
* @param dateLib The date library to use for date manipulation.
|
|
19
|
+
* @param attempt The current recursion attempt (used to limit recursion depth).
|
|
20
|
+
* @returns The next focusable day, or `undefined` if no focusable day is found.
|
|
21
|
+
*/
|
|
22
|
+
function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {
|
|
23
|
+
if (attempt > 365) {
|
|
24
|
+
// Limit the recursion to 365 attempts
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
28
|
+
const isDisabled = Boolean(props.disabled &&
|
|
29
|
+
dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
30
|
+
const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
31
|
+
const targetMonth = focusableDate;
|
|
32
|
+
const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);
|
|
33
|
+
if (!isDisabled && !isHidden) {
|
|
34
|
+
return focusDay;
|
|
35
|
+
}
|
|
36
|
+
// Recursively attempt to find the next focusable date
|
|
37
|
+
return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { getNextFocus };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the next month the user can navigate to, based on the given options.
|
|
5
|
+
*
|
|
6
|
+
* The next month is not always the next calendar month:
|
|
7
|
+
*
|
|
8
|
+
* - If it is after the `calendarEndMonth`, it returns `undefined`.
|
|
9
|
+
* - If paged navigation is enabled, it skips forward by the number of displayed
|
|
10
|
+
* months.
|
|
11
|
+
*
|
|
12
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
13
|
+
* calendar.
|
|
14
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
15
|
+
* @param options Navigation options, including `numberOfMonths` and
|
|
16
|
+
* `pagedNavigation`.
|
|
17
|
+
* @param dateLib The date library to use for date manipulation.
|
|
18
|
+
* @returns The next month, or `undefined` if navigation is not possible.
|
|
19
|
+
*/
|
|
20
|
+
function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {
|
|
21
|
+
if (options.disableNavigation) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const { pagedNavigation, numberOfMonths = 1 } = options;
|
|
25
|
+
const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;
|
|
26
|
+
const offset = pagedNavigation ? numberOfMonths : 1;
|
|
27
|
+
const month = startOfMonth(firstDisplayedMonth);
|
|
28
|
+
if (!calendarEndMonth) {
|
|
29
|
+
return addMonths(month, offset);
|
|
30
|
+
}
|
|
31
|
+
const monthsDiff = differenceInCalendarMonths(calendarEndMonth, firstDisplayedMonth);
|
|
32
|
+
if (monthsDiff < numberOfMonths) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
return addMonths(month, offset);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.getNextMonth = getNextMonth;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the next month the user can navigate to, based on the given options.
|
|
3
|
+
*
|
|
4
|
+
* The next month is not always the next calendar month:
|
|
5
|
+
*
|
|
6
|
+
* - If it is after the `calendarEndMonth`, it returns `undefined`.
|
|
7
|
+
* - If paged navigation is enabled, it skips forward by the number of displayed
|
|
8
|
+
* months.
|
|
9
|
+
*
|
|
10
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
11
|
+
* calendar.
|
|
12
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
13
|
+
* @param options Navigation options, including `numberOfMonths` and
|
|
14
|
+
* `pagedNavigation`.
|
|
15
|
+
* @param dateLib The date library to use for date manipulation.
|
|
16
|
+
* @returns The next month, or `undefined` if navigation is not possible.
|
|
17
|
+
*/
|
|
18
|
+
function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {
|
|
19
|
+
if (options.disableNavigation) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const { pagedNavigation, numberOfMonths = 1 } = options;
|
|
23
|
+
const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;
|
|
24
|
+
const offset = pagedNavigation ? numberOfMonths : 1;
|
|
25
|
+
const month = startOfMonth(firstDisplayedMonth);
|
|
26
|
+
if (!calendarEndMonth) {
|
|
27
|
+
return addMonths(month, offset);
|
|
28
|
+
}
|
|
29
|
+
const monthsDiff = differenceInCalendarMonths(calendarEndMonth, firstDisplayedMonth);
|
|
30
|
+
if (monthsDiff < numberOfMonths) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
return addMonths(month, offset);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { getNextMonth };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the previous month the user can navigate to, based on the given
|
|
5
|
+
* options.
|
|
6
|
+
*
|
|
7
|
+
* The previous month is not always the previous calendar month:
|
|
8
|
+
*
|
|
9
|
+
* - If it is before the `calendarStartMonth`, it returns `undefined`.
|
|
10
|
+
* - If paged navigation is enabled, it skips back by the number of displayed
|
|
11
|
+
* months.
|
|
12
|
+
*
|
|
13
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
14
|
+
* calendar.
|
|
15
|
+
* @param calendarStartMonth The earliest month the user can navigate to.
|
|
16
|
+
* @param options Navigation options, including `numberOfMonths` and
|
|
17
|
+
* `pagedNavigation`.
|
|
18
|
+
* @param dateLib The date library to use for date manipulation.
|
|
19
|
+
* @returns The previous month, or `undefined` if navigation is not possible.
|
|
20
|
+
*/
|
|
21
|
+
function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {
|
|
22
|
+
if (options.disableNavigation) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const { pagedNavigation, numberOfMonths } = options;
|
|
26
|
+
const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;
|
|
27
|
+
const offset = pagedNavigation ? (numberOfMonths ?? 1) : 1;
|
|
28
|
+
const month = startOfMonth(firstDisplayedMonth);
|
|
29
|
+
if (!calendarStartMonth) {
|
|
30
|
+
return addMonths(month, -offset);
|
|
31
|
+
}
|
|
32
|
+
const monthsDiff = differenceInCalendarMonths(month, calendarStartMonth);
|
|
33
|
+
if (monthsDiff <= 0) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
return addMonths(month, -offset);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.getPreviousMonth = getPreviousMonth;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the previous month the user can navigate to, based on the given
|
|
3
|
+
* options.
|
|
4
|
+
*
|
|
5
|
+
* The previous month is not always the previous calendar month:
|
|
6
|
+
*
|
|
7
|
+
* - If it is before the `calendarStartMonth`, it returns `undefined`.
|
|
8
|
+
* - If paged navigation is enabled, it skips back by the number of displayed
|
|
9
|
+
* months.
|
|
10
|
+
*
|
|
11
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
12
|
+
* calendar.
|
|
13
|
+
* @param calendarStartMonth The earliest month the user can navigate to.
|
|
14
|
+
* @param options Navigation options, including `numberOfMonths` and
|
|
15
|
+
* `pagedNavigation`.
|
|
16
|
+
* @param dateLib The date library to use for date manipulation.
|
|
17
|
+
* @returns The previous month, or `undefined` if navigation is not possible.
|
|
18
|
+
*/
|
|
19
|
+
function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {
|
|
20
|
+
if (options.disableNavigation) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const { pagedNavigation, numberOfMonths } = options;
|
|
24
|
+
const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;
|
|
25
|
+
const offset = pagedNavigation ? (numberOfMonths ?? 1) : 1;
|
|
26
|
+
const month = startOfMonth(firstDisplayedMonth);
|
|
27
|
+
if (!calendarStartMonth) {
|
|
28
|
+
return addMonths(month, -offset);
|
|
29
|
+
}
|
|
30
|
+
const monthsDiff = differenceInCalendarMonths(month, calendarStartMonth);
|
|
31
|
+
if (monthsDiff <= 0) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return addMonths(month, -offset);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { getPreviousMonth };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const UI = require('../UI.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the computed style for a day based on its modifiers.
|
|
7
|
+
*
|
|
8
|
+
* This function merges the base styles for the day with any styles associated
|
|
9
|
+
* with active modifiers.
|
|
10
|
+
*
|
|
11
|
+
* @param dayModifiers The modifiers applied to the day.
|
|
12
|
+
* @param styles The base styles for the calendar elements.
|
|
13
|
+
* @param modifiersStyles The styles associated with specific modifiers.
|
|
14
|
+
* @returns The computed style for the day.
|
|
15
|
+
*/
|
|
16
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
17
|
+
let style = { ...styles?.[UI.UI.Day] };
|
|
18
|
+
Object.entries(dayModifiers)
|
|
19
|
+
.filter(([, active]) => active === true)
|
|
20
|
+
.forEach(([modifier]) => {
|
|
21
|
+
style = {
|
|
22
|
+
...style,
|
|
23
|
+
...modifiersStyles?.[modifier],
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
return style;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
exports.getStyleForModifiers = getStyleForModifiers;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UI } from '../UI.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the computed style for a day based on its modifiers.
|
|
5
|
+
*
|
|
6
|
+
* This function merges the base styles for the day with any styles associated
|
|
7
|
+
* with active modifiers.
|
|
8
|
+
*
|
|
9
|
+
* @param dayModifiers The modifiers applied to the day.
|
|
10
|
+
* @param styles The base styles for the calendar elements.
|
|
11
|
+
* @param modifiersStyles The styles associated with specific modifiers.
|
|
12
|
+
* @returns The computed style for the day.
|
|
13
|
+
*/
|
|
14
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
15
|
+
let style = { ...styles?.[UI.Day] };
|
|
16
|
+
Object.entries(dayModifiers)
|
|
17
|
+
.filter(([, active]) => active === true)
|
|
18
|
+
.forEach(([modifier]) => {
|
|
19
|
+
style = {
|
|
20
|
+
...style,
|
|
21
|
+
...modifiersStyles?.[modifier],
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
return style;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { getStyleForModifiers };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generates a series of 7 days, starting from the beginning of the week, to use
|
|
5
|
+
* for formatting weekday names (e.g., Monday, Tuesday, etc.).
|
|
6
|
+
*
|
|
7
|
+
* @param dateLib The date library to use for date manipulation.
|
|
8
|
+
* @param ISOWeek Whether to use ISO week numbering (weeks start on Monday).
|
|
9
|
+
* @param broadcastCalendar Whether to use the broadcast calendar (weeks start
|
|
10
|
+
* on Monday, but may include adjustments for broadcast-specific rules).
|
|
11
|
+
* @returns An array of 7 dates representing the weekdays.
|
|
12
|
+
*/
|
|
13
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
14
|
+
const referenceToday = today ?? dateLib.today();
|
|
15
|
+
const start = broadcastCalendar
|
|
16
|
+
? dateLib.startOfBroadcastWeek(referenceToday, dateLib)
|
|
17
|
+
: ISOWeek
|
|
18
|
+
? dateLib.startOfISOWeek(referenceToday)
|
|
19
|
+
: dateLib.startOfWeek(referenceToday);
|
|
20
|
+
const days = [];
|
|
21
|
+
for (let i = 0; i < 7; i++) {
|
|
22
|
+
const day = dateLib.addDays(start, i);
|
|
23
|
+
days.push(day);
|
|
24
|
+
}
|
|
25
|
+
return days;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
exports.getWeekdays = getWeekdays;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a series of 7 days, starting from the beginning of the week, to use
|
|
3
|
+
* for formatting weekday names (e.g., Monday, Tuesday, etc.).
|
|
4
|
+
*
|
|
5
|
+
* @param dateLib The date library to use for date manipulation.
|
|
6
|
+
* @param ISOWeek Whether to use ISO week numbering (weeks start on Monday).
|
|
7
|
+
* @param broadcastCalendar Whether to use the broadcast calendar (weeks start
|
|
8
|
+
* on Monday, but may include adjustments for broadcast-specific rules).
|
|
9
|
+
* @returns An array of 7 dates representing the weekdays.
|
|
10
|
+
*/
|
|
11
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
12
|
+
const referenceToday = today ?? dateLib.today();
|
|
13
|
+
const start = broadcastCalendar
|
|
14
|
+
? dateLib.startOfBroadcastWeek(referenceToday, dateLib)
|
|
15
|
+
: ISOWeek
|
|
16
|
+
? dateLib.startOfISOWeek(referenceToday)
|
|
17
|
+
: dateLib.startOfWeek(referenceToday);
|
|
18
|
+
const days = [];
|
|
19
|
+
for (let i = 0; i < 7; i++) {
|
|
20
|
+
const day = dateLib.addDays(start, i);
|
|
21
|
+
days.push(day);
|
|
22
|
+
}
|
|
23
|
+
return days;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { getWeekdays };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns an array of calendar weeks from an array of calendar months.
|
|
5
|
+
*
|
|
6
|
+
* @param months The array of calendar months.
|
|
7
|
+
* @returns An array of calendar weeks.
|
|
8
|
+
*/
|
|
9
|
+
function getWeeks(months) {
|
|
10
|
+
const initialWeeks = [];
|
|
11
|
+
return months.reduce((weeks, month) => {
|
|
12
|
+
return weeks.concat(month.weeks.slice());
|
|
13
|
+
}, initialWeeks.slice());
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.getWeeks = getWeeks;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an array of calendar weeks from an array of calendar months.
|
|
3
|
+
*
|
|
4
|
+
* @param months The array of calendar months.
|
|
5
|
+
* @returns An array of calendar weeks.
|
|
6
|
+
*/
|
|
7
|
+
function getWeeks(months) {
|
|
8
|
+
const initialWeeks = [];
|
|
9
|
+
return months.reduce((weeks, month) => {
|
|
10
|
+
return weeks.concat(month.weeks.slice());
|
|
11
|
+
}, initialWeeks.slice());
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { getWeeks };
|