@flux-ui/components 3.0.0-next.58 → 3.0.0-next.59

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.
Files changed (301) hide show
  1. package/dist/component/FluxButtonStack.vue.d.ts +1 -1
  2. package/dist/component/FluxCalendar.vue.d.ts +63 -2
  3. package/dist/component/{FluxCalendarEvent.vue.d.ts → FluxCalendarItem.vue.d.ts} +9 -7
  4. package/dist/component/FluxClickablePane.vue.d.ts +1 -1
  5. package/dist/component/FluxDivider.vue.d.ts +1 -1
  6. package/dist/component/FluxFilter.vue.d.ts +1 -1
  7. package/dist/component/FluxFilterBar.vue.d.ts +1 -1
  8. package/dist/component/FluxFormInput.vue.d.ts +2 -2
  9. package/dist/component/FluxFormInputAddition.vue.d.ts +1 -1
  10. package/dist/component/FluxFormTreeViewSelect.vue.d.ts +3 -3
  11. package/dist/component/FluxGallery.vue.d.ts +1 -1
  12. package/dist/component/FluxInfo.vue.d.ts +1 -1
  13. package/dist/component/FluxKanbanColumn.vue.d.ts +2 -2
  14. package/dist/component/{FluxKanbanCard.vue.d.ts → FluxKanbanItem.vue.d.ts} +1 -1
  15. package/dist/component/FluxMenuItem.vue.d.ts +1 -1
  16. package/dist/component/FluxNotice.vue.d.ts +1 -1
  17. package/dist/component/FluxPaneHeader.vue.d.ts +1 -1
  18. package/dist/component/FluxPressable.vue.d.ts +1 -1
  19. package/dist/component/FluxPrompt.vue.d.ts +3 -3
  20. package/dist/component/FluxSplitButton.vue.d.ts +1 -1
  21. package/dist/component/FluxStack.vue.d.ts +1 -1
  22. package/dist/component/FluxTab.vue.d.ts +1 -1
  23. package/dist/component/FluxTabBar.vue.d.ts +4 -1
  24. package/dist/component/FluxTabs.vue.d.ts +4 -1
  25. package/dist/component/FluxTimelineItem.vue.d.ts +1 -1
  26. package/dist/component/calendar/FluxCalendarItemDisplay.vue.d.ts +9 -0
  27. package/dist/component/calendar/FluxCalendarMonthView.vue.d.ts +19 -0
  28. package/dist/component/calendar/FluxCalendarTimeGridView.vue.d.ts +36 -0
  29. package/dist/component/calendar/index.d.ts +3 -0
  30. package/dist/component/index.d.ts +2 -2
  31. package/dist/component/primitive/DialogLayout.vue.d.ts +1 -1
  32. package/dist/component/primitive/SelectBase.vue.d.ts +3 -3
  33. package/dist/composable/index.d.ts +3 -0
  34. package/dist/composable/private/index.d.ts +5 -8
  35. package/dist/composable/private/useKanban.d.ts +2 -2
  36. package/dist/composable/private/useKanbanAutoScroll.d.ts +13 -0
  37. package/dist/composable/useCalendarInjection.d.ts +2 -0
  38. package/dist/composable/useKanbanInjection.d.ts +2 -0
  39. package/dist/composable/useTabBarInjection.d.ts +2 -0
  40. package/dist/data/di.d.ts +54 -12
  41. package/dist/data/i18n.d.ts +4 -0
  42. package/dist/index.css +1500 -1221
  43. package/dist/index.js +9339 -8216
  44. package/dist/index.js.map +1 -1
  45. package/package.json +6 -6
  46. package/src/component/FluxAction.vue +1 -1
  47. package/src/component/FluxActionBar.vue +2 -2
  48. package/src/component/FluxActionPane.vue +1 -1
  49. package/src/component/FluxAdaptiveGroup.vue +2 -2
  50. package/src/component/FluxAdaptiveSlot.vue +2 -2
  51. package/src/component/FluxAlert.vue +1 -1
  52. package/src/component/FluxAnimatedColors.vue +1 -1
  53. package/src/component/FluxAspectRatio.vue +1 -1
  54. package/src/component/FluxAvatar.vue +2 -2
  55. package/src/component/FluxBadge.vue +2 -2
  56. package/src/component/FluxBorderShine.vue +1 -1
  57. package/src/component/FluxBoxedIcon.vue +1 -1
  58. package/src/component/FluxButton.vue +2 -2
  59. package/src/component/FluxButtonGroup.vue +1 -1
  60. package/src/component/FluxButtonStack.vue +1 -1
  61. package/src/component/FluxCalendar.vue +588 -179
  62. package/src/component/FluxCalendarItem.vue +79 -0
  63. package/src/component/FluxCheckbox.vue +2 -2
  64. package/src/component/FluxChip.vue +2 -2
  65. package/src/component/FluxClickablePane.vue +2 -2
  66. package/src/component/FluxColorPicker.vue +2 -2
  67. package/src/component/FluxColorSelect.vue +3 -3
  68. package/src/component/FluxColumn.vue +1 -1
  69. package/src/component/FluxCommandPalette.vue +4 -4
  70. package/src/component/FluxCommandPaletteGroup.vue +1 -1
  71. package/src/component/FluxCommandPaletteItem.vue +1 -1
  72. package/src/component/FluxComment.vue +2 -2
  73. package/src/component/FluxConfirm.vue +1 -1
  74. package/src/component/FluxContainer.vue +1 -1
  75. package/src/component/FluxDataTable.vue +1 -2
  76. package/src/component/FluxDatePicker.vue +3 -3
  77. package/src/component/FluxDestructiveButton.vue +1 -1
  78. package/src/component/FluxDisabled.vue +1 -1
  79. package/src/component/FluxDivider.vue +2 -2
  80. package/src/component/FluxDotPattern.vue +1 -1
  81. package/src/component/FluxDropZone.vue +4 -4
  82. package/src/component/FluxExpandable.vue +3 -3
  83. package/src/component/FluxExpandableGroup.vue +2 -2
  84. package/src/component/FluxFader.vue +1 -1
  85. package/src/component/FluxFaderItem.vue +1 -1
  86. package/src/component/FluxFilter.vue +2 -2
  87. package/src/component/FluxFilterBar.vue +5 -6
  88. package/src/component/FluxFilterBase.vue +2 -2
  89. package/src/component/FluxFilterDate.vue +2 -2
  90. package/src/component/FluxFilterDateRange.vue +2 -2
  91. package/src/component/FluxFilterOption.vue +2 -2
  92. package/src/component/FluxFilterOptionAsync.vue +1 -1
  93. package/src/component/FluxFilterOptions.vue +2 -2
  94. package/src/component/FluxFilterOptionsAsync.vue +1 -1
  95. package/src/component/FluxFilterRange.vue +2 -2
  96. package/src/component/FluxFilterWindow.vue +3 -3
  97. package/src/component/FluxFlickeringGrid.vue +1 -1
  98. package/src/component/FluxFlyout.vue +2 -2
  99. package/src/component/FluxFocalPointEditor.vue +3 -3
  100. package/src/component/FluxFocalPointImage.vue +1 -1
  101. package/src/component/FluxForm.vue +1 -1
  102. package/src/component/FluxFormColumn.vue +1 -1
  103. package/src/component/FluxFormDateInput.vue +3 -3
  104. package/src/component/FluxFormDateRangeInput.vue +4 -4
  105. package/src/component/FluxFormDateTimeInput.vue +3 -3
  106. package/src/component/FluxFormField.vue +3 -3
  107. package/src/component/FluxFormFieldAddition.vue +1 -1
  108. package/src/component/FluxFormGrid.vue +1 -1
  109. package/src/component/FluxFormInput.vue +3 -3
  110. package/src/component/FluxFormInputAddition.vue +2 -2
  111. package/src/component/FluxFormInputGroup.vue +2 -2
  112. package/src/component/FluxFormPinInput.vue +3 -3
  113. package/src/component/FluxFormRangeSlider.vue +3 -3
  114. package/src/component/FluxFormRow.vue +1 -1
  115. package/src/component/FluxFormSection.vue +1 -1
  116. package/src/component/FluxFormSelect.vue +4 -4
  117. package/src/component/FluxFormSelectAsync.vue +6 -6
  118. package/src/component/FluxFormSlider.vue +2 -2
  119. package/src/component/FluxFormTextArea.vue +2 -2
  120. package/src/component/FluxFormTimeZonePicker.vue +4 -4
  121. package/src/component/FluxFormTreeViewSelect.vue +9 -12
  122. package/src/component/FluxGallery.vue +3 -3
  123. package/src/component/FluxGalleryItem.vue +1 -1
  124. package/src/component/FluxGrid.vue +1 -1
  125. package/src/component/FluxGridColumn.vue +1 -1
  126. package/src/component/FluxGridPattern.vue +1 -1
  127. package/src/component/FluxIcon.vue +2 -2
  128. package/src/component/FluxInfo.vue +2 -2
  129. package/src/component/FluxItem.vue +1 -1
  130. package/src/component/FluxItemActions.vue +1 -1
  131. package/src/component/FluxItemContent.vue +1 -1
  132. package/src/component/FluxItemMedia.vue +1 -1
  133. package/src/component/FluxItemStack.vue +1 -1
  134. package/src/component/FluxKanban.vue +6 -13
  135. package/src/component/FluxKanbanColumn.vue +42 -36
  136. package/src/component/FluxKanbanItem.vue +162 -0
  137. package/src/component/FluxLayerPane.vue +1 -1
  138. package/src/component/FluxLayerPaneSecondary.vue +1 -1
  139. package/src/component/FluxLegend.vue +1 -1
  140. package/src/component/FluxLink.vue +1 -1
  141. package/src/component/FluxMenu.vue +1 -1
  142. package/src/component/FluxMenuCollapsible.vue +3 -3
  143. package/src/component/FluxMenuGroup.vue +1 -1
  144. package/src/component/FluxMenuItem.vue +2 -2
  145. package/src/component/FluxMenuSubHeader.vue +1 -1
  146. package/src/component/FluxMenuTitle.vue +1 -1
  147. package/src/component/FluxNotice.vue +3 -3
  148. package/src/component/FluxOverflowBar.vue +1 -1
  149. package/src/component/FluxOverlay.vue +3 -3
  150. package/src/component/FluxOverlayProvider.vue +2 -2
  151. package/src/component/FluxPagination.vue +3 -3
  152. package/src/component/FluxPaginationBar.vue +2 -2
  153. package/src/component/FluxPaginationButton.vue +1 -1
  154. package/src/component/FluxPane.vue +1 -1
  155. package/src/component/FluxPaneBody.vue +1 -1
  156. package/src/component/FluxPaneFooter.vue +1 -1
  157. package/src/component/FluxPaneGroup.vue +1 -1
  158. package/src/component/FluxPaneHeader.vue +2 -2
  159. package/src/component/FluxPaneIllustration.vue +1 -1
  160. package/src/component/FluxPaneMedia.vue +1 -1
  161. package/src/component/FluxPercentageBar.vue +1 -1
  162. package/src/component/FluxPersona.vue +1 -1
  163. package/src/component/FluxPlaceholder.vue +1 -1
  164. package/src/component/FluxPressable.vue +1 -1
  165. package/src/component/FluxPrimaryButton.vue +1 -1
  166. package/src/component/FluxPrimaryLinkButton.vue +1 -1
  167. package/src/component/FluxProgressBar.vue +2 -2
  168. package/src/component/FluxPrompt.vue +1 -1
  169. package/src/component/FluxPublishButton.vue +1 -1
  170. package/src/component/FluxQuantitySelector.vue +2 -2
  171. package/src/component/FluxRemove.vue +2 -2
  172. package/src/component/FluxRoot.vue +2 -2
  173. package/src/component/FluxRow.vue +1 -1
  174. package/src/component/FluxSecondaryButton.vue +1 -1
  175. package/src/component/FluxSecondaryLinkButton.vue +1 -1
  176. package/src/component/FluxSegmentedControl.vue +1 -1
  177. package/src/component/FluxSeparator.vue +1 -1
  178. package/src/component/FluxSlideOver.vue +3 -3
  179. package/src/component/FluxSnackbar.vue +2 -2
  180. package/src/component/FluxSnackbarProvider.vue +2 -2
  181. package/src/component/FluxSpacer.vue +1 -1
  182. package/src/component/FluxSpinner.vue +1 -1
  183. package/src/component/FluxSplitButton.vue +2 -2
  184. package/src/component/FluxStack.vue +2 -2
  185. package/src/component/FluxStatistic.vue +2 -2
  186. package/src/component/FluxStepper.vue +1 -1
  187. package/src/component/FluxStepperStep.vue +1 -1
  188. package/src/component/FluxStepperSteps.vue +2 -2
  189. package/src/component/FluxTab.vue +2 -2
  190. package/src/component/FluxTabBar.vue +75 -7
  191. package/src/component/FluxTabBarItem.vue +35 -4
  192. package/src/component/FluxTable.vue +3 -4
  193. package/src/component/FluxTableActions.vue +1 -1
  194. package/src/component/FluxTableBar.vue +3 -3
  195. package/src/component/FluxTableCell.vue +3 -3
  196. package/src/component/FluxTableHeader.vue +3 -3
  197. package/src/component/FluxTableRow.vue +1 -1
  198. package/src/component/FluxTabs.vue +10 -4
  199. package/src/component/FluxTag.vue +2 -2
  200. package/src/component/FluxTicks.vue +1 -1
  201. package/src/component/FluxTimeline.vue +1 -1
  202. package/src/component/FluxTimelineItem.vue +2 -2
  203. package/src/component/FluxToggle.vue +2 -2
  204. package/src/component/FluxToolbar.vue +2 -2
  205. package/src/component/FluxTooltip.vue +1 -1
  206. package/src/component/FluxTooltipProvider.vue +3 -3
  207. package/src/component/FluxTreeView.vue +3 -4
  208. package/src/component/FluxWindow.vue +1 -1
  209. package/src/component/calendar/FluxCalendarItemDisplay.vue +117 -0
  210. package/src/component/calendar/FluxCalendarMonthView.vue +134 -0
  211. package/src/component/calendar/FluxCalendarTimeGridView.vue +550 -0
  212. package/src/component/calendar/index.ts +3 -0
  213. package/src/component/index.ts +2 -2
  214. package/src/component/primitive/CoordinatePicker.vue +2 -2
  215. package/src/component/primitive/CoordinatePickerThumb.vue +2 -2
  216. package/src/component/primitive/DialogLayout.vue +1 -1
  217. package/src/component/primitive/FilterBadge.vue +2 -2
  218. package/src/component/primitive/FilterItem.vue +1 -1
  219. package/src/component/primitive/FilterMenuRenderer.ts +2 -2
  220. package/src/component/primitive/FilterOptionBase.vue +6 -6
  221. package/src/component/primitive/SelectBase.vue +13 -13
  222. package/src/component/primitive/SliderBase.vue +3 -3
  223. package/src/component/primitive/SliderThumb.vue +2 -2
  224. package/src/component/primitive/SliderTrack.vue +1 -1
  225. package/src/component/primitive/TreeNodeRenderer.vue +3 -4
  226. package/src/component/primitive/VNodeRenderer.ts +1 -2
  227. package/src/composable/index.ts +3 -0
  228. package/src/composable/private/index.ts +5 -8
  229. package/src/composable/private/useAsyncFilterOptions.ts +2 -2
  230. package/src/composable/private/useCommandPalette.ts +2 -2
  231. package/src/composable/private/useDateFlyout.ts +1 -1
  232. package/src/composable/private/useDropdownPopup.ts +1 -1
  233. package/src/composable/private/useFilterOption.ts +2 -2
  234. package/src/composable/private/useFormSelect.ts +2 -3
  235. package/src/composable/private/useKanban.ts +167 -244
  236. package/src/composable/private/useKanbanAutoScroll.ts +95 -0
  237. package/src/composable/private/useTranslate.ts +1 -2
  238. package/src/composable/private/useTreeView.ts +1 -1
  239. package/src/composable/useAdaptiveGroupInjection.ts +1 -1
  240. package/src/composable/useBreakpoints.ts +1 -2
  241. package/src/composable/useCalendarInjection.ts +6 -0
  242. package/src/composable/useDisabled.ts +1 -2
  243. package/src/composable/useDisabledInjection.ts +1 -1
  244. package/src/composable/useExpandableGroupInjection.ts +1 -1
  245. package/src/composable/useFilterInjection.ts +1 -1
  246. package/src/composable/useFlyoutInjection.ts +1 -1
  247. package/src/composable/useFormFieldInjection.ts +1 -1
  248. package/src/composable/useKanbanInjection.ts +12 -0
  249. package/src/composable/useTabBarInjection.ts +10 -0
  250. package/src/composable/useTableInjection.ts +1 -1
  251. package/src/composable/useTooltipInjection.ts +1 -1
  252. package/src/css/component/Action.module.scss +1 -1
  253. package/src/css/component/AdaptiveSlot.module.scss +5 -7
  254. package/src/css/component/Avatar.module.scss +1 -1
  255. package/src/css/component/Badge.module.scss +1 -1
  256. package/src/css/component/Button.module.scss +1 -1
  257. package/src/css/component/Calendar.module.scss +274 -44
  258. package/src/css/component/Chip.module.scss +1 -1
  259. package/src/css/component/Color.module.scss +1 -1
  260. package/src/css/component/CommandPalette.module.scss +1 -1
  261. package/src/css/component/DatePicker.module.scss +1 -1
  262. package/src/css/component/Expandable.module.scss +1 -1
  263. package/src/css/component/Form.module.scss +1 -1
  264. package/src/css/component/Gallery.module.scss +1 -1
  265. package/src/css/component/Grid.module.scss +1 -1
  266. package/src/css/component/Item.module.scss +1 -1
  267. package/src/css/component/{FluxKanban.module.scss → Kanban.module.scss} +56 -79
  268. package/src/css/component/Layout.module.scss +1 -1
  269. package/src/css/component/Menu.module.scss +1 -1
  270. package/src/css/component/Notice.module.scss +1 -1
  271. package/src/css/component/Overlay.module.scss +4 -4
  272. package/src/css/component/Pagination.module.scss +1 -1
  273. package/src/css/component/Pane.module.scss +2 -1
  274. package/src/css/component/Placeholder.module.scss +1 -1
  275. package/src/css/component/Remove.module.scss +1 -1
  276. package/src/css/component/SegmentedControl.module.scss +1 -1
  277. package/src/css/component/Snackbar.module.scss +1 -1
  278. package/src/css/component/Tab.module.scss +138 -34
  279. package/src/css/component/Table.module.scss +1 -1
  280. package/src/css/component/TreeView.module.scss +1 -1
  281. package/src/css/component/TreeViewSelect.module.scss +1 -1
  282. package/src/css/component/base/Button.module.scss +1 -1
  283. package/src/css/component/primitive/Slider.module.scss +1 -1
  284. package/src/css/component/primitive/TreeNode.module.scss +1 -1
  285. package/src/css/variables.scss +2 -2
  286. package/src/data/di.ts +64 -11
  287. package/src/data/filter.ts +3 -3
  288. package/src/data/i18n.ts +4 -0
  289. package/src/data/store.ts +1 -2
  290. package/src/transition/FluxBreakthroughTransition.vue +1 -1
  291. package/src/transition/FluxFadeTransition.vue +1 -1
  292. package/src/transition/FluxOverlayTransition.vue +1 -1
  293. package/src/transition/FluxRouteTransition.vue +1 -1
  294. package/src/transition/FluxSlideOverTransition.vue +1 -1
  295. package/src/transition/FluxTooltipTransition.vue +1 -1
  296. package/src/transition/FluxVerticalWindowTransition.vue +1 -1
  297. package/src/transition/FluxWindowTransition.vue +1 -1
  298. package/src/util/createDialogRenderer.ts +3 -4
  299. package/src/util/createLabelForDateRange.ts +1 -1
  300. package/src/component/FluxCalendarEvent.vue +0 -42
  301. package/src/component/FluxKanbanCard.vue +0 -199
