@kivacore/ui-pro-shared 0.0.9 → 0.0.10
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/package.json +187 -21
- package/src/.kiva/config.json +27 -0
- package/src/components/avatar-group.tsx +222 -0
- package/src/components/kiva/bulk-update-dialog/bulk-update-dialog.tsx +240 -0
- package/src/components/kiva/bulk-update-dialog/index.tsx +6 -0
- package/src/components/kiva/bulk-update-dialog/types.ts +33 -0
- package/src/components/kiva/calendar/animations.ts +40 -0
- package/src/components/kiva/calendar/calendar-body.tsx +106 -0
- package/src/components/kiva/calendar/calendar-sidebar.tsx +103 -0
- package/src/components/kiva/calendar/calendar.tsx +243 -0
- package/src/components/kiva/calendar/constants.ts +12 -0
- package/src/components/kiva/calendar/contexts/calendar-context.tsx +696 -0
- package/src/components/kiva/calendar/contexts/dnd-context.tsx +173 -0
- package/src/components/kiva/calendar/dialogs/add-edit-event-dialog.tsx +287 -0
- package/src/components/kiva/calendar/dialogs/delete-event-dialog.tsx +73 -0
- package/src/components/kiva/calendar/dialogs/event-details-dialog.tsx +163 -0
- package/src/components/kiva/calendar/dialogs/events-list-dialog.tsx +122 -0
- package/src/components/kiva/calendar/dnd/draggable-event.tsx +66 -0
- package/src/components/kiva/calendar/dnd/droppable-area.tsx +53 -0
- package/src/components/kiva/calendar/dnd/resizable-event.tsx +190 -0
- package/src/components/kiva/calendar/header/calendar-header.tsx +84 -0
- package/src/components/kiva/calendar/header/date-navigator.tsx +188 -0
- package/src/components/kiva/calendar/header/filter.tsx +80 -0
- package/src/components/kiva/calendar/header/today-button.tsx +49 -0
- package/src/components/kiva/calendar/header/user-select.tsx +111 -0
- package/src/components/kiva/calendar/header/view-tabs.tsx +144 -0
- package/src/components/kiva/calendar/helpers.ts +617 -0
- package/src/components/kiva/calendar/hooks/use-disclosure.ts +19 -0
- package/src/components/kiva/calendar/hooks/use-local-storage.ts +40 -0
- package/src/components/kiva/calendar/hooks/use-media-query.ts +25 -0
- package/src/components/kiva/calendar/hooks.ts +5 -0
- package/src/components/kiva/calendar/index.tsx +27 -0
- package/src/components/kiva/calendar/interfaces.ts +35 -0
- package/src/components/kiva/calendar/schemas.ts +20 -0
- package/src/components/kiva/calendar/settings/settings.tsx +116 -0
- package/src/components/kiva/calendar/skeletons/calendar-header-skeleton.tsx +27 -0
- package/src/components/kiva/calendar/skeletons/calendar-skeleton.tsx +19 -0
- package/src/components/kiva/calendar/skeletons/day-view-skeleton.tsx +40 -0
- package/src/components/kiva/calendar/skeletons/month-view-skeleton.tsx +36 -0
- package/src/components/kiva/calendar/skeletons/week-view-skeleton.tsx +48 -0
- package/src/components/kiva/calendar/skeletons/year-view-skeleton.tsx +42 -0
- package/src/components/kiva/calendar/types.ts +25 -0
- package/src/components/kiva/calendar/views/agenda-view/agenda-events.tsx +150 -0
- package/src/components/kiva/calendar/views/month-view/calendar-month-view.tsx +82 -0
- package/src/components/kiva/calendar/views/month-view/day-cell.tsx +218 -0
- package/src/components/kiva/calendar/views/month-view/event-bullet.tsx +46 -0
- package/src/components/kiva/calendar/views/month-view/month-event-badge.tsx +154 -0
- package/src/components/kiva/calendar/views/timeline/calendar-timeline-view.tsx +100 -0
- package/src/components/kiva/calendar/views/timeline/lib/timeline-layout.ts +130 -0
- package/src/components/kiva/calendar/views/timeline/lib/timeline-model.ts +504 -0
- package/src/components/kiva/calendar/views/timeline/timeline-event-bar.tsx +68 -0
- package/src/components/kiva/calendar/views/timeline/timeline-grid-header.tsx +125 -0
- package/src/components/kiva/calendar/views/timeline/timeline-row.tsx +159 -0
- package/src/components/kiva/calendar/views/timeline/timeline-section.tsx +61 -0
- package/src/components/kiva/calendar/views/timeline/use-timeline-sections.ts +278 -0
- package/src/components/kiva/calendar/views/week-and-day-view/calendar-day-view.tsx +277 -0
- package/src/components/kiva/calendar/views/week-and-day-view/calendar-time-line.tsx +47 -0
- package/src/components/kiva/calendar/views/week-and-day-view/calendar-week-view.tsx +229 -0
- package/src/components/kiva/calendar/views/week-and-day-view/day-view-multi-day-events-row.tsx +79 -0
- package/src/components/kiva/calendar/views/week-and-day-view/event-block.tsx +116 -0
- package/src/components/kiva/calendar/views/week-and-day-view/render-grouped-events.tsx +54 -0
- package/src/components/kiva/calendar/views/week-and-day-view/week-view-multi-day-events-row.tsx +159 -0
- package/src/components/kiva/calendar/views/year-view/calendar-year-view.tsx +159 -0
- package/src/components/kiva/data-table-side-filters/components/side-filter-active-chips.tsx +137 -0
- package/src/components/kiva/data-table-side-filters/components/side-filter-clear.tsx +34 -0
- package/src/components/kiva/data-table-side-filters/components/side-filter-search.tsx +67 -0
- package/src/components/kiva/data-table-side-filters/components/side-filter-section.tsx +77 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-async-options.tsx +354 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-boolean.tsx +66 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-checkbox-list.tsx +137 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-date-range.tsx +204 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-numeric-range.tsx +162 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-options-dropdown.tsx +191 -0
- package/src/components/kiva/data-table-side-filters/controllers/side-filter-text.tsx +53 -0
- package/src/components/kiva/data-table-side-filters/core/query-translator.ts +367 -0
- package/src/components/kiva/data-table-side-filters/core/types.ts +81 -0
- package/src/components/kiva/data-table-side-filters/data-table-side-filters.tsx +483 -0
- package/src/components/kiva/data-table-side-filters/hooks/use-data-table-side-filters.tsx +160 -0
- package/src/components/kiva/data-table-side-filters/hooks/use-show-more.tsx +62 -0
- package/src/components/kiva/data-table-side-filters/index.tsx +44 -0
- package/src/components/kiva/data-table-side-filters/lib/render-mode.ts +62 -0
- package/src/components/kiva/date-time-picker.tsx +163 -0
- package/src/components/kiva/editable-record-detail.tsx +809 -0
- package/src/components/kiva/enum-option-editor/enum-option-editor.tsx +891 -0
- package/src/components/kiva/enum-option-editor/index.tsx +26 -0
- package/src/components/kiva/enum-option-editor/kiva-enum-option-editor.tsx +320 -0
- package/src/components/kiva/enum-option-editor/types.ts +90 -0
- package/src/components/kiva/kanban.tsx +1376 -0
- package/src/components/kiva/kiva-data-export-menu.tsx +543 -0
- package/src/components/kiva/map.tsx +1631 -0
- package/src/components/kiva/pivot-calendar/components/group-sidebar.tsx +95 -0
- package/src/components/kiva/pivot-calendar/components/pivot-calendar-toolbar.tsx +113 -0
- package/src/components/kiva/pivot-calendar/components/stats-cell.tsx +126 -0
- package/src/components/kiva/pivot-calendar/helpers.ts +374 -0
- package/src/components/kiva/pivot-calendar/hooks/use-pivot-calendar.ts +222 -0
- package/src/components/kiva/pivot-calendar/index.tsx +32 -0
- package/src/components/kiva/pivot-calendar/pivot-calendar.tsx +107 -0
- package/src/components/kiva/pivot-calendar/types.ts +154 -0
- package/src/components/kiva/pivot-calendar/views/days-of-month-view.tsx +37 -0
- package/src/components/kiva/pivot-calendar/views/days-of-week-view.tsx +37 -0
- package/src/components/kiva/pivot-calendar/views/month-calendar-view.tsx +154 -0
- package/src/components/kiva/pivot-calendar/views/months-of-year-view.tsx +40 -0
- package/src/components/kiva/pivot-calendar/views/pivot-grid-view.tsx +251 -0
- package/src/components/kiva/pivot-filter/index.tsx +9 -0
- package/src/components/kiva/pivot-filter/pivot-filter-item.tsx +159 -0
- package/src/components/kiva/pivot-filter/pivot-filter-settings.tsx +161 -0
- package/src/components/kiva/pivot-filter/pivot-filter.tsx +187 -0
- package/src/components/kiva/pivot-filter/types.ts +82 -0
- package/src/components/kiva/pivot-grid/hooks/use-pivot-grid.ts +683 -0
- package/src/components/kiva/pivot-grid/index.tsx +23 -0
- package/src/components/kiva/pivot-grid/lib/pivot-grid-color-rules.ts +98 -0
- package/src/components/kiva/pivot-grid/lib/pivot-grid-export.ts +265 -0
- package/src/components/kiva/pivot-grid/lib/pivot-grid-model.ts +1110 -0
- package/src/components/kiva/pivot-grid/pivot-grid-demo-data.ts +200 -0
- package/src/components/kiva/pivot-grid/pivot-grid-export-menu.tsx +66 -0
- package/src/components/kiva/pivot-grid/pivot-grid-toolbar.tsx +85 -0
- package/src/components/kiva/pivot-grid/pivot-grid.tsx +601 -0
- package/src/components/kiva/pivot-grid/types.ts +195 -0
- package/src/components/kiva/place-autocomplete.tsx +484 -0
- package/src/components/kiva/record-delete-confirm-dialog/index.tsx +10 -0
- package/src/components/kiva/record-delete-confirm-dialog/record-delete-confirm-dialog.tsx +266 -0
- package/src/components/kiva/record-delete-confirm-dialog/types.ts +25 -0
- package/src/hooks/kiva/_internal/autonumber-setting.ts +112 -0
- package/src/hooks/kiva/_internal/form-layout-to-view.ts +665 -0
- package/src/hooks/kiva/_internal/kiva-hook-utils.ts +143 -0
- package/src/hooks/kiva/_internal/use-computed-field-evaluator.tsx +310 -0
- package/src/hooks/kiva/_internal/use-field-actions-evaluator.tsx +398 -0
- package/src/hooks/kiva/_internal/use-form-actions-evaluator.tsx +363 -0
- package/src/hooks/kiva/_internal/use-form-view-engine.tsx +2200 -0
- package/src/hooks/kiva/_internal/use-kiva-form-view-fields.tsx +190 -0
- package/src/hooks/kiva/_internal/use-kiva-kanban-cards.tsx +311 -0
- package/src/hooks/kiva/use-data-export.tsx +265 -0
- package/src/hooks/kiva/use-kiva-calendar.tsx +992 -0
- package/src/hooks/kiva/use-kiva-data-export.tsx +173 -0
- package/src/hooks/kiva/use-kiva-data-grid.tsx +4750 -0
- package/src/hooks/kiva/use-kiva-data-view-select.tsx +1273 -0
- package/src/hooks/kiva/use-kiva-form-view.tsx +1581 -0
- package/src/hooks/kiva/use-kiva-inventory.tsx +184 -0
- package/src/hooks/kiva/use-kiva-kanban.tsx +1750 -0
- package/src/hooks/kiva/use-kiva-map-view.tsx +2255 -0
- package/src/hooks/kiva/use-kiva-pivot-calendar.tsx +759 -0
- package/src/hooks/kiva/use-kiva-pivot-filter.tsx +1523 -0
- package/src/hooks/kiva/use-kiva-pivot-grid.tsx +543 -0
- package/src/hooks/kiva/use-kiva-tenant.tsx +313 -0
- package/src/hooks/kiva/use-parameter-persistence.ts +191 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import {
|
|
4
|
+
addDays,
|
|
5
|
+
addMonths,
|
|
6
|
+
addWeeks,
|
|
7
|
+
format,
|
|
8
|
+
getQuarter,
|
|
9
|
+
getWeek,
|
|
10
|
+
getYear,
|
|
11
|
+
isSameDay,
|
|
12
|
+
isWeekend,
|
|
13
|
+
startOfQuarter,
|
|
14
|
+
startOfWeek
|
|
15
|
+
} from 'date-fns';
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
type TCalendarView, type TTimelineView, type TWeekStartsOn
|
|
19
|
+
} from '../../../types';
|
|
20
|
+
|
|
21
|
+
/** Column granularity a row's leaf cells represent — drives drop-target snapping. */
|
|
22
|
+
export type TimelineGranularity = 'week' | 'day';
|
|
23
|
+
|
|
24
|
+
/** Which of the three period layouts a section renders. */
|
|
25
|
+
export type TimelineVariant = 'year' | 'quarter' | 'weeks';
|
|
26
|
+
|
|
27
|
+
export interface TimelineColumn {
|
|
28
|
+
key: string;
|
|
29
|
+
/** `W31` for week columns, the day-of-month number for day columns. */
|
|
30
|
+
label: string;
|
|
31
|
+
start: Date;
|
|
32
|
+
/** Exclusive. */
|
|
33
|
+
end: Date;
|
|
34
|
+
containsToday: boolean;
|
|
35
|
+
weekend: boolean;
|
|
36
|
+
/** `true` on the first day of a month — the 13-week view marks it as context. */
|
|
37
|
+
monthStart: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface TimelineColumnGroup {
|
|
41
|
+
key: string;
|
|
42
|
+
label: string;
|
|
43
|
+
/** Flex weight of the group relative to its siblings. */
|
|
44
|
+
weight: number;
|
|
45
|
+
columns: Array<TimelineColumn>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* One horizontal slice of a row's width mapped to a time interval. Rows with a
|
|
50
|
+
* single segment are a plain linear time axis; the year row uses one segment
|
|
51
|
+
* per month so each month keeps an equal third of the width even though its
|
|
52
|
+
* week columns repeat the boundary weeks of its neighbours.
|
|
53
|
+
*/
|
|
54
|
+
export interface TimelineScaleSegment {
|
|
55
|
+
start: Date;
|
|
56
|
+
end: Date;
|
|
57
|
+
/** 0..1 offset of the segment's left edge. */
|
|
58
|
+
offset: number;
|
|
59
|
+
/** 0..1 width of the segment. */
|
|
60
|
+
size: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface TimelineRow {
|
|
64
|
+
key: string;
|
|
65
|
+
label: string;
|
|
66
|
+
subLabel?: string;
|
|
67
|
+
start: Date;
|
|
68
|
+
/** Exclusive. */
|
|
69
|
+
end: Date;
|
|
70
|
+
groups: Array<TimelineColumnGroup>;
|
|
71
|
+
scale: Array<TimelineScaleSegment>;
|
|
72
|
+
granularity: TimelineGranularity;
|
|
73
|
+
containsToday: boolean;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface TimelineSection {
|
|
77
|
+
key: string;
|
|
78
|
+
label: string;
|
|
79
|
+
subLabel?: string;
|
|
80
|
+
start: Date;
|
|
81
|
+
/** Exclusive. */
|
|
82
|
+
end: Date;
|
|
83
|
+
variant: TimelineVariant;
|
|
84
|
+
rows: Array<TimelineRow>;
|
|
85
|
+
/**
|
|
86
|
+
* `true` when every row renders its own two-level column header (year and
|
|
87
|
+
* quarter views), `false` when one shared header covers all rows (13 weeks).
|
|
88
|
+
*/
|
|
89
|
+
perRowHeader: boolean;
|
|
90
|
+
/** Shared header labels for `perRowHeader: false` sections (weekday names). */
|
|
91
|
+
sharedHeader?: Array<string>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const TIMELINE_VIEW_SET = new Set<string>(['year-timeline', 'quarter', '13weeks']);
|
|
95
|
+
|
|
96
|
+
const MONTH_LABEL = 'MMMM';
|
|
97
|
+
const MONTH_SHORT = 'MMM';
|
|
98
|
+
const DAY_RANGE = 'MMM d';
|
|
99
|
+
|
|
100
|
+
export function isTimelineView(view: TCalendarView): view is TTimelineView {
|
|
101
|
+
return TIMELINE_VIEW_SET.has(view);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function timelineVariantForView(view: TTimelineView): TimelineVariant {
|
|
105
|
+
if (view === 'year-timeline') return 'year';
|
|
106
|
+
if (view === 'quarter') return 'quarter';
|
|
107
|
+
|
|
108
|
+
return 'weeks';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** `true` for the two views whose periods can stack continuously. */
|
|
112
|
+
export function supportsContinuousMode(view: TTimelineView): boolean {
|
|
113
|
+
return view === 'year-timeline' || view === 'quarter';
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function weekLabel(date: Date, weekStartsOn: TWeekStartsOn): string {
|
|
117
|
+
return `W${getWeek(date, { weekStartsOn, firstWeekContainsDate: 1 })}`;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function weeksOverlapping(
|
|
121
|
+
start: Date,
|
|
122
|
+
end: Date,
|
|
123
|
+
weekStartsOn: TWeekStartsOn
|
|
124
|
+
): Array<{ start: Date; end: Date }> {
|
|
125
|
+
const weeks: Array<{ start: Date; end: Date }> = [];
|
|
126
|
+
let cursor = startOfWeek(start, { weekStartsOn });
|
|
127
|
+
|
|
128
|
+
while (cursor < end) {
|
|
129
|
+
weeks.push({ start: cursor, end: addDays(cursor, 7) });
|
|
130
|
+
cursor = addDays(cursor, 7);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return weeks;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function daysOfInterval(start: Date, end: Date): Array<Date> {
|
|
137
|
+
const days: Array<Date> = [];
|
|
138
|
+
let cursor = start;
|
|
139
|
+
|
|
140
|
+
while (cursor < end) {
|
|
141
|
+
days.push(cursor);
|
|
142
|
+
cursor = addDays(cursor, 1);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return days;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function toDayColumn(date: Date, keyPrefix: string, today: Date): TimelineColumn {
|
|
149
|
+
return {
|
|
150
|
+
key: `${keyPrefix}-${date.getTime()}`,
|
|
151
|
+
label: String(date.getDate()),
|
|
152
|
+
start: date,
|
|
153
|
+
end: addDays(date, 1),
|
|
154
|
+
containsToday: isSameDay(date, today),
|
|
155
|
+
weekend: isWeekend(date),
|
|
156
|
+
monthStart: date.getDate() === 1
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function toWeekColumn(
|
|
161
|
+
week: { start: Date; end: Date },
|
|
162
|
+
keyPrefix: string,
|
|
163
|
+
today: Date,
|
|
164
|
+
weekStartsOn: TWeekStartsOn
|
|
165
|
+
): TimelineColumn {
|
|
166
|
+
return {
|
|
167
|
+
key: `${keyPrefix}-${week.start.getTime()}`,
|
|
168
|
+
label: weekLabel(week.start, weekStartsOn),
|
|
169
|
+
start: week.start,
|
|
170
|
+
end: week.end,
|
|
171
|
+
containsToday: today >= week.start && today < week.end,
|
|
172
|
+
weekend: false,
|
|
173
|
+
monthStart: false
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function containsDate(start: Date, end: Date, date: Date): boolean {
|
|
178
|
+
return date >= start && date < end;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Year: one section per year, four quarter rows, three month column groups per
|
|
183
|
+
* row, and the calendar weeks overlapping each month as leaf columns. A week on
|
|
184
|
+
* a month boundary deliberately appears in both month groups (per spec), which
|
|
185
|
+
* is why each month owns an equal third of the row instead of a shared axis.
|
|
186
|
+
*/
|
|
187
|
+
export function buildYearSection(
|
|
188
|
+
anchor: Date,
|
|
189
|
+
weekStartsOn: TWeekStartsOn,
|
|
190
|
+
today: Date
|
|
191
|
+
): TimelineSection {
|
|
192
|
+
const year = getYear(anchor);
|
|
193
|
+
const sectionStart = new Date(year, 0, 1);
|
|
194
|
+
const sectionEnd = new Date(year + 1, 0, 1);
|
|
195
|
+
|
|
196
|
+
const rows = Array.from({ length: 4 }, (_, quarterIndex) => {
|
|
197
|
+
const rowStart = new Date(year, quarterIndex * 3, 1);
|
|
198
|
+
const rowEnd = new Date(year, quarterIndex * 3 + 3, 1);
|
|
199
|
+
|
|
200
|
+
const months = Array.from({ length: 3 }, (_, offset) => {
|
|
201
|
+
const monthStart = new Date(year, quarterIndex * 3 + offset, 1);
|
|
202
|
+
const monthEnd = new Date(year, quarterIndex * 3 + offset + 1, 1);
|
|
203
|
+
|
|
204
|
+
return { start: monthStart, end: monthEnd };
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
const groups: Array<TimelineColumnGroup> = months.map(month => ({
|
|
208
|
+
key: `m-${month.start.getTime()}`,
|
|
209
|
+
label: format(month.start, MONTH_SHORT),
|
|
210
|
+
weight: 1,
|
|
211
|
+
columns: weeksOverlapping(month.start, month.end, weekStartsOn).map(week => toWeekColumn(
|
|
212
|
+
week,
|
|
213
|
+
`w-${month.start.getTime()}`,
|
|
214
|
+
today,
|
|
215
|
+
weekStartsOn
|
|
216
|
+
))
|
|
217
|
+
}));
|
|
218
|
+
|
|
219
|
+
const scale: Array<TimelineScaleSegment> = months.map((month, index) => ({
|
|
220
|
+
start: month.start,
|
|
221
|
+
end: month.end,
|
|
222
|
+
offset: index / 3,
|
|
223
|
+
size: 1 / 3
|
|
224
|
+
}));
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
key: `q-${rowStart.getTime()}`,
|
|
228
|
+
label: `Q${quarterIndex + 1}`,
|
|
229
|
+
subLabel: `${format(rowStart, MONTH_SHORT)}–${format(new Date(year, quarterIndex * 3 + 2, 1), MONTH_SHORT)}`,
|
|
230
|
+
start: rowStart,
|
|
231
|
+
end: rowEnd,
|
|
232
|
+
groups,
|
|
233
|
+
scale,
|
|
234
|
+
granularity: 'week' as TimelineGranularity,
|
|
235
|
+
containsToday: containsDate(rowStart, rowEnd, today)
|
|
236
|
+
};
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
return {
|
|
240
|
+
key: `year-${year}`,
|
|
241
|
+
label: String(year),
|
|
242
|
+
start: sectionStart,
|
|
243
|
+
end: sectionEnd,
|
|
244
|
+
variant: 'year',
|
|
245
|
+
rows,
|
|
246
|
+
perRowHeader: true
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Quarter: one section per quarter, three month rows, week column groups whose
|
|
252
|
+
* leaf columns are the days of that month — so both the week and the exact date
|
|
253
|
+
* stay visible (per spec).
|
|
254
|
+
*/
|
|
255
|
+
export function buildQuarterSection(
|
|
256
|
+
anchor: Date,
|
|
257
|
+
weekStartsOn: TWeekStartsOn,
|
|
258
|
+
today: Date
|
|
259
|
+
): TimelineSection {
|
|
260
|
+
const sectionStart = startOfQuarter(anchor);
|
|
261
|
+
const sectionEnd = addMonths(sectionStart, 3);
|
|
262
|
+
const year = getYear(sectionStart);
|
|
263
|
+
const quarter = getQuarter(sectionStart);
|
|
264
|
+
|
|
265
|
+
const rows = Array.from({ length: 3 }, (_, offset) => {
|
|
266
|
+
const rowStart = addMonths(sectionStart, offset);
|
|
267
|
+
const rowEnd = addMonths(rowStart, 1);
|
|
268
|
+
|
|
269
|
+
const groups: Array<TimelineColumnGroup> = weeksOverlapping(rowStart, rowEnd, weekStartsOn)
|
|
270
|
+
.map((week) => {
|
|
271
|
+
const from = week.start < rowStart ? rowStart : week.start;
|
|
272
|
+
const to = week.end > rowEnd ? rowEnd : week.end;
|
|
273
|
+
const columns = daysOfInterval(from, to)
|
|
274
|
+
.map(day => toDayColumn(day, `d-${rowStart.getTime()}`, today));
|
|
275
|
+
|
|
276
|
+
return {
|
|
277
|
+
key: `w-${rowStart.getTime()}-${week.start.getTime()}`,
|
|
278
|
+
label: weekLabel(week.start, weekStartsOn),
|
|
279
|
+
weight: columns.length,
|
|
280
|
+
columns
|
|
281
|
+
};
|
|
282
|
+
})
|
|
283
|
+
.filter(group => group.columns.length > 0);
|
|
284
|
+
|
|
285
|
+
return {
|
|
286
|
+
key: `mo-${rowStart.getTime()}`,
|
|
287
|
+
label: format(rowStart, MONTH_LABEL),
|
|
288
|
+
subLabel: String(getYear(rowStart)),
|
|
289
|
+
start: rowStart,
|
|
290
|
+
end: rowEnd,
|
|
291
|
+
groups,
|
|
292
|
+
scale: [
|
|
293
|
+
{
|
|
294
|
+
start: rowStart, end: rowEnd, offset: 0, size: 1
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
granularity: 'day' as TimelineGranularity,
|
|
298
|
+
containsToday: containsDate(rowStart, rowEnd, today)
|
|
299
|
+
};
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
return {
|
|
303
|
+
key: `quarter-${sectionStart.getTime()}`,
|
|
304
|
+
label: `${year} Q${quarter}`,
|
|
305
|
+
subLabel: `${format(sectionStart, MONTH_SHORT)}–${format(addMonths(sectionStart, 2), MONTH_SHORT)}`,
|
|
306
|
+
start: sectionStart,
|
|
307
|
+
end: sectionEnd,
|
|
308
|
+
variant: 'quarter',
|
|
309
|
+
rows,
|
|
310
|
+
perRowHeader: true
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* First day of the 13-week window an anchor date belongs to. The window is
|
|
316
|
+
* NOT quarter-aligned — prev/next steps exactly thirteen weeks, so the anchor
|
|
317
|
+
* only has to snap to the start of its own week.
|
|
318
|
+
*/
|
|
319
|
+
export function thirteenWeeksStart(anchor: Date, weekStartsOn: TWeekStartsOn): Date {
|
|
320
|
+
return startOfWeek(anchor, { weekStartsOn });
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* 13 Weeks: a single section of thirteen week rows with the seven weekdays as
|
|
325
|
+
* shared columns — week continuity matters more than month grouping here.
|
|
326
|
+
*/
|
|
327
|
+
export function buildThirteenWeeksSection(
|
|
328
|
+
anchor: Date,
|
|
329
|
+
weekStartsOn: TWeekStartsOn,
|
|
330
|
+
today: Date
|
|
331
|
+
): TimelineSection {
|
|
332
|
+
const sectionStart = thirteenWeeksStart(anchor, weekStartsOn);
|
|
333
|
+
const sectionEnd = addWeeks(sectionStart, 13);
|
|
334
|
+
|
|
335
|
+
const rows = Array.from({ length: 13 }, (_, index) => {
|
|
336
|
+
const rowStart = addWeeks(sectionStart, index);
|
|
337
|
+
const rowEnd = addDays(rowStart, 7);
|
|
338
|
+
const columns = daysOfInterval(rowStart, rowEnd)
|
|
339
|
+
.map(day => toDayColumn(day, `d-${rowStart.getTime()}`, today));
|
|
340
|
+
|
|
341
|
+
return {
|
|
342
|
+
key: `wk-${rowStart.getTime()}`,
|
|
343
|
+
label: weekLabel(rowStart, weekStartsOn),
|
|
344
|
+
subLabel: `${format(rowStart, DAY_RANGE)} – ${format(addDays(rowEnd, -1), DAY_RANGE)}`,
|
|
345
|
+
start: rowStart,
|
|
346
|
+
end: rowEnd,
|
|
347
|
+
groups: [
|
|
348
|
+
{
|
|
349
|
+
key: `g-${rowStart.getTime()}`, label: '', weight: 7, columns
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
scale: [
|
|
353
|
+
{
|
|
354
|
+
start: rowStart, end: rowEnd, offset: 0, size: 1
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
granularity: 'day' as TimelineGranularity,
|
|
358
|
+
containsToday: containsDate(rowStart, rowEnd, today)
|
|
359
|
+
};
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
const sharedHeader = Array.from(
|
|
363
|
+
{ length: 7 },
|
|
364
|
+
(_, index) => format(addDays(startOfWeek(new Date(), { weekStartsOn }), index), 'EEE')
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
return {
|
|
368
|
+
key: `weeks-${sectionStart.getTime()}`,
|
|
369
|
+
label: thirteenWeeksLabel(sectionStart, weekStartsOn),
|
|
370
|
+
subLabel: `${format(sectionStart, DAY_RANGE)} – ${format(addDays(sectionEnd, -1), 'MMM d, yyyy')}`,
|
|
371
|
+
start: sectionStart,
|
|
372
|
+
end: sectionEnd,
|
|
373
|
+
variant: 'weeks',
|
|
374
|
+
rows,
|
|
375
|
+
perRowHeader: false,
|
|
376
|
+
sharedHeader
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Week-range name for a 13-week window (`W27 – W39 · 2026`). The window floats,
|
|
382
|
+
* so a quarter name would be wrong and the exact dates already live in the
|
|
383
|
+
* sub-label — the week span is what identifies the period.
|
|
384
|
+
*/
|
|
385
|
+
export function thirteenWeeksLabel(start: Date, weekStartsOn: TWeekStartsOn): string {
|
|
386
|
+
const from = startOfWeek(start, { weekStartsOn });
|
|
387
|
+
const lastWeek = addWeeks(from, 12);
|
|
388
|
+
const fromYear = getYear(from);
|
|
389
|
+
const toYear = getYear(lastWeek);
|
|
390
|
+
|
|
391
|
+
if (fromYear === toYear) {
|
|
392
|
+
return `${weekLabel(from, weekStartsOn)} – ${weekLabel(lastWeek, weekStartsOn)} · ${fromYear}`;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return `${weekLabel(from, weekStartsOn)} ${fromYear} – ${weekLabel(lastWeek, weekStartsOn)} ${toYear}`;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/** Anchor date of the section `offset` periods away from `anchor`. */
|
|
399
|
+
export function shiftTimelineAnchor(
|
|
400
|
+
view: TTimelineView,
|
|
401
|
+
anchor: Date,
|
|
402
|
+
offset: number,
|
|
403
|
+
weekStartsOn: TWeekStartsOn = 0
|
|
404
|
+
): Date {
|
|
405
|
+
if (view === 'year-timeline') return new Date(getYear(anchor) + offset, 0, 1);
|
|
406
|
+
if (view === 'quarter') return addMonths(startOfQuarter(anchor), offset * 3);
|
|
407
|
+
|
|
408
|
+
return addWeeks(startOfWeek(anchor, { weekStartsOn }), offset * 13);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export function buildTimelineSection(
|
|
412
|
+
view: TTimelineView,
|
|
413
|
+
anchor: Date,
|
|
414
|
+
weekStartsOn: TWeekStartsOn,
|
|
415
|
+
today: Date
|
|
416
|
+
): TimelineSection {
|
|
417
|
+
if (view === 'year-timeline') return buildYearSection(anchor, weekStartsOn, today);
|
|
418
|
+
if (view === 'quarter') return buildQuarterSection(anchor, weekStartsOn, today);
|
|
419
|
+
|
|
420
|
+
return buildThirteenWeeksSection(anchor, weekStartsOn, today);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/** Map a date onto its 0..1 horizontal position inside a row. */
|
|
424
|
+
export function dateToFraction(row: TimelineRow, date: Date): number {
|
|
425
|
+
const time = date.getTime();
|
|
426
|
+
|
|
427
|
+
if (time <= row.start.getTime()) return 0;
|
|
428
|
+
if (time >= row.end.getTime()) return 1;
|
|
429
|
+
|
|
430
|
+
for (const segment of row.scale) {
|
|
431
|
+
const segStart = segment.start.getTime();
|
|
432
|
+
const segEnd = segment.end.getTime();
|
|
433
|
+
|
|
434
|
+
if (time >= segStart && time < segEnd) {
|
|
435
|
+
const ratio = (time - segStart) / (segEnd - segStart);
|
|
436
|
+
|
|
437
|
+
return segment.offset + segment.size * ratio;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return 1;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/** Long month name, exported so views can label a row without re-importing date-fns. */
|
|
445
|
+
export function monthName(date: Date): string {
|
|
446
|
+
return format(date, MONTH_LABEL);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** Snap a date to the first day of the period its timeline view renders. */
|
|
450
|
+
export function normalizeTimelineAnchor(
|
|
451
|
+
view: TTimelineView,
|
|
452
|
+
date: Date,
|
|
453
|
+
weekStartsOn: TWeekStartsOn = 0
|
|
454
|
+
): Date {
|
|
455
|
+
if (view === 'year-timeline') return new Date(getYear(date), 0, 1);
|
|
456
|
+
if (view === 'quarter') return startOfQuarter(date);
|
|
457
|
+
|
|
458
|
+
return startOfWeek(date, { weekStartsOn });
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/** Header title for the rendered window: one period, or `first – last`. */
|
|
462
|
+
export function timelineTitle(sections: Array<TimelineSection>): string {
|
|
463
|
+
const first = sections[0];
|
|
464
|
+
const last = sections[sections.length - 1];
|
|
465
|
+
|
|
466
|
+
if (!first || !last) return '';
|
|
467
|
+
if (first.key === last.key) return first.label;
|
|
468
|
+
|
|
469
|
+
return `${first.label} – ${last.label}`;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Header title for the currently rendered window — a single period, or the
|
|
474
|
+
* span a continuous view covers (`2025–2027`, `2025 Q1 – 2025 Q3`).
|
|
475
|
+
*/
|
|
476
|
+
export function timelineRangeTitle(
|
|
477
|
+
view: TTimelineView,
|
|
478
|
+
anchor: Date,
|
|
479
|
+
range: { start: Date; end: Date } | null,
|
|
480
|
+
weekStartsOn: TWeekStartsOn = 0
|
|
481
|
+
): string {
|
|
482
|
+
if (view === '13weeks') {
|
|
483
|
+
return thirteenWeeksLabel(range?.start ?? anchor, weekStartsOn);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
const start = range?.start ?? normalizeTimelineAnchor(view, anchor, weekStartsOn);
|
|
487
|
+
const lastDay = range ? addDays(range.end, -1) : start;
|
|
488
|
+
|
|
489
|
+
if (view === 'year-timeline') {
|
|
490
|
+
const fromYear = getYear(start);
|
|
491
|
+
const toYear = getYear(lastDay);
|
|
492
|
+
|
|
493
|
+
if (fromYear === toYear) return String(fromYear);
|
|
494
|
+
|
|
495
|
+
return `${fromYear}–${toYear}`;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const from = `${getYear(start)} Q${getQuarter(start)}`;
|
|
499
|
+
const to = `${getYear(lastDay)} Q${getQuarter(lastDay)}`;
|
|
500
|
+
|
|
501
|
+
if (from === to) return from;
|
|
502
|
+
|
|
503
|
+
return `${from} – ${to}`;
|
|
504
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
6
|
+
|
|
7
|
+
import { cn } from '@kivacore/ui-pro-shared/lib/utils';
|
|
8
|
+
|
|
9
|
+
import { useCalendar } from '../../contexts/calendar-context';
|
|
10
|
+
import { DraggableEvent } from '../../dnd/draggable-event';
|
|
11
|
+
import { EventDetailsDialog } from '../../dialogs/event-details-dialog';
|
|
12
|
+
import { getColorClass } from '../../helpers';
|
|
13
|
+
import { EventBullet } from '../month-view/event-bullet';
|
|
14
|
+
|
|
15
|
+
import { type TimelineSegment } from './lib/timeline-layout';
|
|
16
|
+
|
|
17
|
+
interface TimelineEventBarProps {
|
|
18
|
+
segment: TimelineSegment;
|
|
19
|
+
top: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A single event bar. Continuation segments keep their title (the spec forbids
|
|
25
|
+
* unlabeled continuations) and mark the edge they run past with a chevron.
|
|
26
|
+
*/
|
|
27
|
+
export function TimelineEventBar({ segment, top, height }: TimelineEventBarProps) {
|
|
28
|
+
const { badgeVariant, renderEventBadge } = useCalendar();
|
|
29
|
+
const { event } = segment;
|
|
30
|
+
|
|
31
|
+
const bar = (
|
|
32
|
+
<button
|
|
33
|
+
type="button"
|
|
34
|
+
className={cn(
|
|
35
|
+
'flex h-full w-full items-center gap-1 overflow-hidden rounded-md border border-l-2 px-1.5 text-left text-xs',
|
|
36
|
+
getColorClass(event.color)
|
|
37
|
+
)}>
|
|
38
|
+
{segment.continuesBefore && (
|
|
39
|
+
<ChevronLeft className="size-3 shrink-0 opacity-60" />
|
|
40
|
+
)}
|
|
41
|
+
{badgeVariant === 'dot' && (
|
|
42
|
+
<EventBullet color={event.color} className="size-1.5 shrink-0" />
|
|
43
|
+
)}
|
|
44
|
+
<span className="truncate font-medium">{event.title}</span>
|
|
45
|
+
{segment.continuesAfter && (
|
|
46
|
+
<ChevronRight className="ml-auto size-3 shrink-0 opacity-60" />
|
|
47
|
+
)}
|
|
48
|
+
</button>
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div
|
|
53
|
+
className="absolute px-px"
|
|
54
|
+
style={{
|
|
55
|
+
left: `${segment.left * 100}%`,
|
|
56
|
+
width: `${segment.width * 100}%`,
|
|
57
|
+
minWidth: 12,
|
|
58
|
+
top,
|
|
59
|
+
height
|
|
60
|
+
}}>
|
|
61
|
+
<DraggableEvent event={event} className="h-full w-full">
|
|
62
|
+
<EventDetailsDialog event={event}>
|
|
63
|
+
{renderEventBadge ? renderEventBadge(event, bar) : bar}
|
|
64
|
+
</EventDetailsDialog>
|
|
65
|
+
</DraggableEvent>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import { format } from 'date-fns';
|
|
6
|
+
|
|
7
|
+
import { cn } from '@kivacore/ui-pro-shared/lib/utils';
|
|
8
|
+
|
|
9
|
+
import { type TimelineColumnGroup } from './lib/timeline-model';
|
|
10
|
+
|
|
11
|
+
interface TimelineGridHeaderProps {
|
|
12
|
+
groups: Array<TimelineColumnGroup>;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Two-level column header for a timeline row: the group label (month for the
|
|
18
|
+
* year view, week for the quarter view) over its leaf columns (weeks / days).
|
|
19
|
+
*/
|
|
20
|
+
export function TimelineGridHeader({ groups, className }: TimelineGridHeaderProps) {
|
|
21
|
+
return (
|
|
22
|
+
<div className={cn('flex flex-col border-b bg-muted/20', className)}>
|
|
23
|
+
<div className="flex">
|
|
24
|
+
{groups.map(group => (
|
|
25
|
+
<div
|
|
26
|
+
key={group.key}
|
|
27
|
+
className="min-w-0 border-r py-1 text-center text-xs font-semibold last:border-r-0"
|
|
28
|
+
style={{ flexGrow: group.weight, flexBasis: 0 }}>
|
|
29
|
+
{group.label}
|
|
30
|
+
</div>
|
|
31
|
+
))}
|
|
32
|
+
</div>
|
|
33
|
+
<div className="flex border-t">
|
|
34
|
+
{groups.map(group => (
|
|
35
|
+
<div
|
|
36
|
+
key={group.key}
|
|
37
|
+
className="flex min-w-0 border-r last:border-r-0"
|
|
38
|
+
style={{ flexGrow: group.weight, flexBasis: 0 }}>
|
|
39
|
+
{group.columns.map(column => (
|
|
40
|
+
<div
|
|
41
|
+
key={column.key}
|
|
42
|
+
className={cn(
|
|
43
|
+
'min-w-0 basis-0 grow truncate py-0.5 text-center text-[11px] text-muted-foreground',
|
|
44
|
+
column.containsToday && 'font-semibold text-primary'
|
|
45
|
+
)}>
|
|
46
|
+
{column.label}
|
|
47
|
+
</div>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
))}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface TimelineSharedHeaderProps {
|
|
57
|
+
labels: Array<string>;
|
|
58
|
+
gutterLabel: string;
|
|
59
|
+
gutterWidth: number;
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Single-level header used by the 13-week view (weekday names). */
|
|
64
|
+
export function TimelineSharedHeader({
|
|
65
|
+
labels,
|
|
66
|
+
gutterLabel,
|
|
67
|
+
gutterWidth,
|
|
68
|
+
className
|
|
69
|
+
}: TimelineSharedHeaderProps) {
|
|
70
|
+
return (
|
|
71
|
+
<div className={cn('flex border-b bg-muted/20', className)}>
|
|
72
|
+
<div
|
|
73
|
+
className="shrink-0 border-r px-3 py-2 text-xs font-semibold text-muted-foreground"
|
|
74
|
+
style={{ width: gutterWidth }}>
|
|
75
|
+
{gutterLabel}
|
|
76
|
+
</div>
|
|
77
|
+
<div className="flex flex-1 min-w-0">
|
|
78
|
+
{labels.map(label => (
|
|
79
|
+
<div
|
|
80
|
+
key={label}
|
|
81
|
+
className="min-w-0 basis-0 grow border-r py-2 text-center text-xs font-semibold last:border-r-0">
|
|
82
|
+
{label}
|
|
83
|
+
</div>
|
|
84
|
+
))}
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface TimelineDayLabelStripProps {
|
|
91
|
+
groups: Array<TimelineColumnGroup>;
|
|
92
|
+
className?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Per-row date strip for sections without a two-level header (13 weeks). The
|
|
97
|
+
* numbers used to live inside the drop cells, where the event bars covered
|
|
98
|
+
* them — giving them their own strip keeps the bars below the dates, matching
|
|
99
|
+
* how the quarter view reads.
|
|
100
|
+
*/
|
|
101
|
+
export function TimelineDayLabelStrip({ groups, className }: TimelineDayLabelStripProps) {
|
|
102
|
+
return (
|
|
103
|
+
<div className={cn('flex border-b', className)}>
|
|
104
|
+
{groups.map(group => (
|
|
105
|
+
<div
|
|
106
|
+
key={group.key}
|
|
107
|
+
className="flex min-w-0 border-r last:border-r-0"
|
|
108
|
+
style={{ flexGrow: group.weight, flexBasis: 0 }}>
|
|
109
|
+
{group.columns.map(column => (
|
|
110
|
+
<div
|
|
111
|
+
key={column.key}
|
|
112
|
+
className={cn(
|
|
113
|
+
'min-w-0 basis-0 grow truncate border-r px-1.5 py-1 text-left text-[11px] text-muted-foreground last:border-r-0',
|
|
114
|
+
column.weekend && 'bg-muted/20',
|
|
115
|
+
column.monthStart && 'border-l-2 border-l-foreground/25 font-medium text-foreground',
|
|
116
|
+
column.containsToday && 'bg-primary/5 font-semibold text-primary'
|
|
117
|
+
)}>
|
|
118
|
+
{column.monthStart ? `${format(column.start, 'MMM')} ${column.label}` : column.label}
|
|
119
|
+
</div>
|
|
120
|
+
))}
|
|
121
|
+
</div>
|
|
122
|
+
))}
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
}
|