@zealakit/chrono-react 0.0.0-stage → 1.0.0-beta.2
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/LICENSE +21 -0
- package/README.md +625 -2
- package/dist/calendar/components.d.ts +346 -0
- package/dist/calendar/components.js +243 -0
- package/dist/calendar/context.d.ts +636 -0
- package/dist/calendar/context.js +21 -0
- package/dist/calendar/index.d.ts +6 -0
- package/dist/calendar/index.js +6 -0
- package/dist/calendar/mini-calendar.d.ts +60 -0
- package/dist/calendar/mini-calendar.js +51 -0
- package/dist/calendar/options.d.ts +4 -0
- package/dist/calendar/options.js +98 -0
- package/dist/calendar/use-calendar.d.ts +340 -0
- package/dist/calendar/use-calendar.js +154 -0
- package/dist/calendar/use-mini-calendar.d.ts +302 -0
- package/dist/calendar/use-mini-calendar.js +56 -0
- package/dist/calendar/utilities.d.ts +9 -0
- package/dist/calendar/utilities.js +8 -0
- package/dist/date/bind-panel.d.ts +30 -0
- package/dist/date/bind-panel.js +125 -0
- package/dist/date/components.d.ts +197 -0
- package/dist/date/components.js +193 -0
- package/dist/date/context.d.ts +34 -0
- package/dist/date/context.js +19 -0
- package/dist/date/index.d.ts +4 -0
- package/dist/date/index.js +4 -0
- package/dist/date/options.d.ts +7 -0
- package/dist/date/options.js +91 -0
- package/dist/date/use-date-input.d.ts +43 -0
- package/dist/date/use-date-input.js +138 -0
- package/dist/date/use-date-panel.d.ts +81 -0
- package/dist/date/use-date-panel.js +21 -0
- package/dist/date/utilities.d.ts +4 -0
- package/dist/date/utilities.js +4 -0
- package/dist/datetime/components.d.ts +121 -0
- package/dist/datetime/components.js +164 -0
- package/dist/datetime/context.d.ts +8 -0
- package/dist/datetime/context.js +18 -0
- package/dist/datetime/index.d.ts +4 -0
- package/dist/datetime/index.js +4 -0
- package/dist/datetime/options.d.ts +5 -0
- package/dist/datetime/options.js +99 -0
- package/dist/datetime/use-datetime-input.d.ts +44 -0
- package/dist/datetime/use-datetime-input.js +145 -0
- package/dist/datetime/use-datetime-panel.d.ts +128 -0
- package/dist/datetime/use-datetime-panel.js +60 -0
- package/dist/datetime/utilities.d.ts +4 -0
- package/dist/datetime/utilities.js +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/shared/defined-options.d.ts +18 -0
- package/dist/shared/defined-options.js +9 -0
- package/dist/shared/merge-props.d.ts +9 -0
- package/dist/shared/merge-props.js +31 -0
- package/dist/shared/modifiers.d.ts +7 -0
- package/dist/shared/modifiers.js +6 -0
- package/dist/shared/part.d.ts +10 -0
- package/dist/shared/part.js +9 -0
- package/dist/shared/slot.d.ts +12 -0
- package/dist/shared/slot.js +57 -0
- package/dist/shared/style-properties.d.ts +8 -0
- package/dist/shared/style-properties.js +13 -0
- package/dist/shared/to-react-props.d.ts +11 -0
- package/dist/shared/to-react-props.js +27 -0
- package/dist/time/bind-panel.d.ts +19 -0
- package/dist/time/bind-panel.js +97 -0
- package/dist/time/components.d.ts +183 -0
- package/dist/time/components.js +169 -0
- package/dist/time/context.d.ts +24 -0
- package/dist/time/context.js +19 -0
- package/dist/time/index.d.ts +4 -0
- package/dist/time/index.js +4 -0
- package/dist/time/options.d.ts +5 -0
- package/dist/time/options.js +85 -0
- package/dist/time/use-time-input.d.ts +43 -0
- package/dist/time/use-time-input.js +138 -0
- package/dist/time/use-time-panel.d.ts +37 -0
- package/dist/time/use-time-panel.js +18 -0
- package/dist/time/utilities.d.ts +4 -0
- package/dist/time/utilities.js +4 -0
- package/dist/vendor/core/calendar/availability.d.ts +39 -0
- package/dist/vendor/core/calendar/availability.js +73 -0
- package/dist/vendor/core/calendar/controllers/calendar-controller.d.ts +251 -0
- package/dist/vendor/core/calendar/controllers/calendar-controller.js +1396 -0
- package/dist/vendor/core/calendar/controllers/drag-engine.d.ts +99 -0
- package/dist/vendor/core/calendar/controllers/drag-engine.js +363 -0
- package/dist/vendor/core/calendar/controllers/mini-calendar-controller.d.ts +66 -0
- package/dist/vendor/core/calendar/controllers/mini-calendar-controller.js +171 -0
- package/dist/vendor/core/calendar/controllers/shared.d.ts +33 -0
- package/dist/vendor/core/calendar/controllers/shared.js +82 -0
- package/dist/vendor/core/calendar/events/agenda-layout.d.ts +21 -0
- package/dist/vendor/core/calendar/events/agenda-layout.js +72 -0
- package/dist/vendor/core/calendar/events/all-day-row.d.ts +22 -0
- package/dist/vendor/core/calendar/events/all-day-row.js +93 -0
- package/dist/vendor/core/calendar/events/background-layout.d.ts +66 -0
- package/dist/vendor/core/calendar/events/background-layout.js +106 -0
- package/dist/vendor/core/calendar/events/index.d.ts +17 -0
- package/dist/vendor/core/calendar/events/index.js +8 -0
- package/dist/vendor/core/calendar/events/month-layout.d.ts +13 -0
- package/dist/vendor/core/calendar/events/month-layout.js +157 -0
- package/dist/vendor/core/calendar/events/normalize.d.ts +33 -0
- package/dist/vendor/core/calendar/events/normalize.js +156 -0
- package/dist/vendor/core/calendar/events/now-indicator.d.ts +18 -0
- package/dist/vendor/core/calendar/events/now-indicator.js +19 -0
- package/dist/vendor/core/calendar/events/overflow.d.ts +36 -0
- package/dist/vendor/core/calendar/events/overflow.js +112 -0
- package/dist/vendor/core/calendar/events/sort.d.ts +21 -0
- package/dist/vendor/core/calendar/events/sort.js +35 -0
- package/dist/vendor/core/calendar/events/time-grid-layout.d.ts +22 -0
- package/dist/vendor/core/calendar/events/time-grid-layout.js +177 -0
- package/dist/vendor/core/calendar/events/types.d.ts +141 -0
- package/dist/vendor/core/calendar/events/types.js +1 -0
- package/dist/vendor/core/calendar/index.d.ts +70 -0
- package/dist/vendor/core/calendar/index.js +37 -0
- package/dist/vendor/core/calendar/interaction/auto-scroll.d.ts +11 -0
- package/dist/vendor/core/calendar/interaction/auto-scroll.js +37 -0
- package/dist/vendor/core/calendar/interaction/drag-geometry.d.ts +52 -0
- package/dist/vendor/core/calendar/interaction/drag-geometry.js +122 -0
- package/dist/vendor/core/calendar/interaction/drag-keyboard.d.ts +38 -0
- package/dist/vendor/core/calendar/interaction/drag-keyboard.js +53 -0
- package/dist/vendor/core/calendar/interaction/drag-pointer.d.ts +24 -0
- package/dist/vendor/core/calendar/interaction/drag-pointer.js +43 -0
- package/dist/vendor/core/calendar/interaction/event-focus.d.ts +28 -0
- package/dist/vendor/core/calendar/interaction/event-focus.js +44 -0
- package/dist/vendor/core/calendar/interaction/gesture-handle.d.ts +17 -0
- package/dist/vendor/core/calendar/interaction/gesture-handle.js +26 -0
- package/dist/vendor/core/calendar/interaction/hit-test.d.ts +17 -0
- package/dist/vendor/core/calendar/interaction/hit-test.js +26 -0
- package/dist/vendor/core/calendar/interaction/pending.d.ts +17 -0
- package/dist/vendor/core/calendar/interaction/pending.js +17 -0
- package/dist/vendor/core/calendar/interaction/pointer.d.ts +21 -0
- package/dist/vendor/core/calendar/interaction/pointer.js +169 -0
- package/dist/vendor/core/calendar/interaction/selection.d.ts +29 -0
- package/dist/vendor/core/calendar/interaction/selection.js +47 -0
- package/dist/vendor/core/calendar/internal/equal.d.ts +3 -0
- package/dist/vendor/core/calendar/internal/equal.js +43 -0
- package/dist/vendor/core/calendar/navigation/navigate.d.ts +33 -0
- package/dist/vendor/core/calendar/navigation/navigate.js +81 -0
- package/dist/vendor/core/calendar/navigation/range.d.ts +15 -0
- package/dist/vendor/core/calendar/navigation/range.js +52 -0
- package/dist/vendor/core/calendar/navigation/title.d.ts +12 -0
- package/dist/vendor/core/calendar/navigation/title.js +39 -0
- package/dist/vendor/core/calendar/navigation/view-definition.d.ts +39 -0
- package/dist/vendor/core/calendar/navigation/view-definition.js +62 -0
- package/dist/vendor/core/calendar/navigation/zoom.d.ts +5 -0
- package/dist/vendor/core/calendar/navigation/zoom.js +11 -0
- package/dist/vendor/core/calendar/recurrence/apply.d.ts +50 -0
- package/dist/vendor/core/calendar/recurrence/apply.js +206 -0
- package/dist/vendor/core/calendar/recurrence/expand.d.ts +27 -0
- package/dist/vendor/core/calendar/recurrence/expand.js +298 -0
- package/dist/vendor/core/calendar/recurrence/pack.d.ts +3 -0
- package/dist/vendor/core/calendar/recurrence/pack.js +248 -0
- package/dist/vendor/core/calendar/recurrence/rrule-types.d.ts +30 -0
- package/dist/vendor/core/calendar/recurrence/rrule-types.js +8 -0
- package/dist/vendor/core/calendar/recurrence/rrule.d.ts +12 -0
- package/dist/vendor/core/calendar/recurrence/rrule.js +278 -0
- package/dist/vendor/core/calendar/recurrence/series.d.ts +25 -0
- package/dist/vendor/core/calendar/recurrence/series.js +163 -0
- package/dist/vendor/core/calendar/recurrence/types.d.ts +30 -0
- package/dist/vendor/core/calendar/recurrence/types.js +1 -0
- package/dist/vendor/core/calendar/resources/keys.d.ts +2 -0
- package/dist/vendor/core/calendar/resources/keys.js +2 -0
- package/dist/vendor/core/calendar/resources/resource-time-grid.d.ts +7 -0
- package/dist/vendor/core/calendar/resources/resource-time-grid.js +129 -0
- package/dist/vendor/core/calendar/resources/timeline-axis.d.ts +10 -0
- package/dist/vendor/core/calendar/resources/timeline-axis.js +98 -0
- package/dist/vendor/core/calendar/resources/timeline-layout.d.ts +7 -0
- package/dist/vendor/core/calendar/resources/timeline-layout.js +109 -0
- package/dist/vendor/core/calendar/resources/tree.d.ts +10 -0
- package/dist/vendor/core/calendar/resources/tree.js +86 -0
- package/dist/vendor/core/calendar/resources/types.d.ts +177 -0
- package/dist/vendor/core/calendar/resources/types.js +1 -0
- package/dist/vendor/core/calendar/resources/views.d.ts +7 -0
- package/dist/vendor/core/calendar/resources/views.js +45 -0
- package/dist/vendor/core/calendar/resources/windowing.d.ts +11 -0
- package/dist/vendor/core/calendar/resources/windowing.js +17 -0
- package/dist/vendor/core/calendar/views/day.d.ts +37 -0
- package/dist/vendor/core/calendar/views/day.js +36 -0
- package/dist/vendor/core/calendar/views/list-layout.d.ts +8 -0
- package/dist/vendor/core/calendar/views/list-layout.js +5 -0
- package/dist/vendor/core/calendar/views/mini-calendar.d.ts +23 -0
- package/dist/vendor/core/calendar/views/mini-calendar.js +31 -0
- package/dist/vendor/core/calendar/views/month-layout.d.ts +30 -0
- package/dist/vendor/core/calendar/views/month-layout.js +63 -0
- package/dist/vendor/core/calendar/views/time-grid-layout.d.ts +26 -0
- package/dist/vendor/core/calendar/views/time-grid-layout.js +27 -0
- package/dist/vendor/core/date/index.d.ts +9 -0
- package/dist/vendor/core/date/index.js +9 -0
- package/dist/vendor/core/date/input/date-input-controller.d.ts +97 -0
- package/dist/vendor/core/date/input/date-input-controller.js +466 -0
- package/dist/vendor/core/date/input/date-range-input-controller.d.ts +43 -0
- package/dist/vendor/core/date/input/date-range-input-controller.js +186 -0
- package/dist/vendor/core/date/input/parse.d.ts +22 -0
- package/dist/vendor/core/date/input/parse.js +78 -0
- package/dist/vendor/core/date/input/validity.d.ts +6 -0
- package/dist/vendor/core/date/input/validity.js +13 -0
- package/dist/vendor/core/date/panel/panel-controller.d.ts +176 -0
- package/dist/vendor/core/date/panel/panel-controller.js +704 -0
- package/dist/vendor/core/date/presets.d.ts +22 -0
- package/dist/vendor/core/date/presets.js +103 -0
- package/dist/vendor/core/date/selection/multiple.d.ts +7 -0
- package/dist/vendor/core/date/selection/multiple.js +29 -0
- package/dist/vendor/core/date/selection/range.d.ts +29 -0
- package/dist/vendor/core/date/selection/range.js +35 -0
- package/dist/vendor/core/date/types.d.ts +12 -0
- package/dist/vendor/core/date/types.js +1 -0
- package/dist/vendor/core/datetime/compose.d.ts +24 -0
- package/dist/vendor/core/datetime/compose.js +49 -0
- package/dist/vendor/core/datetime/constraints.d.ts +42 -0
- package/dist/vendor/core/datetime/constraints.js +56 -0
- package/dist/vendor/core/datetime/index.d.ts +9 -0
- package/dist/vendor/core/datetime/index.js +9 -0
- package/dist/vendor/core/datetime/input/datetime-input-controller.d.ts +96 -0
- package/dist/vendor/core/datetime/input/datetime-input-controller.js +380 -0
- package/dist/vendor/core/datetime/input/datetime-range-input-controller.d.ts +46 -0
- package/dist/vendor/core/datetime/input/datetime-range-input-controller.js +171 -0
- package/dist/vendor/core/datetime/input/parse.d.ts +20 -0
- package/dist/vendor/core/datetime/input/parse.js +56 -0
- package/dist/vendor/core/datetime/panel/controller.d.ts +64 -0
- package/dist/vendor/core/datetime/panel/controller.js +191 -0
- package/dist/vendor/core/datetime/panel/range-controller.d.ts +71 -0
- package/dist/vendor/core/datetime/panel/range-controller.js +205 -0
- package/dist/vendor/core/datetime/types.d.ts +12 -0
- package/dist/vendor/core/datetime/types.js +1 -0
- package/dist/vendor/core/datetime/zone/day-instants.d.ts +19 -0
- package/dist/vendor/core/datetime/zone/day-instants.js +52 -0
- package/dist/vendor/core/datetime/zone/resolve.d.ts +16 -0
- package/dist/vendor/core/datetime/zone/resolve.js +24 -0
- package/dist/vendor/core/dom/auto-scroll.d.ts +37 -0
- package/dist/vendor/core/dom/auto-scroll.js +57 -0
- package/dist/vendor/core/dom/drag-session.d.ts +25 -0
- package/dist/vendor/core/dom/drag-session.js +257 -0
- package/dist/vendor/core/foundation/a11y/announcer.d.ts +12 -0
- package/dist/vendor/core/foundation/a11y/announcer.js +24 -0
- package/dist/vendor/core/foundation/a11y/grid-navigation.d.ts +19 -0
- package/dist/vendor/core/foundation/a11y/grid-navigation.js +76 -0
- package/dist/vendor/core/foundation/a11y/index.d.ts +8 -0
- package/dist/vendor/core/foundation/a11y/index.js +5 -0
- package/dist/vendor/core/foundation/a11y/labels.d.ts +21 -0
- package/dist/vendor/core/foundation/a11y/labels.js +43 -0
- package/dist/vendor/core/foundation/a11y/messages.d.ts +80 -0
- package/dist/vendor/core/foundation/a11y/messages.js +74 -0
- package/dist/vendor/core/foundation/a11y/roving-focus.d.ts +18 -0
- package/dist/vendor/core/foundation/a11y/roving-focus.js +73 -0
- package/dist/vendor/core/foundation/constraints/availability-rules.d.ts +52 -0
- package/dist/vendor/core/foundation/constraints/availability-rules.js +64 -0
- package/dist/vendor/core/foundation/constraints/availability.d.ts +93 -0
- package/dist/vendor/core/foundation/constraints/availability.js +480 -0
- package/dist/vendor/core/foundation/constraints/date.d.ts +21 -0
- package/dist/vendor/core/foundation/constraints/date.js +41 -0
- package/dist/vendor/core/foundation/constraints/index.d.ts +9 -0
- package/dist/vendor/core/foundation/constraints/index.js +4 -0
- package/dist/vendor/core/foundation/constraints/range.d.ts +44 -0
- package/dist/vendor/core/foundation/constraints/range.js +70 -0
- package/dist/vendor/core/foundation/constraints/time.d.ts +30 -0
- package/dist/vendor/core/foundation/constraints/time.js +56 -0
- package/dist/vendor/core/foundation/grid/index.d.ts +8 -0
- package/dist/vendor/core/foundation/grid/index.js +4 -0
- package/dist/vendor/core/foundation/grid/month-grid.d.ts +33 -0
- package/dist/vendor/core/foundation/grid/month-grid.js +52 -0
- package/dist/vendor/core/foundation/grid/time-axis.d.ts +25 -0
- package/dist/vendor/core/foundation/grid/time-axis.js +32 -0
- package/dist/vendor/core/foundation/grid/weekday-headers.d.ts +17 -0
- package/dist/vendor/core/foundation/grid/weekday-headers.js +26 -0
- package/dist/vendor/core/foundation/grid/year-grid.d.ts +29 -0
- package/dist/vendor/core/foundation/grid/year-grid.js +40 -0
- package/dist/vendor/core/foundation/index.d.ts +8 -0
- package/dist/vendor/core/foundation/index.js +8 -0
- package/dist/vendor/core/foundation/input/form.d.ts +7 -0
- package/dist/vendor/core/foundation/input/form.js +10 -0
- package/dist/vendor/core/foundation/input/index.d.ts +6 -0
- package/dist/vendor/core/foundation/input/index.js +3 -0
- package/dist/vendor/core/foundation/input/segment-engine.d.ts +33 -0
- package/dist/vendor/core/foundation/input/segment-engine.js +45 -0
- package/dist/vendor/core/foundation/input/tokenize.d.ts +19 -0
- package/dist/vendor/core/foundation/input/tokenize.js +24 -0
- package/dist/vendor/core/foundation/locale/digits.d.ts +6 -0
- package/dist/vendor/core/foundation/locale/digits.js +35 -0
- package/dist/vendor/core/foundation/locale/direction.d.ts +1 -0
- package/dist/vendor/core/foundation/locale/direction.js +25 -0
- package/dist/vendor/core/foundation/locale/format.d.ts +31 -0
- package/dist/vendor/core/foundation/locale/format.js +77 -0
- package/dist/vendor/core/foundation/locale/hour-cycle.d.ts +12 -0
- package/dist/vendor/core/foundation/locale/hour-cycle.js +41 -0
- package/dist/vendor/core/foundation/locale/index.d.ts +10 -0
- package/dist/vendor/core/foundation/locale/index.js +8 -0
- package/dist/vendor/core/foundation/locale/names.d.ts +6 -0
- package/dist/vendor/core/foundation/locale/names.js +30 -0
- package/dist/vendor/core/foundation/locale/resolve.d.ts +7 -0
- package/dist/vendor/core/foundation/locale/resolve.js +39 -0
- package/dist/vendor/core/foundation/locale/week-info.d.ts +5 -0
- package/dist/vendor/core/foundation/locale/week-info.js +60 -0
- package/dist/vendor/core/foundation/locale/zone-label.d.ts +6 -0
- package/dist/vendor/core/foundation/locale/zone-label.js +24 -0
- package/dist/vendor/core/foundation/ranges/date-range.d.ts +18 -0
- package/dist/vendor/core/foundation/ranges/date-range.js +40 -0
- package/dist/vendor/core/foundation/ranges/index.d.ts +4 -0
- package/dist/vendor/core/foundation/ranges/index.js +2 -0
- package/dist/vendor/core/foundation/ranges/interval.d.ts +24 -0
- package/dist/vendor/core/foundation/ranges/interval.js +54 -0
- package/dist/vendor/core/foundation/store/attributes.d.ts +19 -0
- package/dist/vendor/core/foundation/store/attributes.js +43 -0
- package/dist/vendor/core/foundation/store/controllable.d.ts +19 -0
- package/dist/vendor/core/foundation/store/controllable.js +50 -0
- package/dist/vendor/core/foundation/store/env.d.ts +1 -0
- package/dist/vendor/core/foundation/store/env.js +3 -0
- package/dist/vendor/core/foundation/store/ids.d.ts +9 -0
- package/dist/vendor/core/foundation/store/ids.js +12 -0
- package/dist/vendor/core/foundation/store/index.d.ts +11 -0
- package/dist/vendor/core/foundation/store/index.js +7 -0
- package/dist/vendor/core/foundation/store/store.d.ts +7 -0
- package/dist/vendor/core/foundation/store/store.js +25 -0
- package/dist/vendor/core/foundation/store/ticker.d.ts +11 -0
- package/dist/vendor/core/foundation/store/ticker.js +27 -0
- package/dist/vendor/core/foundation/store/with-optional.d.ts +15 -0
- package/dist/vendor/core/foundation/store/with-optional.js +3 -0
- package/dist/vendor/core/foundation/values/clock.d.ts +4 -0
- package/dist/vendor/core/foundation/values/clock.js +21 -0
- package/dist/vendor/core/foundation/values/compare.d.ts +16 -0
- package/dist/vendor/core/foundation/values/compare.js +70 -0
- package/dist/vendor/core/foundation/values/convert.d.ts +31 -0
- package/dist/vendor/core/foundation/values/convert.js +108 -0
- package/dist/vendor/core/foundation/values/epoch-day.d.ts +15 -0
- package/dist/vendor/core/foundation/values/epoch-day.js +43 -0
- package/dist/vendor/core/foundation/values/index.d.ts +14 -0
- package/dist/vendor/core/foundation/values/index.js +10 -0
- package/dist/vendor/core/foundation/values/iso.d.ts +24 -0
- package/dist/vendor/core/foundation/values/iso.js +111 -0
- package/dist/vendor/core/foundation/values/plain-date-time.d.ts +8 -0
- package/dist/vendor/core/foundation/values/plain-date-time.js +25 -0
- package/dist/vendor/core/foundation/values/plain-date.d.ts +33 -0
- package/dist/vendor/core/foundation/values/plain-date.js +105 -0
- package/dist/vendor/core/foundation/values/plain-time.d.ts +15 -0
- package/dist/vendor/core/foundation/values/plain-time.js +43 -0
- package/dist/vendor/core/foundation/values/types.d.ts +37 -0
- package/dist/vendor/core/foundation/values/types.js +1 -0
- package/dist/vendor/core/foundation/values/week.d.ts +9 -0
- package/dist/vendor/core/foundation/values/week.js +31 -0
- package/dist/vendor/core/foundation/values/year-month.d.ts +10 -0
- package/dist/vendor/core/foundation/values/year-month.js +19 -0
- package/dist/vendor/core/foundation/values/zoned.d.ts +16 -0
- package/dist/vendor/core/foundation/values/zoned.js +152 -0
- package/dist/vendor/core/index.d.ts +5 -0
- package/dist/vendor/core/index.js +5 -0
- package/dist/vendor/core/time/index.d.ts +8 -0
- package/dist/vendor/core/time/index.js +8 -0
- package/dist/vendor/core/time/input/parse.d.ts +19 -0
- package/dist/vendor/core/time/input/parse.js +82 -0
- package/dist/vendor/core/time/input/time-input-controller.d.ts +102 -0
- package/dist/vendor/core/time/input/time-input-controller.js +547 -0
- package/dist/vendor/core/time/input/time-range-input-controller.d.ts +49 -0
- package/dist/vendor/core/time/input/time-range-input-controller.js +178 -0
- package/dist/vendor/core/time/input/validity.d.ts +7 -0
- package/dist/vendor/core/time/input/validity.js +16 -0
- package/dist/vendor/core/time/panel/time-panel-controller.d.ts +163 -0
- package/dist/vendor/core/time/panel/time-panel-controller.js +809 -0
- package/dist/vendor/core/time/selection/range.d.ts +25 -0
- package/dist/vendor/core/time/selection/range.js +35 -0
- package/dist/vendor/core/time/selection/slots.d.ts +46 -0
- package/dist/vendor/core/time/selection/slots.js +76 -0
- package/dist/vendor/core/time/types.d.ts +11 -0
- package/dist/vendor/core/time/types.js +1 -0
- package/package.json +83 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export const defaultMessages = Object.freeze({
|
|
2
|
+
today: "today",
|
|
3
|
+
selected: "selected",
|
|
4
|
+
unavailable: "unavailable",
|
|
5
|
+
partiallyAvailable: "partially available",
|
|
6
|
+
disabled: "disabled",
|
|
7
|
+
rangeStart: "range start",
|
|
8
|
+
rangeEnd: "range end",
|
|
9
|
+
inRange: "in range",
|
|
10
|
+
previous: "Previous",
|
|
11
|
+
next: "Next",
|
|
12
|
+
goToToday: "Today",
|
|
13
|
+
calendar: "Calendar",
|
|
14
|
+
weekNumber: "Week {number}",
|
|
15
|
+
hasEvents: "has events",
|
|
16
|
+
events: "events",
|
|
17
|
+
moreEvents: "{count} more events",
|
|
18
|
+
allDay: "All day",
|
|
19
|
+
cellEvents: "{count} events",
|
|
20
|
+
selectionCreated: "Selected {range}",
|
|
21
|
+
selectionCancelled: "Selection cancelled",
|
|
22
|
+
eventSelected: "Event selected",
|
|
23
|
+
recurring: "recurring event",
|
|
24
|
+
editInstructions: "Press M to move, R to resize",
|
|
25
|
+
moving: "Moving {event}, {range}",
|
|
26
|
+
resizing: "Resizing {event}, {range}",
|
|
27
|
+
movedTo: "Moved to {range}",
|
|
28
|
+
resizedTo: "Resized to {range}",
|
|
29
|
+
changeCancelled: "Change cancelled",
|
|
30
|
+
notAllowedHere: "Not allowed here",
|
|
31
|
+
chooseMonth: "Choose month",
|
|
32
|
+
chooseYear: "Choose year",
|
|
33
|
+
clear: "Clear",
|
|
34
|
+
startDate: "Start date",
|
|
35
|
+
endDate: "End date",
|
|
36
|
+
selectedCount: "{count} dates selected",
|
|
37
|
+
placeholderDay: "dd",
|
|
38
|
+
placeholderMonth: "mm",
|
|
39
|
+
placeholderYear: "yyyy",
|
|
40
|
+
day: "Day",
|
|
41
|
+
month: "Month",
|
|
42
|
+
year: "Year",
|
|
43
|
+
empty: "Empty",
|
|
44
|
+
placeholderHour: "hh",
|
|
45
|
+
placeholderMinute: "mm",
|
|
46
|
+
placeholderSecond: "ss",
|
|
47
|
+
placeholderDayPeriod: "--",
|
|
48
|
+
hour: "Hour",
|
|
49
|
+
minute: "Minute",
|
|
50
|
+
second: "Second",
|
|
51
|
+
dayPeriod: "AM/PM",
|
|
52
|
+
startTime: "Start time",
|
|
53
|
+
endTime: "End time",
|
|
54
|
+
time: "Time",
|
|
55
|
+
date: "Date",
|
|
56
|
+
adjustedTime: "adjusted for daylight saving time",
|
|
57
|
+
timeZone: "Time zone",
|
|
58
|
+
startDateTime: "Start date and time",
|
|
59
|
+
endDateTime: "End date and time",
|
|
60
|
+
});
|
|
61
|
+
/** Replace `{name}` placeholders in a message template. */
|
|
62
|
+
export function formatMessage(template, values) {
|
|
63
|
+
return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
|
|
64
|
+
}
|
|
65
|
+
export function mergeMessages(defaults, overrides) {
|
|
66
|
+
const merged = { ...defaults };
|
|
67
|
+
for (const key of Object.keys(overrides ?? {})) {
|
|
68
|
+
const value = overrides?.[key];
|
|
69
|
+
if (value !== undefined) {
|
|
70
|
+
merged[key] = value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return merged;
|
|
74
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PlainDate } from "../values/types.js";
|
|
2
|
+
type DateKey = PlainDate | string;
|
|
3
|
+
/**
|
|
4
|
+
* Move DOM focus to the cell carrying `data-chrono-key`. Call it from
|
|
5
|
+
* lifecycle code only (an effect), never during render. Returns `false` when
|
|
6
|
+
* the cell is not rendered.
|
|
7
|
+
*/
|
|
8
|
+
export declare function focusDateCell(container: ParentNode, date: DateKey): boolean;
|
|
9
|
+
/** Roving tabindex: only the focused cell is a tab stop. */
|
|
10
|
+
export declare function syncRovingTabIndex(container: ParentNode, focused: DateKey): void;
|
|
11
|
+
/** Move DOM focus to the input segment carrying `data-chrono-part` (plan 06 A10). */
|
|
12
|
+
export declare function focusPart(container: ParentNode, part: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Keep an option inside its scrolling listbox (plan 07 T15, R7). DOM behavior, not
|
|
15
|
+
* styling; never throws where `scrollIntoView` or its options form is missing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function scrollOptionIntoView(element: Element | null): void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar focus helpers — **calendar rule, not an engine candidate** (X16, spec §7).
|
|
3
|
+
*
|
|
4
|
+
* The engine's `createRovingFocus` manages a one-dimensional list: it owns one
|
|
5
|
+
* `keydown` + one `focusin` listener on a container, keeps its own active index,
|
|
6
|
+
* and applies `tabindex` to items it is handed. Chrono's grid cannot use it:
|
|
7
|
+
*
|
|
8
|
+
* - the cells are keyed by data (`data-chrono-key`, ISO dates; outside-month cells
|
|
9
|
+
* are skipped), not by a list order;
|
|
10
|
+
* - movement is two-dimensional and calendar-specific (week, month, PageUp/PageDown,
|
|
11
|
+
* year) and comes from the pure `grid-navigation.ts` rules, driven by the
|
|
12
|
+
* controller state — not from arrow-key listeners per container;
|
|
13
|
+
* - the tabindex for every cell is rendered from controller state
|
|
14
|
+
* (`tabindex: focused ? 0 : -1`), and the adapters only synchronise focus and the
|
|
15
|
+
* DOM attribute after a render. Registering an engine listener as well would
|
|
16
|
+
* duplicate the keydown ownership and break NP1.
|
|
17
|
+
*
|
|
18
|
+
* The helpers below are the DOM half of that model: data-keyed focus and tabindex
|
|
19
|
+
* sync, plus direct part focus for input segments. They stay in Core.
|
|
20
|
+
*/
|
|
21
|
+
import { toIsoString } from "../values/iso.js";
|
|
22
|
+
const keyOf = (value) => (typeof value === "string" ? value : toIsoString(value));
|
|
23
|
+
const escapeAttribute = (key) => key.replace(/["\\]/g, "\\$&");
|
|
24
|
+
function findCell(container, key) {
|
|
25
|
+
const selector = `[data-chrono-key="${escapeAttribute(key)}"]`;
|
|
26
|
+
return (container.querySelector(`${selector}:not([data-outside-month])`) ??
|
|
27
|
+
container.querySelector(selector));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Move DOM focus to the cell carrying `data-chrono-key`. Call it from
|
|
31
|
+
* lifecycle code only (an effect), never during render. Returns `false` when
|
|
32
|
+
* the cell is not rendered.
|
|
33
|
+
*/
|
|
34
|
+
export function focusDateCell(container, date) {
|
|
35
|
+
const cell = findCell(container, keyOf(date));
|
|
36
|
+
if (!cell) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
cell.focus();
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
/** Roving tabindex: only the focused cell is a tab stop. */
|
|
43
|
+
export function syncRovingTabIndex(container, focused) {
|
|
44
|
+
const key = keyOf(focused);
|
|
45
|
+
const target = findCell(container, key);
|
|
46
|
+
for (const cell of container.querySelectorAll("[data-chrono-key]")) {
|
|
47
|
+
cell.tabIndex = cell === target ? 0 : -1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Move DOM focus to the input segment carrying `data-chrono-part` (plan 06 A10). */
|
|
51
|
+
export function focusPart(container, part) {
|
|
52
|
+
const element = container.querySelector(`[data-chrono-part="${escapeAttribute(part)}"]`);
|
|
53
|
+
if (!element) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
element.focus();
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Keep an option inside its scrolling listbox (plan 07 T15, R7). DOM behavior, not
|
|
61
|
+
* styling; never throws where `scrollIntoView` or its options form is missing.
|
|
62
|
+
*/
|
|
63
|
+
export function scrollOptionIntoView(element) {
|
|
64
|
+
if (!element || typeof element.scrollIntoView !== "function") {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
element.scrollIntoView({ block: "nearest" });
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
element.scrollIntoView();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { DayOfWeek, PlainDate } from "../values/types.js";
|
|
2
|
+
/** Fields every rule may carry (plan 11 V2). */
|
|
3
|
+
export type AvailabilityRuleMeta = {
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Human wording for "why" (plan 11 V12). */
|
|
6
|
+
reason?: string;
|
|
7
|
+
/** App data; never serialized into the DOM (plan 11 R7). */
|
|
8
|
+
data?: unknown;
|
|
9
|
+
resourceId?: string | readonly string[];
|
|
10
|
+
};
|
|
11
|
+
export type DailyAvailabilityRule = AvailabilityRuleMeta & {
|
|
12
|
+
type: "daily";
|
|
13
|
+
/** `"09:00"` or `"09:00:00"`; `"24:00"` is allowed for `end`. */
|
|
14
|
+
start: string;
|
|
15
|
+
end: string;
|
|
16
|
+
};
|
|
17
|
+
export type WeeklyAvailabilityRule = AvailabilityRuleMeta & {
|
|
18
|
+
type: "weekly";
|
|
19
|
+
days: readonly DayOfWeek[];
|
|
20
|
+
/** Defaults to `"00:00"`. */
|
|
21
|
+
start?: string;
|
|
22
|
+
/** Defaults to `"24:00"` (the whole day). */
|
|
23
|
+
end?: string;
|
|
24
|
+
};
|
|
25
|
+
export type DatesAvailabilityRule = AvailabilityRuleMeta & {
|
|
26
|
+
type: "dates";
|
|
27
|
+
dates: readonly (PlainDate | string)[];
|
|
28
|
+
start?: string;
|
|
29
|
+
end?: string;
|
|
30
|
+
};
|
|
31
|
+
export type RangeAvailabilityRule = AvailabilityRuleMeta & {
|
|
32
|
+
type: "range";
|
|
33
|
+
/** A date (whole days, half-open) or a date-time (half-open over wall time). */
|
|
34
|
+
start: PlainDate | string;
|
|
35
|
+
end: PlainDate | string;
|
|
36
|
+
};
|
|
37
|
+
export type AvailabilityRule = DailyAvailabilityRule | WeeklyAvailabilityRule | DatesAvailabilityRule | RangeAvailabilityRule;
|
|
38
|
+
/** A rule whose `dates` are already `PlainDate` values. */
|
|
39
|
+
export type NormalizedAvailabilityRule = Exclude<AvailabilityRule, DatesAvailabilityRule> | (Omit<DatesAvailabilityRule, "dates"> & {
|
|
40
|
+
dates: readonly PlainDate[];
|
|
41
|
+
});
|
|
42
|
+
/** Seconds since local midnight for a `"HH:mm"` or `"HH:mm:ss"` token. `"24:00"` is 86400. */
|
|
43
|
+
export declare function timeTokenToSeconds(token: string): number;
|
|
44
|
+
/** Normalize `dates` (strings or values) once, at compile time. */
|
|
45
|
+
export declare function normalizeRule(rule: AvailabilityRule): NormalizedAvailabilityRule;
|
|
46
|
+
/** Whether a rule applies to `resourceId` (rules without one apply to everything). */
|
|
47
|
+
export declare function ruleMatchesResource(rule: AvailabilityRule, resourceId: string | undefined): boolean;
|
|
48
|
+
/** The wall-time window of a day-scoped rule on `day`, as instants in `zone`. */
|
|
49
|
+
export declare function expandRuleDay(rule: Exclude<AvailabilityRule, RangeAvailabilityRule>, day: PlainDate, zone: string): {
|
|
50
|
+
start: number;
|
|
51
|
+
end: number;
|
|
52
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { addDays, dayOfWeek, toEpochDay } from "../values/plain-date.js";
|
|
2
|
+
import { SECONDS_PER_DAY } from "../values/plain-time.js";
|
|
3
|
+
import { fromSecondOfDay } from "../values/plain-time.js";
|
|
4
|
+
import { plainDateTime } from "../values/plain-date-time.js";
|
|
5
|
+
import { parseIsoDate } from "../values/iso.js";
|
|
6
|
+
import { toInstant, toZoned } from "../values/zoned.js";
|
|
7
|
+
const TIME_TOKEN = /^(\d{1,2}):(\d{2})(?::(\d{2}))?$/;
|
|
8
|
+
/** Seconds since local midnight for a `"HH:mm"` or `"HH:mm:ss"` token. `"24:00"` is 86400. */
|
|
9
|
+
export function timeTokenToSeconds(token) {
|
|
10
|
+
const match = TIME_TOKEN.exec(token.trim());
|
|
11
|
+
if (!match) {
|
|
12
|
+
throw new RangeError(`Invalid time "${token}": expected "HH:mm".`);
|
|
13
|
+
}
|
|
14
|
+
const hour = Number(match[1]);
|
|
15
|
+
const minute = Number(match[2]);
|
|
16
|
+
const second = Number(match[3] ?? 0);
|
|
17
|
+
if (hour === 24 && minute === 0 && second === 0) {
|
|
18
|
+
return SECONDS_PER_DAY;
|
|
19
|
+
}
|
|
20
|
+
if (hour > 23 || minute > 59 || second > 59) {
|
|
21
|
+
throw new RangeError(`Invalid time "${token}": out of range.`);
|
|
22
|
+
}
|
|
23
|
+
return hour * 3600 + minute * 60 + second;
|
|
24
|
+
}
|
|
25
|
+
/** Normalize `dates` (strings or values) once, at compile time. */
|
|
26
|
+
export function normalizeRule(rule) {
|
|
27
|
+
if (rule.type === "dates") {
|
|
28
|
+
return {
|
|
29
|
+
...rule,
|
|
30
|
+
dates: rule.dates.map((date) => (typeof date === "string" ? parseIsoDate(date) : date)),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return rule;
|
|
34
|
+
}
|
|
35
|
+
/** Whether a rule applies to `resourceId` (rules without one apply to everything). */
|
|
36
|
+
export function ruleMatchesResource(rule, resourceId) {
|
|
37
|
+
const target = rule.resourceId;
|
|
38
|
+
if (target === undefined) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (resourceId === undefined) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return typeof target === "string" ? target === resourceId : target.includes(resourceId);
|
|
45
|
+
}
|
|
46
|
+
/** The wall-time window of a day-scoped rule on `day`, as instants in `zone`. */
|
|
47
|
+
export function expandRuleDay(rule, day, zone) {
|
|
48
|
+
if (rule.type === "weekly" && !rule.days.includes(dayOfWeek(day))) {
|
|
49
|
+
return { start: 0, end: 0 };
|
|
50
|
+
}
|
|
51
|
+
if (rule.type === "dates" &&
|
|
52
|
+
!rule.dates.some((value) => toEpochDay(value) === toEpochDay(day))) {
|
|
53
|
+
return { start: 0, end: 0 };
|
|
54
|
+
}
|
|
55
|
+
const startSeconds = rule.start === undefined ? 0 : timeTokenToSeconds(rule.start);
|
|
56
|
+
const rawEnd = rule.end === undefined ? SECONDS_PER_DAY : timeTokenToSeconds(rule.end);
|
|
57
|
+
if (rawEnd === startSeconds) {
|
|
58
|
+
throw new RangeError(`Availability ${rule.type} rule start and end are equal ("${rule.start}").`);
|
|
59
|
+
}
|
|
60
|
+
const endDay = rawEnd >= SECONDS_PER_DAY || rawEnd < startSeconds ? addDays(day, 1) : day;
|
|
61
|
+
const start = toInstant(toZoned(plainDateTime(day, fromSecondOfDay(startSeconds)), zone, "compatible"));
|
|
62
|
+
const end = toInstant(toZoned(plainDateTime(endDay, fromSecondOfDay(rawEnd % SECONDS_PER_DAY)), zone, "compatible"));
|
|
63
|
+
return { start, end };
|
|
64
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { DateRange } from "../ranges/date-range.js";
|
|
2
|
+
import type { DayOfWeek, PlainDate, PlainDateTime, PlainTime, ZonedDateTime } from "../values/types.js";
|
|
3
|
+
import { type AvailabilityRule } from "./availability-rules.js";
|
|
4
|
+
export type { AvailabilityRule, AvailabilityRuleMeta, DailyAvailabilityRule, DatesAvailabilityRule, RangeAvailabilityRule, WeeklyAvailabilityRule, } from "./availability-rules.js";
|
|
5
|
+
/** Lead time before `now` (plan 11 V13). Fields combine; the latest bound wins. */
|
|
6
|
+
export type AvailabilityLeadTime = {
|
|
7
|
+
minutes?: number;
|
|
8
|
+
hours?: number;
|
|
9
|
+
days?: number;
|
|
10
|
+
businessDays?: number;
|
|
11
|
+
};
|
|
12
|
+
export type AvailabilityBookingWindow = {
|
|
13
|
+
days?: number;
|
|
14
|
+
months?: number;
|
|
15
|
+
};
|
|
16
|
+
/** The one availability model (plan 11 V1–V5, V13). */
|
|
17
|
+
export type AvailabilitySpec = {
|
|
18
|
+
/** Only times inside an `open` rule are available. Without `open`, everything is open. */
|
|
19
|
+
open?: readonly AvailabilityRule[] | undefined;
|
|
20
|
+
/** Always unavailable; `blocked` wins over `open`. */
|
|
21
|
+
blocked?: readonly AvailabilityRule[] | undefined;
|
|
22
|
+
/** The zone the rule wall times are written in. */
|
|
23
|
+
timeZone?: string;
|
|
24
|
+
/** Nothing before `now` + lead time is available. Needs `now` at compile time. */
|
|
25
|
+
leadTime?: AvailabilityLeadTime | undefined;
|
|
26
|
+
/** Wall time after which "today" no longer counts for `businessDays` lead time. */
|
|
27
|
+
cutoffTime?: string;
|
|
28
|
+
/** Nothing after `now` + the window is available. */
|
|
29
|
+
bookingWindow?: AvailabilityBookingWindow | undefined;
|
|
30
|
+
};
|
|
31
|
+
/** The pre-plan-11 shape, accepted for one minor version (plan 11 R1). */
|
|
32
|
+
export type LegacyAvailabilitySpec = {
|
|
33
|
+
dates?: readonly PlainDate[];
|
|
34
|
+
ranges?: readonly DateRange[];
|
|
35
|
+
weekdays?: readonly DayOfWeek[];
|
|
36
|
+
mode: "available" | "blocked";
|
|
37
|
+
};
|
|
38
|
+
export type AvailabilityStatus = "available" | "partial" | "unavailable";
|
|
39
|
+
/** A contiguous piece of `[start, end)` with a status, in epoch milliseconds. */
|
|
40
|
+
export type AvailabilityInterval = {
|
|
41
|
+
start: number;
|
|
42
|
+
end: number;
|
|
43
|
+
status: "available" | "unavailable";
|
|
44
|
+
/** The blocked rules overlapping an unavailable piece (lead time is `id: "lead-time"`). */
|
|
45
|
+
rules: readonly AvailabilityRule[];
|
|
46
|
+
};
|
|
47
|
+
/** The compiled availability model (plan 11 V4, R1, R3). */
|
|
48
|
+
export type Availability = {
|
|
49
|
+
/** The zone the spec's wall times are written in (plan 11 V5). */
|
|
50
|
+
readonly timeZone: string;
|
|
51
|
+
readonly spec: AvailabilitySpec;
|
|
52
|
+
/** `"available"` (all potential time is free), `"partial"` (some is blocked), `"unavailable"`. */
|
|
53
|
+
getDayStatus(date: PlainDate, resourceId?: string): AvailabilityStatus;
|
|
54
|
+
/** Contiguous pieces covering exactly `[start, end)` in the display zone. */
|
|
55
|
+
getIntervals(start: AvailabilityInput, end: AvailabilityInput, resourceId?: string): AvailabilityInterval[];
|
|
56
|
+
isTimeAvailable(date: PlainDate, time: PlainTime, resourceId?: string): boolean;
|
|
57
|
+
isRangeAvailable(start: AvailabilityInput, end: AvailabilityInput, resourceId?: string): boolean;
|
|
58
|
+
/** The nearest day strictly after (`1`) or before (`-1`) with some available time. */
|
|
59
|
+
nextAvailable(date: PlainDate, direction: 1 | -1, resourceId?: string): PlainDate | null;
|
|
60
|
+
/** Legacy: `getDayStatus(date) !== "unavailable"` (plan 11 R1). */
|
|
61
|
+
isAvailable(date: PlainDate): boolean;
|
|
62
|
+
};
|
|
63
|
+
export type AvailabilityInput = PlainDate | PlainDateTime | ZonedDateTime | string;
|
|
64
|
+
export type AvailabilityOptions = {
|
|
65
|
+
/** The display zone; defaults to `spec.timeZone`. */
|
|
66
|
+
timeZone?: string | undefined;
|
|
67
|
+
/** The instant "now" for lead time and booking windows (epoch ms). */
|
|
68
|
+
now?: number | undefined;
|
|
69
|
+
};
|
|
70
|
+
/** `true` for the pre-plan-11 shape (plan 11 R1). */
|
|
71
|
+
export declare function isLegacyAvailabilitySpec(input: AvailabilitySpec | LegacyAvailabilitySpec): input is LegacyAvailabilitySpec;
|
|
72
|
+
/** Convert the old shape into open/blocked rules (plan 11 R1). */
|
|
73
|
+
export declare function legacyToAvailabilitySpec(input: LegacyAvailabilitySpec): AvailabilitySpec;
|
|
74
|
+
/**
|
|
75
|
+
* Compile an availability model (plan 11 V4). Pass `now` for lead time and
|
|
76
|
+
* booking windows; without it those fields are skipped (no implicit clock read).
|
|
77
|
+
*/
|
|
78
|
+
export declare function createAvailability(input: AvailabilitySpec | LegacyAvailabilitySpec, options?: AvailabilityOptions): Availability;
|
|
79
|
+
/** A day with some available time (plan 11 V14). */
|
|
80
|
+
export declare function isBusinessDay(date: PlainDate, availability: Availability): boolean;
|
|
81
|
+
/** Move `count` business days (0 = `date` or the next business day). */
|
|
82
|
+
export declare function addBusinessDays(date: PlainDate, count: number, availability: Availability): PlainDate;
|
|
83
|
+
/** Business days in an inclusive date range (plan 11 V14). */
|
|
84
|
+
export declare function countBusinessDays(range: DateRange, availability: Availability): number;
|
|
85
|
+
/** The first rule's `reason`, if any (plan 11 V12). */
|
|
86
|
+
export declare function getAvailabilityLabel(rules: readonly AvailabilityRule[]): string;
|
|
87
|
+
/**
|
|
88
|
+
* Compile once per spec identity **and** options (plan 11 R7): the same spec in
|
|
89
|
+
* another zone, or with another `now`, is a different model.
|
|
90
|
+
*/
|
|
91
|
+
export declare function compileAvailability(input: AvailabilitySpec | Availability, options?: AvailabilityOptions): Availability;
|
|
92
|
+
/** Time-only components use `daily` rules only (plan 11 V6). */
|
|
93
|
+
export declare function filterDailyRules(spec: AvailabilitySpec): AvailabilitySpec;
|