@@ -1,71 +1,101 @@
1
1
  <template>
2
- <div :class="$style.calendar">
2
+ <div
3
+ ref="root"
4
+ :class="$style.calendar">
5
+ <div
6
+ :class="$style.calendarItemRegistry"
7
+ aria-hidden="true">
8
+ <slot/>
9
+ </div>
10
+
3
11
  <FluxActionBar :class="$style.calendarActions">
4
12
  <template #primary>
5
13
  <div
6
14
  :class="$style.calendarCurrent"
7
15
  role="presentation">
8
- <FluxFlyout :width="300">
9
- <template #opener="{open}">
10
- <button
11
- :class="$style.calendarCurrentMonth"
12
- :aria-label="translate('flux.selectMonth')"
13
- type="button"
14
- @click="open">
15
- {{ viewMonth }}
16
- </button>
17
- </template>
18
-
19
- <template #default="{close}">
20
- <div :class="$styleDatePicker.datePickerMonths">
21
- <template
22
- v-for="month of months"
23
- :key="month.label">
16
+ <template v-if="resolvedView === 'month'">
17
+ <FluxFlyout :width="300">
18
+ <template #opener="{open}">
19
+ <button
20
+ :class="$style.calendarCurrentMonth"
21
+ :aria-label="translate('flux.selectMonth')"
22
+ type="button"
23
+ @click="open">
24
+ {{ monthViewMonth }}
25
+ </button>
26
+ </template>
27
+
28
+ <template #default="{close}">
29
+ <div :class="$styleDatePicker.datePickerMonths">
30
+ <template
31
+ v-for="month of months"
32
+ :key="month.label">
33
+ <FluxSecondaryButton
34
+ :label="month.label"
35
+ tabindex="-1"
36
+ @click="setMonthViewMonth(month.date, close)"/>
37
+ </template>
38
+ </div>
39
+ </template>
40
+ </FluxFlyout>
41
+
42
+ <FluxFlyout :width="300">
43
+ <template #opener="{open}">
44
+ <button
45
+ :class="$style.calendarCurrentYear"
46
+ :aria-label="translate('flux.selectYear')"
47
+ type="button"
48
+ @click="open">
49
+ {{ monthViewYear }}
50
+ </button>
51
+ </template>
52
+
53
+ <template #default="{close}">
54
+ <div :class="$styleDatePicker.datePickerYears">
24
55
  <FluxSecondaryButton
25
- :label="month.label"
56
+ :aria-label="translate('flux.previousYears')"
57
+ icon-leading="angle-left"
26
58
  tabindex="-1"
27
- @click="setViewMonth(month.date, close)"/>
28
- </template>
29
- </div>
30
- </template>
31
- </FluxFlyout>
32
-
33
- <FluxFlyout :width="300">
34
- <template #opener="{open}">
35
- <button
36
- :class="$style.calendarCurrentYear"
37
- :aria-label="translate('flux.selectYear')"
38
- type="button"
39
- @click="open">
40
- {{ viewYear }}
41
- </button>
42
- </template>
43
-
44
- <template #default="{close}">
45
- <div :class="$styleDatePicker.datePickerYears">
46
- <FluxSecondaryButton
47
- :aria-label="translate('flux.previousYears')"
48
- icon-leading="angle-left"
49
- tabindex="-1"
50
- @click="previousYears"/>
51
-
52
- <template
53
- v-for="year of years"
54
- :key="year">
59
+ @click="previousYears"/>
60
+
61
+ <template
62
+ v-for="year of years"
63
+ :key="year">
64
+ <FluxSecondaryButton
65
+ :label="year.toString()"
66
+ tabindex="-1"
67
+ @click="setMonthViewYear(year, close)"/>
68
+ </template>
69
+
55
70
  <FluxSecondaryButton
56
- :label="year.toString()"
71
+ :aria-label="translate('flux.nextYears')"
72
+ icon-leading="angle-right"
57
73
  tabindex="-1"
58
- @click="setViewYear(year, close)"/>
59
- </template>
60
-
61
- <FluxSecondaryButton
62
- :aria-label="translate('flux.nextYears')"
63
- icon-leading="angle-right"
64
- tabindex="-1"
65
- @click="nextYears"/>
66
- </div>
67
- </template>
68
- </FluxFlyout>
74
+ @click="nextYears"/>
75
+ </div>
76
+ </template>
77
+ </FluxFlyout>
78
+ </template>
79
+
80
+ <template v-else>
81
+ <FluxFlyout :width="320">
82
+ <template #opener="{open}">
83
+ <button
84
+ :class="$style.calendarRangeLabel"
85
+ :aria-label="translate('flux.selectDate')"
86
+ type="button"
87
+ @click="open">
88
+ {{ rangeLabel }}
89
+ </button>
90
+ </template>
91
+
92
+ <template #default="{close}">
93
+ <FluxDatePicker
94
+ :model-value="datePickerValue"
95
+ @update:model-value="(value) => onDatePicked(value, close)"/>
96
+ </template>
97
+ </FluxFlyout>
98
+ </template>
69
99
  </div>
70
100
  </template>
71
101
 
@@ -77,59 +107,50 @@
77
107
 
78
108
  <FluxButtonGroup>
79
109
  <FluxSecondaryButton
80
- :aria-label="translate('flux.previousMonth')"
110
+ :aria-label="translate('flux.previous')"
81
111
  icon-leading="angle-left"
82
- @click="previousMonth"/>
112
+ @click="navigatePrevious"
113
+ @dragenter="onNavDragEnter('previous')"
114
+ @dragover="onNavDragOver"
115
+ @dragleave="onNavDragLeave"/>
83
116
 
84
117
  <FluxSecondaryButton
85
- :aria-label="translate('flux.nextMonth')"
118
+ :aria-label="translate('flux.next')"
86
119
  icon-leading="angle-right"
87
- @click="nextMonth"/>
120
+ @click="navigateNext"
121
+ @dragenter="onNavDragEnter('next')"
122
+ @dragover="onNavDragOver"
123
+ @dragleave="onNavDragLeave"/>
88
124
  </FluxButtonGroup>
89
125
  </template>
90
126
  </FluxActionBar>
91
127
 
92
- <FluxWindowTransition :is-back="isTransitioningToPast">
93
- <div
94
- :key="viewDate.month"
95
- :class="$style.calendarCells"
96
- role="grid">
97
- <template v-for="day of days">
98
- <div :class="$style.calendarDay">
99
- {{ day }}
100
- </div>
101
- </template>
102
-
103
- <template v-for="date of dates">
104
- <div
105
- :class="clsx(
106
- $style.calendarEntry,
107
- viewDate.month !== date.month && $style.isDisabled
108
- )"
109
- role="gridcell">
110
- <div :class="$style.calendarEvents">
111
- <VNodeRenderer
112
- v-for="event of getEventsForDate(date)"
113
- :key="event.index"
114
- :class="clsx(
115
- event.type === 'single' && $style.isSingle,
116
- event.type === 'start' && $style.isStart,
117
- event.type === 'end' && $style.isEnd,
118
- event.type === 'middle' && $style.isMiddle
119
- )"
120
- :style="{
121
- gridRow: event.index
122
- }"
123
- :vnode="event.vnode"/>
124
- </div>
125
-
126
- <span :class="$style.calendarEntryDate">
127
- {{ date.toLocaleString({day: 'numeric'}) }}
128
- </span>
129
- </div>
130
- </template>
131
- </div>
132
- </FluxWindowTransition>
128
+ <FluxCalendarMonthView
129
+ v-if="resolvedView === 'month'"
130
+ :dates="monthDates"
131
+ :days="monthDays"
132
+ :view-date="monthViewDate"
133
+ :is-transitioning-to-past="monthIsTransitioningToPast"
134
+ :draggable="draggable"
135
+ :items="items"
136
+ :has-active-drag="dragState !== null"
137
+ :focused-date="monthFocusedDate"
138
+ @cell-drop="onMonthCellDrop"/>
139
+
140
+ <FluxCalendarTimeGridView
141
+ v-else
142
+ :view-dates="timeGridViewDates"
143
+ :is-transitioning-to-past="timeGridIsTransitioningToPast"
144
+ :draggable="draggable"
145
+ :items="items"
146
+ :has-active-drag="dragState !== null"
147
+ :hour-range="effectiveHourRange"
148
+ :pixels-per-minute="pixelsPerMinute"
149
+ :snap-minutes="SNAP_MINUTES"
150
+ :day-count="timeGridDayCount"
151
+ @time-grid-drop="onTimeGridDrop"
152
+ @all-day-drop="onAllDayDrop"
153
+ @resize="onResize"/>
133
154
 
134
155
  <div
135
156
  v-if="isLoading"
@@ -142,121 +163,509 @@
142
163
  <script
143
164
  lang="ts"
144
165
  setup>
145
- import { flattenVNodeTree, getComponentName, getComponentProps, useCalendar, useCalendarMonthSwitcher, useCalendarYearSwitcher } from '@flux-ui/internals';
146
- import { clsx } from 'clsx';
166
+ import { defaultKeyboardGrabAnnounce, useCalendar, useCalendarMonthSwitcher, useCalendarTimeGrid, useCalendarYearSwitcher } from '@flux-ui/internals';
147
167
  import { DateTime } from 'luxon';
148
- import { computed, type ComputedRef, unref, type VNode, watch } from 'vue';
149
- import { useTranslate } from '$flux/composable/private';
150
- import { FluxWindowTransition } from '$flux/transition';
151
- import { VNodeRenderer } from './primitive';
168
+ import { computed, onBeforeUnmount, onMounted, provide, ref, shallowRef, unref, type VNode, watch } from 'vue';
169
+ import { useBreakpoints } from '~flux/components/composable';
170
+ import { useTranslate } from '~flux/components/composable/private';
171
+ import { FluxCalendarInjectionKey, type FluxCalendarItemData, type FluxCalendarKeyboardDirection, type FluxCalendarView } from '~flux/components/data';
172
+ import { FluxCalendarMonthView, FluxCalendarTimeGridView } from './calendar';
152
173
  import FluxActionBar from './FluxActionBar.vue';
153
174
  import FluxButtonGroup from './FluxButtonGroup.vue';
175
+ import FluxDatePicker from './FluxDatePicker.vue';
154
176
  import FluxFlyout from './FluxFlyout.vue';
155
177
  import FluxSecondaryButton from './FluxSecondaryButton.vue';
156
- import FluxSpinner from '$flux/component/FluxSpinner.vue';
157
- import $style from '$flux/css/component/Calendar.module.scss';
158
- import $styleDatePicker from '$flux/css/component/DatePicker.module.scss';
159
-
160
- type Event = {
161
- readonly index: number;
162
- readonly type: 'start' | 'end' | 'middle' | 'single';
163
- readonly vnode: VNode;
164
- };
178
+ import FluxSpinner from './FluxSpinner.vue';
179
+ import $style from '~flux/components/css/component/Calendar.module.scss';
180
+ import $styleDatePicker from '~flux/components/css/component/DatePicker.module.scss';
181
+
182
+ const SNAP_MINUTES = 30;
183
+ const NAV_HOVER_INITIAL_DELAY_MS = 700;
184
+ const NAV_HOVER_REPEAT_DELAY_MS = 450;
185
+
186
+ const MONTH_KEY_DELTAS = {
187
+ left: {day: -1},
188
+ right: {day: 1},
189
+ up: {day: -7},
190
+ down: {day: 7}
191
+ } as const;
192
+
193
+ const TIME_GRID_KEY_DELTAS = {
194
+ left: {day: -1},
195
+ right: {day: 1},
196
+ up: {minute: -SNAP_MINUTES},
197
+ down: {minute: SNAP_MINUTES}
198
+ } as const;
165
199
 
166
200
  const emit = defineEmits<{
167
201
  navigate: [DateTime, DateTime, DateTime];
202
+ reschedule: [{ id: string | number; fromDate: DateTime; toDate: DateTime }];
203
+ resize: [{ id: string | number; fromDate: DateTime; toDate: DateTime; fromDuration: number; toDuration: number }];
204
+ dragStart: [{ id: string | number; fromDate: DateTime }];
205
+ dragEnd: [{ id: string | number }];
206
+ keyboardGrab: [{ id: string | number; fromDate: DateTime }];
207
+ keyboardCancel: [{ id: string | number }];
168
208
  }>();
169
209
 
170
210
  const {
171
- initialDate = DateTime.now()
211
+ initialDate = DateTime.now(),
212
+ draggable = false,
213
+ view,
214
+ hourRange = [0, 24],
215
+ pixelsPerMinute = 0.8
172
216
  } = defineProps<{
173
217
  readonly initialDate?: DateTime;
174
218
  readonly isLoading?: boolean;
219
+ readonly draggable?: boolean;
220
+ readonly view?: FluxCalendarView;
221
+ readonly hourRange?: readonly [number, number];
222
+ readonly pixelsPerMinute?: number;
175
223
  }>();
176
224
 
177
225
  const slots = defineSlots<{
178
226
  default?(): VNode[];
179
227
  }>();
180
228
 
181
- const {
182
- isTransitioningToPast,
183
- viewDate,
184
- viewMonth,
185
- viewYear,
186
- dates,
187
- days,
188
- nextMonth,
189
- previousMonth,
190
- setViewDate
191
- } = useCalendar(initialDate, {
192
- weekDayLength: 'long'
229
+ const translate = useTranslate();
230
+ const {md, lg, xl} = useBreakpoints();
231
+
232
+ const effectiveHourRange = computed<readonly [number, number]>(() => {
233
+ const [from, to] = hourRange;
234
+
235
+ if (from < 0 || to > 24 || from >= to) {
236
+ return [0, 24] as const;
237
+ }
238
+
239
+ return [from, to] as const;
240
+ });
241
+
242
+ const resolvedView = computed<FluxCalendarView>(() => {
243
+ if (view) {
244
+ return view;
245
+ }
246
+
247
+ if (xl.value) {
248
+ return 'month';
249
+ }
250
+
251
+ if (lg.value) {
252
+ return 'week';
253
+ }
254
+
255
+ if (md.value) {
256
+ return 'two-days';
257
+ }
258
+
259
+ return 'day';
193
260
  });
194
261
 
262
+ const timeGridDayCount = computed<1 | 2 | 7>(() => {
263
+ const v = unref(resolvedView);
264
+
265
+ if (v === 'week') {
266
+ return 7;
267
+ }
268
+
269
+ if (v === 'two-days') {
270
+ return 2;
271
+ }
272
+
273
+ return 1;
274
+ });
275
+
276
+ // Top-level destructure for template auto-unwrap.
195
277
  const {
196
- months
197
- } = useCalendarMonthSwitcher(viewDate, 'short');
278
+ isTransitioningToPast: monthIsTransitioningToPast,
279
+ viewDate: monthViewDate,
280
+ viewMonth: monthViewMonth,
281
+ viewYear: monthViewYear,
282
+ dates: monthDates,
283
+ days: monthDays,
284
+ setViewDate: setMonthViewDateRaw,
285
+ nextMonth: nextMonthRaw,
286
+ previousMonth: previousMonthRaw
287
+ } = useCalendar(initialDate, {weekDayLength: 'long'});
288
+
289
+ const {months} = useCalendarMonthSwitcher(monthViewDate, 'short');
198
290
 
199
291
  const {
200
292
  years,
201
293
  next: nextYears,
202
294
  previous: previousYears
203
- } = useCalendarYearSwitcher(viewDate);
204
-
205
- const translate = useTranslate();
295
+ } = useCalendarYearSwitcher(monthViewDate);
206
296
 
207
- const eventNodes = computed(() => flattenVNodeTree(slots.default?.() ?? []));
208
- const events = computed(() => unref(eventNodes)
209
- .filter(en => getComponentName(en) === 'FluxCalendarEvent')) as ComputedRef<VNode[]>;
210
-
211
- function getEventsForDate(forDate: DateTime): Event[] {
212
- const forDateStr = forDate.toSQLDate();
213
-
214
- return unref(events)
215
- .map<Event | null>((vnode, index) => {
216
- const {date} = getComponentProps<{ date: DateTime | [DateTime, DateTime]; }>(vnode);
217
-
218
- if (Array.isArray(date)) {
219
- if (forDate < date[0] || forDate > date[1]) {
220
- return null;
221
- }
222
-
223
- return {
224
- type: forDateStr === date[0].toSQLDate() ? 'start' : (forDateStr === date[1].toSQLDate() ? 'end' : 'middle'),
225
- index,
226
- vnode
227
- };
228
- }
229
-
230
- if (forDateStr !== date.toSQLDate()) {
231
- return null;
232
- }
233
-
234
- return {
235
- type: 'single',
236
- index,
237
- vnode
238
- };
239
- })
240
- .filter((e): e is Event => e !== null);
297
+ const {
298
+ isTransitioningToPast: timeGridIsTransitioningToPast,
299
+ viewDate: timeGridViewDate,
300
+ viewDates: timeGridViewDates,
301
+ rangeLabel: timeGridRangeLabel,
302
+ setViewDate: setTimeGridViewDate,
303
+ next: nextTimeGrid,
304
+ previous: previousTimeGrid
305
+ } = useCalendarTimeGrid(initialDate, timeGridDayCount);
306
+
307
+ // Items registry — items registreren zichzelf via inject.
308
+ const items = shallowRef<FluxCalendarItemData[]>([]);
309
+
310
+ // Drag-state.
311
+ const dragState = ref<{ readonly id: string | number; readonly fromDate: DateTime } | null>(null);
312
+ const grabbedId = ref<string | number | null>(null);
313
+ const monthFocusedDate = ref<DateTime | null>(null);
314
+ const itemElementRegistry = new WeakMap<Element, { readonly id: string | number }>();
315
+ const itemElementsById = new Map<string | number, Element>();
316
+ let navHoverTimer: ReturnType<typeof setTimeout> | null = null;
317
+
318
+ function restoreItemFocus(id: string | number): void {
319
+ requestAnimationFrame(() => {
320
+ const elm = itemElementsById.get(id);
321
+
322
+ if (elm instanceof HTMLElement) {
323
+ elm.focus();
324
+ }
325
+ });
241
326
  }
242
327
 
243
- function setToday(): void {
244
- setViewDate(DateTime.now());
328
+ // Range label voor time-grid views.
329
+ const rangeLabel = computed<string>(() => unref(timeGridRangeLabel));
330
+
331
+ // Date-picker model voor flyout.
332
+ const datePickerValue = computed<DateTime | null>(() => unref(timeGridViewDate));
333
+
334
+ provide(FluxCalendarInjectionKey, {
335
+ isDraggable: computed(() => draggable),
336
+ resolvedView,
337
+ hourRange: effectiveHourRange,
338
+ pixelsPerMinute: computed(() => pixelsPerMinute),
339
+ snapMinutes: computed(() => SNAP_MINUTES),
340
+ grabbedId,
341
+
342
+ registerItem(id, data) {
343
+ const existing = items.value.findIndex(i => i.id === id);
344
+
345
+ if (existing >= 0) {
346
+ items.value = items.value.map((i, idx) => idx === existing ? data : i);
347
+ } else {
348
+ items.value = [...items.value, data];
349
+ }
350
+ },
351
+
352
+ unregisterItem(id) {
353
+ items.value = items.value.filter(i => i.id !== id);
354
+ },
355
+
356
+ registerItemElement(element, id) {
357
+ itemElementRegistry.set(element, {id});
358
+ itemElementsById.set(id, element);
359
+ },
360
+
361
+ unregisterItemElement(element) {
362
+ const info = itemElementRegistry.get(element);
363
+
364
+ if (info) {
365
+ itemElementsById.delete(info.id);
366
+ }
367
+
368
+ itemElementRegistry.delete(element);
369
+ },
370
+
371
+ onItemDragStart(id, fromDate, evt) {
372
+ dragState.value = {id, fromDate};
373
+
374
+ if (evt.dataTransfer) {
375
+ evt.dataTransfer.effectAllowed = 'move';
376
+ evt.dataTransfer.setData('text/plain', String(id));
377
+ }
378
+
379
+ emit('dragStart', {id, fromDate});
380
+ },
381
+
382
+ onItemDragEnd(id) {
383
+ if (dragState.value?.id !== id) {
384
+ return;
385
+ }
386
+
387
+ dragState.value = null;
388
+ cancelNavHoverTimer();
389
+ emit('dragEnd', {id});
390
+ },
391
+
392
+ onItemKeyboardGrab(id, fromDate) {
393
+ grabbedId.value = id;
394
+ monthFocusedDate.value = unref(resolvedView) === 'month' ? fromDate.startOf('day') : null;
395
+ emit('keyboardGrab', {id, fromDate});
396
+ defaultKeyboardGrabAnnounce(translate('flux.grabbedAnnounce'));
397
+ },
398
+
399
+ onItemKeyboardMove(direction) {
400
+ handleKeyboardMove(direction);
401
+ },
402
+
403
+ onItemKeyboardCommit() {
404
+ commitKeyboardGrab();
405
+ },
406
+
407
+ onItemKeyboardCancel() {
408
+ cancelKeyboardGrab();
409
+ }
410
+ });
411
+
412
+ function onDatePicked(value: DateTime | DateTime[] | null, close: () => void): void {
413
+ if (!value || Array.isArray(value)) {
414
+ return;
415
+ }
416
+
417
+ if (unref(resolvedView) === 'month') {
418
+ setMonthViewDateRaw(value);
419
+ } else {
420
+ setTimeGridViewDate(value);
421
+ }
422
+
423
+ close();
245
424
  }
246
425
 
247
- function setViewMonth(month: DateTime, close: () => void): void {
426
+ function setMonthViewMonth(month: DateTime, close: () => void): void {
248
427
  close();
249
- setViewDate(month);
428
+ setMonthViewDateRaw(month);
250
429
  }
251
430
 
252
- function setViewYear(year: number, close: () => void): void {
431
+ function setMonthViewYear(year: number, close: () => void): void {
253
432
  close();
254
- setViewDate(unref(viewDate).set({year}));
433
+ setMonthViewDateRaw(unref(monthViewDate).set({year}));
434
+ }
435
+
436
+ function setToday(): void {
437
+ const now = DateTime.now();
438
+
439
+ if (unref(resolvedView) === 'month') {
440
+ setMonthViewDateRaw(now);
441
+ } else {
442
+ setTimeGridViewDate(now);
443
+ }
444
+ }
445
+
446
+ function navigateNext(): void {
447
+ if (unref(resolvedView) === 'month') {
448
+ nextMonthRaw();
449
+ } else {
450
+ nextTimeGrid();
451
+ }
452
+ }
453
+
454
+ function navigatePrevious(): void {
455
+ if (unref(resolvedView) === 'month') {
456
+ previousMonthRaw();
457
+ } else {
458
+ previousTimeGrid();
459
+ }
460
+ }
461
+
462
+ // Drop handlers naar reschedule-event.
463
+ function onMonthCellDrop(toDate: DateTime): void {
464
+ const drag = unref(dragState);
465
+
466
+ if (!drag) {
467
+ return;
468
+ }
469
+
470
+ emit('reschedule', {id: drag.id, fromDate: drag.fromDate, toDate});
471
+ dragState.value = null;
472
+ cancelNavHoverTimer();
473
+ }
474
+
475
+ function onTimeGridDrop(toDate: DateTime): void {
476
+ const drag = unref(dragState);
477
+
478
+ if (!drag) {
479
+ return;
480
+ }
481
+
482
+ emit('reschedule', {id: drag.id, fromDate: drag.fromDate, toDate});
483
+ dragState.value = null;
484
+ cancelNavHoverTimer();
485
+ }
486
+
487
+ function onAllDayDrop(toDate: DateTime): void {
488
+ const drag = unref(dragState);
489
+
490
+ if (!drag) {
491
+ return;
492
+ }
493
+
494
+ emit('reschedule', {id: drag.id, fromDate: drag.fromDate, toDate});
495
+ dragState.value = null;
496
+ cancelNavHoverTimer();
255
497
  }
256
498
 
257
- watch([viewDate, dates], ([viewDate, dates]) => {
258
- emit('navigate', viewDate, dates[0], dates[dates.length - 1]);
499
+ function onResize(payload: { id: string | number; fromDate: DateTime; toDate: DateTime; fromDuration: number; toDuration: number }): void {
500
+ emit('resize', payload);
501
+ }
502
+
503
+ // Keyboard-grab routing.
504
+ function findItemDate(id: string | number): DateTime | null {
505
+ return items.value.find(i => i.id === id)?.date ?? null;
506
+ }
507
+
508
+ function handleKeyboardMove(direction: FluxCalendarKeyboardDirection): void {
509
+ const id = unref(grabbedId);
510
+
511
+ if (id == null) {
512
+ return;
513
+ }
514
+
515
+ const currentDate = findItemDate(id);
516
+
517
+ if (!currentDate) {
518
+ return;
519
+ }
520
+
521
+ const v = unref(resolvedView);
522
+ const delta = (v === 'month' ? MONTH_KEY_DELTAS : TIME_GRID_KEY_DELTAS)[direction];
523
+ const newDate = currentDate.plus(delta);
524
+
525
+ emit('reschedule', {id, fromDate: currentDate, toDate: newDate});
526
+
527
+ if (v === 'month') {
528
+ monthFocusedDate.value = newDate.startOf('day');
529
+
530
+ if (newDate.month !== unref(monthViewDate).month) {
531
+ setMonthViewDateRaw(newDate);
532
+ }
533
+ } else {
534
+ const dates = unref(timeGridViewDates);
535
+ const newSql = newDate.toSQLDate();
536
+ const firstSql = dates[0]?.toSQLDate();
537
+ const lastSql = dates[dates.length - 1]?.toSQLDate();
538
+
539
+ if (firstSql && lastSql && newSql && (newSql < firstSql || newSql > lastSql)) {
540
+ setTimeGridViewDate(newDate);
541
+ }
542
+ }
543
+
544
+ restoreItemFocus(id);
545
+ }
546
+
547
+ function commitKeyboardGrab(): void {
548
+ const id = unref(grabbedId);
549
+
550
+ if (id == null) {
551
+ return;
552
+ }
553
+
554
+ grabbedId.value = null;
555
+ monthFocusedDate.value = null;
556
+ defaultKeyboardGrabAnnounce(translate('flux.releasedAnnounce'));
557
+ }
558
+
559
+ function cancelKeyboardGrab(): void {
560
+ const id = unref(grabbedId);
561
+
562
+ if (id == null) {
563
+ return;
564
+ }
565
+
566
+ grabbedId.value = null;
567
+ monthFocusedDate.value = null;
568
+ emit('keyboardCancel', {id});
569
+ defaultKeyboardGrabAnnounce(translate('flux.releasedAnnounce'));
570
+ }
571
+
572
+ // Cancel keyboard-grab when view changes mid-grab.
573
+ watch(resolvedView, () => {
574
+ if (unref(grabbedId) !== null) {
575
+ cancelKeyboardGrab();
576
+ }
577
+ });
578
+
579
+ // Nav-hover (auto-advance during drag).
580
+ function onNavDragEnter(direction: 'previous' | 'next'): void {
581
+ if (!unref(dragState)) {
582
+ return;
583
+ }
584
+
585
+ cancelNavHoverTimer();
586
+ scheduleNavHoverTick(direction, NAV_HOVER_INITIAL_DELAY_MS);
587
+ }
588
+
589
+ function scheduleNavHoverTick(direction: 'previous' | 'next', delay: number): void {
590
+ navHoverTimer = setTimeout(() => {
591
+ if (direction === 'next') {
592
+ navigateNext();
593
+ } else {
594
+ navigatePrevious();
595
+ }
596
+
597
+ scheduleNavHoverTick(direction, NAV_HOVER_REPEAT_DELAY_MS);
598
+ }, delay);
599
+ }
600
+
601
+ function onNavDragOver(evt: DragEvent): void {
602
+ if (!unref(dragState)) {
603
+ return;
604
+ }
605
+
606
+ evt.preventDefault();
607
+
608
+ if (evt.dataTransfer) {
609
+ evt.dataTransfer.dropEffect = 'move';
610
+ }
611
+ }
612
+
613
+ function onNavDragLeave(evt: DragEvent): void {
614
+ const currentTarget = evt.currentTarget as HTMLElement | null;
615
+ const relatedTarget = evt.relatedTarget as Node | null;
616
+
617
+ if (currentTarget && relatedTarget && currentTarget.contains(relatedTarget)) {
618
+ return;
619
+ }
620
+
621
+ cancelNavHoverTimer();
622
+ }
623
+
624
+ function cancelNavHoverTimer(): void {
625
+ if (navHoverTimer !== null) {
626
+ clearTimeout(navHoverTimer);
627
+ navHoverTimer = null;
628
+ }
629
+ }
630
+
631
+ function onDocumentDragEnd(): void {
632
+ const drag = unref(dragState);
633
+
634
+ if (!drag) {
635
+ return;
636
+ }
637
+
638
+ dragState.value = null;
639
+ cancelNavHoverTimer();
640
+ emit('dragEnd', {id: drag.id});
641
+ }
642
+
643
+ onMounted(() => {
644
+ document.addEventListener('dragend', onDocumentDragEnd);
645
+ });
646
+
647
+ onBeforeUnmount(() => {
648
+ document.removeEventListener('dragend', onDocumentDragEnd);
649
+ cancelNavHoverTimer();
650
+ });
651
+
652
+ // Navigate-event aggregation.
653
+ watch([
654
+ () => unref(resolvedView),
655
+ () => unref(monthViewDate),
656
+ () => unref(timeGridViewDates)
657
+ ], () => {
658
+ if (unref(resolvedView) === 'month') {
659
+ const dates = unref(monthDates);
660
+ emit('navigate', unref(monthViewDate), dates[0], dates[dates.length - 1]);
661
+ } else {
662
+ const dates = unref(timeGridViewDates);
663
+ emit('navigate', unref(timeGridViewDate), dates[0], dates[dates.length - 1]);
664
+ }
259
665
  }, {immediate: true});
260
666
 
261
- watch(() => initialDate, setViewDate);
667
+ watch(() => initialDate, (d) => {
668
+ setMonthViewDateRaw(d);
669
+ setTimeGridViewDate(d);
670
+ });
262
671
  </script>