@super-calendar/solid 2.18.0 → 2.19.0
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/README.md +4 -4
- package/dist/client/index.js +151 -148
- package/dist/server/index.js +513 -675
- package/package.json +7 -7
- package/src/Agenda.tsx +2 -1
- package/src/Calendar.tsx +2 -1
- package/src/MonthList.tsx +1 -1
- package/src/MonthView.tsx +75 -26
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ Calendar views and date pickers for Solid 2. The renderer uses Solid signals and
|
|
|
4
4
|
the React-free `@super-calendar/core/vanilla` entry. It does not require React,
|
|
5
5
|
React DOM, React Native, or Legend List.
|
|
6
6
|
|
|
7
|
-
This package targets `solid-js
|
|
8
|
-
|
|
7
|
+
This package targets Solid 2: `solid-js@^2.0.0` and `@solidjs/web@^2.0.0`.
|
|
8
|
+
Solid 1 is not supported.
|
|
9
9
|
Its version follows the other calendar packages, and releases use the `latest`
|
|
10
10
|
npm tag.
|
|
11
11
|
|
|
@@ -21,8 +21,8 @@ spanning cell. Timed events that cross midnight keep their per-day segments.
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```sh
|
|
24
|
-
pnpm add @super-calendar/solid solid-js
|
|
25
|
-
pnpm add -D @solidjs/vite-plugin
|
|
24
|
+
pnpm add @super-calendar/solid solid-js@^2 @solidjs/web@^2 date-fns
|
|
25
|
+
pnpm add -D @solidjs/vite-plugin@^3 vite@^8
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Configure the Solid 2 Vite plugin:
|
package/dist/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { backgroundBandsForDay, backgroundBandsForDay as backgroundBandsForDay$1, bandRounding, buildMonthGrid, buildMonthGrid as buildMonthGrid$1, buildMonthWeeks, buildMultiWeekGrid, buildMultiWeekGrid as buildMultiWeekGrid$1, cellRangeFromDrag, clampMoveStartMinutes, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, daySelectionState as daySelectionState$1, defaultCalendarLabels, eventAccessibilityLabel, eventChipLayout, eventTimeLabel, eventsInTimeZone, expandRecurringEvents, expandRecurringEvents as expandRecurringEvents$1, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getViewDays as getViewDays$1, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isAllDayEvent as isAllDayEvent$1, isBackgroundEvent, isBackgroundEvent as isBackgroundEvent$1, isDateSelectable, isDateSelectable as isDateSelectable$1, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutDayEvents as layoutDayEvents$1, layoutMonthWeek, layoutMonthWeek as layoutMonthWeek$1, lightColors, loadEventSource, loadEventSource as loadEventSource$1, monthCreateRange, monthDropBounds, movedClockSpan, nextDateRange, nextDateRange as nextDateRange$1, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, titleNumberOfLines, toICalendar, toZonedTime, weekdayFormatToken, weekdayFormatToken as weekdayFormatToken$1, zonedDragBounds, zonedEventSource } from "@super-calendar/core/vanilla";
|
|
1
|
+
import { backgroundBandsForDay, backgroundBandsForDay as backgroundBandsForDay$1, bandRounding, buildMonthGrid, buildMonthGrid as buildMonthGrid$1, buildMonthWeeks, buildMultiWeekGrid, buildMultiWeekGrid as buildMultiWeekGrid$1, cellRangeFromDrag, clampMoveStartMinutes, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, daySelectionState as daySelectionState$1, defaultCalendarLabels, eventAccessibilityLabel, eventChipLayout, eventTimeLabel, eventsInTimeZone, expandRecurringEvents, expandRecurringEvents as expandRecurringEvents$1, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getViewDays as getViewDays$1, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isAllDayEvent as isAllDayEvent$1, isBackgroundEvent, isBackgroundEvent as isBackgroundEvent$1, isDateSelectable, isDateSelectable as isDateSelectable$1, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, keepMonthDraftVisible, layoutDayEvents, layoutDayEvents as layoutDayEvents$1, layoutMonthWeek, layoutMonthWeek as layoutMonthWeek$1, lightColors, loadEventSource, loadEventSource as loadEventSource$1, monthCreateRange, monthDropBounds, monthExtraLaneColumns, monthVisibleBars, movedClockSpan, nextDateRange, nextDateRange as nextDateRange$1, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, titleNumberOfLines, toICalendar, toZonedTime, weekdayFormatToken, weekdayFormatToken as weekdayFormatToken$1, withDraftEventDays, zonedDragBounds, zonedEventSource } from "@super-calendar/core/vanilla";
|
|
2
2
|
import { For, Show, createEffect, createMemo, createSignal, createUniqueId, merge, onCleanup, onSettled, untrack } from "solid-js";
|
|
3
3
|
import { Dynamic, className, createComponent, delegateEvents, effect, getNextElement, getNextMarker, insert, memo, mergeProps, readShallow, ref, runHydrationEvents, scope, setAttribute, setStyleProperty, spread, style, template } from "@solidjs/web";
|
|
4
4
|
import { addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, endOfDay, endOfMonth, endOfWeek, endOfYear, format, getISOWeek, isSameDay, isSameMonth, startOfDay, startOfMonth, startOfWeek, startOfYear } from "date-fns";
|
|
@@ -292,8 +292,8 @@ function VirtualList(props) {
|
|
|
292
292
|
var _tmpl$$8 = /*#__PURE__*/ template(`<div><div></div><!$><!/>`);
|
|
293
293
|
var _tmpl$2$7 = /*#__PURE__*/ template(`<div>`);
|
|
294
294
|
var _tmpl$3$6 = /*#__PURE__*/ template(`<button>`);
|
|
295
|
-
var _tmpl$4$5 = /*#__PURE__*/ template(`<div
|
|
296
|
-
var _tmpl$5$5 = /*#__PURE__*/ template(`<div
|
|
295
|
+
var _tmpl$4$5 = /*#__PURE__*/ template(`<div><!$><!/><!$><!/>`);
|
|
296
|
+
var _tmpl$5$5 = /*#__PURE__*/ template(`<div>No events`);
|
|
297
297
|
/**
|
|
298
298
|
* Styleable parts of {@link Agenda}. Pass a class or inline style per slot via the
|
|
299
299
|
* `classNames` / `styles` props.
|
|
@@ -404,28 +404,22 @@ function Agenda(incoming) {
|
|
|
404
404
|
color: highlighted() ? theme().todayBackground : theme().textMuted
|
|
405
405
|
}
|
|
406
406
|
}));
|
|
407
|
-
return
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}, headerProps], true);
|
|
424
|
-
insert(_el$6, scope(() => label()));
|
|
425
|
-
runHydrationEvents();
|
|
426
|
-
return _el$6;
|
|
427
|
-
}
|
|
428
|
-
});
|
|
407
|
+
return memo(() => memo(() => !!props.onPressDay)() ? (() => {
|
|
408
|
+
var _el$6 = getNextElement(_tmpl$3$6);
|
|
409
|
+
spread(_el$6, [{
|
|
410
|
+
"type": "button",
|
|
411
|
+
"onClick": () => props.onPressDay?.(row.date)
|
|
412
|
+
}, headerProps], true);
|
|
413
|
+
insert(_el$6, scope(() => label()));
|
|
414
|
+
runHydrationEvents();
|
|
415
|
+
return _el$6;
|
|
416
|
+
})() : (() => {
|
|
417
|
+
var _el$7 = getNextElement(_tmpl$2$7);
|
|
418
|
+
spread(_el$7, headerProps, true);
|
|
419
|
+
insert(_el$7, scope(() => label()));
|
|
420
|
+
runHydrationEvents();
|
|
421
|
+
return _el$7;
|
|
422
|
+
})());
|
|
429
423
|
};
|
|
430
424
|
const EventRow = (row) => {
|
|
431
425
|
const args = createMemo(() => ({
|
|
@@ -458,30 +452,23 @@ function Agenda(incoming) {
|
|
|
458
452
|
},
|
|
459
453
|
themed: { padding: "2px 12px" }
|
|
460
454
|
})], true);
|
|
461
|
-
insert(_el$8,
|
|
462
|
-
|
|
455
|
+
insert(_el$8, scope((() => {
|
|
456
|
+
var _c$2 = memo(() => !!Renderer());
|
|
457
|
+
return () => _c$2() ? createComponent(Dynamic, mergeProps({ get component() {
|
|
463
458
|
return Renderer();
|
|
464
|
-
},
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
} }));
|
|
474
|
-
},
|
|
475
|
-
get children() {
|
|
476
|
-
return createComponent(Dynamic, mergeProps({ get component() {
|
|
477
|
-
return Renderer();
|
|
478
|
-
} }, args));
|
|
479
|
-
}
|
|
480
|
-
}));
|
|
459
|
+
} }, args)) : createComponent(DefaultAgendaRow, mergeProps(args, { get cardProps() {
|
|
460
|
+
return slot("event", { themed: {
|
|
461
|
+
padding: "6px 10px",
|
|
462
|
+
borderRadius: 8,
|
|
463
|
+
background: theme().eventBackground,
|
|
464
|
+
color: theme().eventText
|
|
465
|
+
} });
|
|
466
|
+
} }));
|
|
467
|
+
})()));
|
|
481
468
|
runHydrationEvents();
|
|
482
469
|
return _el$8;
|
|
483
470
|
};
|
|
484
|
-
var _el$9 = getNextElement(_tmpl$
|
|
471
|
+
var _el$9 = getNextElement(_tmpl$4$5), _el$0 = _el$9.firstChild, [_el$1, _co$2] = getNextMarker(_el$0.nextSibling), _el$10 = _el$1.nextSibling, [_el$11, _co$3] = getNextMarker(_el$10.nextSibling);
|
|
485
472
|
insert(_el$9, createComponent(VirtualList, {
|
|
486
473
|
get data() {
|
|
487
474
|
return rows();
|
|
@@ -497,38 +484,26 @@ function Agenda(incoming) {
|
|
|
497
484
|
renderItem: (row) => {
|
|
498
485
|
const header = createMemo(() => row.item.kind === "header" ? row.item : void 0);
|
|
499
486
|
const event = createMemo(() => row.item.kind === "event" ? row.item.event : void 0);
|
|
500
|
-
return [createComponent(
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
return value().date;
|
|
506
|
-
} })
|
|
507
|
-
}), createComponent(Show, {
|
|
508
|
-
get when() {
|
|
509
|
-
return event();
|
|
510
|
-
},
|
|
511
|
-
children: (value) => createComponent(EventRow, { get event() {
|
|
512
|
-
return value();
|
|
513
|
-
} })
|
|
514
|
-
})];
|
|
487
|
+
return [memo(() => memo(() => !!header())() ? createComponent(Header, { get date() {
|
|
488
|
+
return header().date;
|
|
489
|
+
} }) : void 0), memo(() => memo(() => !!event())() ? createComponent(EventRow, { get event() {
|
|
490
|
+
return event();
|
|
491
|
+
} }) : void 0)];
|
|
515
492
|
}
|
|
516
|
-
}), _el$
|
|
517
|
-
insert(_el$9,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
var _el$0 = getNextElement(_tmpl$4$5);
|
|
523
|
-
spread(_el$0, () => slot("empty", { themed: {
|
|
493
|
+
}), _el$1, _co$2);
|
|
494
|
+
insert(_el$9, scope((() => {
|
|
495
|
+
var _c$3 = memo(() => rows().length === 0);
|
|
496
|
+
return () => _c$3() ? (() => {
|
|
497
|
+
var _el$12 = getNextElement(_tmpl$5$5);
|
|
498
|
+
spread(_el$12, () => slot("empty", { themed: {
|
|
524
499
|
padding: "16px 12px",
|
|
525
500
|
color: theme().textMuted,
|
|
526
501
|
fontSize: 14
|
|
527
502
|
} }), true);
|
|
528
503
|
runHydrationEvents();
|
|
529
|
-
return _el$
|
|
530
|
-
}
|
|
531
|
-
}), _el$
|
|
504
|
+
return _el$12;
|
|
505
|
+
})() : void 0;
|
|
506
|
+
})()), _el$11, _co$3);
|
|
532
507
|
effect(() => ({
|
|
533
508
|
e: readShallow(props.className),
|
|
534
509
|
t: readShallow(css({
|
|
@@ -650,6 +625,7 @@ var _tmpl$0$1 = /*#__PURE__*/ template(`<button><!$><!/><span>`);
|
|
|
650
625
|
* Styleable parts of {@link MonthView}. Pass a class or inline style per slot via
|
|
651
626
|
* the `classNames` / `styles` props to restyle just that part.
|
|
652
627
|
*/
|
|
628
|
+
const pressedEvent = (event) => event.target instanceof Element && event.target.closest("[data-slot=\"chipButton\"]") !== null;
|
|
653
629
|
const EMPTY_LAYOUT = {
|
|
654
630
|
segments: [],
|
|
655
631
|
laneCount: 0
|
|
@@ -1054,6 +1030,31 @@ function DateRows(incoming) {
|
|
|
1054
1030
|
const current = drag();
|
|
1055
1031
|
return createContentEnabled() && current?.kind === "create" ? monthCreateRange(new Date(current.anchor), new Date(current.hover)) : null;
|
|
1056
1032
|
}, { equals: (a, b) => a === b || !!a && !!b && +a.start === +b.start && +a.end === +b.end });
|
|
1033
|
+
const visibleLanesFor = (laneCount) => laneCount > props.maxVisibleEventCount ? Math.max(props.maxVisibleEventCount - 1, 1) : laneCount;
|
|
1034
|
+
const draftEvent = createMemo(() => {
|
|
1035
|
+
const range = createRange();
|
|
1036
|
+
return range ? {
|
|
1037
|
+
title: "",
|
|
1038
|
+
start: range.start,
|
|
1039
|
+
end: range.end,
|
|
1040
|
+
allDay: true
|
|
1041
|
+
} : null;
|
|
1042
|
+
});
|
|
1043
|
+
const rowLayouts = createMemo(() => {
|
|
1044
|
+
const draft = draftEvent();
|
|
1045
|
+
const base = weekLayouts();
|
|
1046
|
+
if (!draft) return base;
|
|
1047
|
+
const days = withDraftEventDays(eventsByDay(), draft);
|
|
1048
|
+
return _grid().weeks.map((week, index) => {
|
|
1049
|
+
const row = base[index] ?? EMPTY_LAYOUT;
|
|
1050
|
+
if (!week.days.some((d) => d.date >= draft.start && d.date < draft.end)) return row;
|
|
1051
|
+
const placed = layoutMonthWeek$1(week.days.map((d) => d.date), collectRowEvents(week, days));
|
|
1052
|
+
return keepMonthDraftVisible(placed, row, draft, {
|
|
1053
|
+
visibleLanes: visibleLanesFor,
|
|
1054
|
+
extraLaneFits: (visibleLanes) => visibleLanes < props.maxVisibleEventCount
|
|
1055
|
+
});
|
|
1056
|
+
});
|
|
1057
|
+
});
|
|
1057
1058
|
const dragRef = { current: null };
|
|
1058
1059
|
const applyDrag = (value) => {
|
|
1059
1060
|
dragRef.current = value;
|
|
@@ -1134,6 +1135,7 @@ function DateRows(incoming) {
|
|
|
1134
1135
|
const dayLookup = createMemo(() => new Map(_grid().weeks.flatMap((week) => week.days).map((day) => [day.id, day])));
|
|
1135
1136
|
const pressRow = (event, day, moving) => {
|
|
1136
1137
|
if (event.button !== 0 || heldTouch || !beginPress(event)) return;
|
|
1138
|
+
if (!moving && pressedEvent(event)) return;
|
|
1137
1139
|
const start = (armed) => {
|
|
1138
1140
|
if (moving) beginMove(moving, day, event.pointerId, armed);
|
|
1139
1141
|
else beginCreate(day, event.pointerId, armed);
|
|
@@ -1381,10 +1383,10 @@ function DateRows(incoming) {
|
|
|
1381
1383
|
},
|
|
1382
1384
|
keyed: false,
|
|
1383
1385
|
children: (week, weekIndex) => {
|
|
1384
|
-
const rowLayout = createMemo(() =>
|
|
1385
|
-
const
|
|
1386
|
-
const visibleLanes = createMemo(() => overflowing() ? Math.max(props.maxVisibleEventCount - 1, 1) : rowLayout().laneCount);
|
|
1386
|
+
const rowLayout = createMemo(() => rowLayouts()[weekIndex] ?? EMPTY_LAYOUT);
|
|
1387
|
+
const visibleLanes = createMemo(() => visibleLanesFor(rowLayout().laneCount));
|
|
1387
1388
|
const cols = createMemo(() => week().days.length);
|
|
1389
|
+
const extraLane = createMemo(() => visibleLanes() < props.maxVisibleEventCount ? monthExtraLaneColumns(rowLayout(), visibleLanes(), cols()) : week().days.map(() => false));
|
|
1388
1390
|
const columns = createMemo(() => {
|
|
1389
1391
|
let first = 0;
|
|
1390
1392
|
let last = cols() - 1;
|
|
@@ -1401,14 +1403,22 @@ function DateRows(incoming) {
|
|
|
1401
1403
|
last
|
|
1402
1404
|
};
|
|
1403
1405
|
});
|
|
1404
|
-
const
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1406
|
+
const draftSpan = createMemo(() => {
|
|
1407
|
+
const draft = draftEvent();
|
|
1408
|
+
const segment = draft ? rowLayout().segments.find((s) => s.event === draft) : void 0;
|
|
1409
|
+
if (!segment) return null;
|
|
1410
|
+
const start = Math.max(segment.startCol, columns().first);
|
|
1411
|
+
const end = Math.min(segment.endCol, columns().last);
|
|
1412
|
+
return start <= end ? {
|
|
1413
|
+
start,
|
|
1414
|
+
end,
|
|
1415
|
+
lane: segment.lane
|
|
1416
|
+
} : null;
|
|
1407
1417
|
});
|
|
1408
|
-
const draftTop = createMemo(() => 28 + props.chipGap +
|
|
1418
|
+
const draftTop = createMemo(() => 28 + props.chipGap + (draftSpan()?.lane ?? 0) * (props.chipHeight + props.chipGap));
|
|
1409
1419
|
const draftHeight = createMemo(() => Math.min(props.chipHeight, Math.max(0, eventRowHeight() - draftTop())));
|
|
1410
1420
|
return memo(() => {
|
|
1411
|
-
const barSegs = createMemo(() => rowLayout().
|
|
1421
|
+
const barSegs = createMemo(() => monthVisibleBars(rowLayout(), visibleLanes(), extraLane()).filter((s) => s.event !== draftEvent()).map((s) => {
|
|
1412
1422
|
const startCol = Math.max(s.startCol, columns().first);
|
|
1413
1423
|
const endCol = Math.min(s.endCol, columns().last);
|
|
1414
1424
|
return {
|
|
@@ -1432,6 +1442,7 @@ function DateRows(incoming) {
|
|
|
1432
1442
|
},
|
|
1433
1443
|
keyed: false,
|
|
1434
1444
|
children: (day, dayCol) => {
|
|
1445
|
+
const dayLanes = createMemo(() => visibleLanes() + (extraLane()[dayCol] ? 1 : 0));
|
|
1435
1446
|
const hidden = createMemo(() => !showAdjacentMonths() && isOutsidePeriod(day()));
|
|
1436
1447
|
const cellHeight = createMemo(() => eventsMode() ? eventRowHeight() : theme().cellHeight);
|
|
1437
1448
|
return memo(() => {
|
|
@@ -1470,10 +1481,10 @@ function DateRows(incoming) {
|
|
|
1470
1481
|
}));
|
|
1471
1482
|
if (eventsMode()) {
|
|
1472
1483
|
const dayEvents = createMemo(() => eventsByDay().get(startOfDay(day().date).toISOString()) ?? []);
|
|
1473
|
-
const hiddenEvents = createMemo(() => rowLayout().segments.filter((s) => s.startCol <= dayCol && s.endCol >= dayCol && s.lane >=
|
|
1484
|
+
const hiddenEvents = createMemo(() => rowLayout().segments.filter((s) => s.startCol <= dayCol && s.endCol >= dayCol && s.lane >= dayLanes() && s.event !== draftEvent()).map((s) => s.event));
|
|
1474
1485
|
const dayLabel = createMemo(() => format(day().date, "d MMMM", props.locale ? { locale: props.locale } : void 0));
|
|
1475
1486
|
const dayCellProps = createMemo(() => slot("day", eventCellDefault(day(), theme(), cellHeight(), props.highlightWeekends, inCreate() || isDropTarget(), props.chipGap)));
|
|
1476
|
-
var _el$10 = getNextElement(_tmpl$5$4), _el$
|
|
1487
|
+
var _el$10 = getNextElement(_tmpl$5$4), _el$19 = _el$10.firstChild, [_el$20, _co$6] = getNextMarker(_el$19.nextSibling), _el$11 = _el$20.nextSibling, _el$21 = _el$11.nextSibling, [_el$22, _co$7] = getNextMarker(_el$21.nextSibling), _el$23 = _el$22.nextSibling, [_el$24, _co$8] = getNextMarker(_el$23.nextSibling), _el$12 = _el$24.nextSibling, _el$13 = _el$12.firstChild, [_el$14, _co$3] = getNextMarker(_el$13.nextSibling), _el$15 = _el$14.nextSibling, [_el$16, _co$4] = getNextMarker(_el$15.nextSibling), _el$17 = _el$16.nextSibling, [_el$18, _co$5] = getNextMarker(_el$17.nextSibling);
|
|
1477
1488
|
spread(_el$10, [
|
|
1478
1489
|
{
|
|
1479
1490
|
"role": "gridcell",
|
|
@@ -1555,28 +1566,26 @@ function DateRows(incoming) {
|
|
|
1555
1566
|
return band();
|
|
1556
1567
|
},
|
|
1557
1568
|
children: (band) => (() => {
|
|
1558
|
-
var _el$
|
|
1559
|
-
spread(_el$
|
|
1569
|
+
var _el$25 = getNextElement(_tmpl$3$5);
|
|
1570
|
+
spread(_el$25, [{
|
|
1560
1571
|
"data-band": true,
|
|
1561
1572
|
"aria-hidden": "true"
|
|
1562
1573
|
}, () => slot("rangeBand", band())], false);
|
|
1563
1574
|
runHydrationEvents();
|
|
1564
|
-
return _el$
|
|
1575
|
+
return _el$25;
|
|
1565
1576
|
})()
|
|
1566
|
-
})), _el$
|
|
1577
|
+
})), _el$20, _co$6);
|
|
1567
1578
|
spread(_el$11, [dayData, () => slot("dayBadge", compactBadgeDefault(day(), theme()))], true);
|
|
1568
1579
|
insert(_el$11, scope(() => day().label));
|
|
1569
|
-
insert(_el$10,
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
var _el$12 = getNextElement(_tmpl$2$6);
|
|
1575
|
-
spread(_el$12, [() => slot("createGhost", {
|
|
1580
|
+
insert(_el$10, scope((() => {
|
|
1581
|
+
var _c$3 = memo(() => !!(props.renderCreateGhost && createRange() && draftSpan()?.start === dayCol && draftHeight() > 0));
|
|
1582
|
+
return () => _c$3() ? (() => {
|
|
1583
|
+
var _el$26 = getNextElement(_tmpl$2$6);
|
|
1584
|
+
spread(_el$26, [() => slot("createGhost", {
|
|
1576
1585
|
base: {
|
|
1577
1586
|
position: "absolute",
|
|
1578
1587
|
left: 2,
|
|
1579
|
-
width: `calc(${(
|
|
1588
|
+
width: `calc(${(draftSpan().end - dayCol + 1) * 100}% - 4px)`,
|
|
1580
1589
|
top: draftTop(),
|
|
1581
1590
|
height: draftHeight(),
|
|
1582
1591
|
boxSizing: "border-box",
|
|
@@ -1595,7 +1604,7 @@ function DateRows(incoming) {
|
|
|
1595
1604
|
"inert": true,
|
|
1596
1605
|
"aria-hidden": "true"
|
|
1597
1606
|
}], true);
|
|
1598
|
-
insert(_el$
|
|
1607
|
+
insert(_el$26, createComponent(Dynamic, {
|
|
1599
1608
|
get component() {
|
|
1600
1609
|
return props.renderCreateGhost;
|
|
1601
1610
|
},
|
|
@@ -1607,9 +1616,9 @@ function DateRows(incoming) {
|
|
|
1607
1616
|
}
|
|
1608
1617
|
}));
|
|
1609
1618
|
runHydrationEvents();
|
|
1610
|
-
return _el$
|
|
1611
|
-
}
|
|
1612
|
-
}), _el$
|
|
1619
|
+
return _el$26;
|
|
1620
|
+
})() : void 0;
|
|
1621
|
+
})()), _el$22, _co$7);
|
|
1613
1622
|
insert(_el$10, scope(() => createComponent(For, {
|
|
1614
1623
|
get each() {
|
|
1615
1624
|
return barSegs().filter((b) => b.startCol === dayCol);
|
|
@@ -1669,8 +1678,8 @@ function DateRows(incoming) {
|
|
|
1669
1678
|
}
|
|
1670
1679
|
], true);
|
|
1671
1680
|
insert(_el$27, scope((() => {
|
|
1672
|
-
var _c$
|
|
1673
|
-
return () => _c$
|
|
1681
|
+
var _c$6 = memo(() => !!Chip());
|
|
1682
|
+
return () => _c$6() ? createComponent(Dynamic, {
|
|
1674
1683
|
get component() {
|
|
1675
1684
|
return Chip();
|
|
1676
1685
|
},
|
|
@@ -1704,22 +1713,22 @@ function DateRows(incoming) {
|
|
|
1704
1713
|
runHydrationEvents();
|
|
1705
1714
|
return _el$27;
|
|
1706
1715
|
}
|
|
1707
|
-
})), _el$
|
|
1708
|
-
spread(_el$
|
|
1716
|
+
})), _el$24, _co$8);
|
|
1717
|
+
spread(_el$12, () => slot("events", { base: {
|
|
1709
1718
|
display: "flex",
|
|
1710
1719
|
flexDirection: "column",
|
|
1711
1720
|
gap: props.chipGap
|
|
1712
1721
|
} }), true);
|
|
1713
|
-
insert(_el$
|
|
1722
|
+
insert(_el$12, scope(() => Array.from({ length: dayLanes() }, () => (() => {
|
|
1714
1723
|
var _el$29 = getNextElement(_tmpl$7$2);
|
|
1715
1724
|
effect(() => readShallow(css({ height: props.chipHeight })), (_v$, _$p) => {
|
|
1716
1725
|
style(_el$29, _v$, _$p);
|
|
1717
1726
|
});
|
|
1718
1727
|
return _el$29;
|
|
1719
|
-
})())), _el$
|
|
1720
|
-
insert(_el$
|
|
1721
|
-
var _c$
|
|
1722
|
-
return () => _c$
|
|
1728
|
+
})())), _el$14, _co$3);
|
|
1729
|
+
insert(_el$12, scope((() => {
|
|
1730
|
+
var _c$4 = memo(() => hiddenEvents().length > 0);
|
|
1731
|
+
return () => _c$4() ? (() => {
|
|
1723
1732
|
var _el$30 = getNextElement(_tmpl$6$4);
|
|
1724
1733
|
spread(_el$30, [
|
|
1725
1734
|
{
|
|
@@ -1750,10 +1759,10 @@ function DateRows(incoming) {
|
|
|
1750
1759
|
runHydrationEvents();
|
|
1751
1760
|
return _el$30;
|
|
1752
1761
|
})() : null;
|
|
1753
|
-
})()), _el$
|
|
1754
|
-
insert(_el$
|
|
1755
|
-
var _c$
|
|
1756
|
-
return () => _c$
|
|
1762
|
+
})()), _el$16, _co$4);
|
|
1763
|
+
insert(_el$12, scope((() => {
|
|
1764
|
+
var _c$5 = memo(() => moreOpenFor() === day().id);
|
|
1765
|
+
return () => _c$5() ? (() => {
|
|
1757
1766
|
var _el$31 = getNextElement(_tmpl$8$2), _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, [_el$34, _co$9] = getNextMarker(_el$33.nextSibling);
|
|
1758
1767
|
spread(_el$31, [{
|
|
1759
1768
|
"role": "dialog",
|
|
@@ -1810,8 +1819,8 @@ function DateRows(incoming) {
|
|
|
1810
1819
|
props.onPressEvent?.(event());
|
|
1811
1820
|
};
|
|
1812
1821
|
insert(_el$35, scope((() => {
|
|
1813
|
-
var _c$
|
|
1814
|
-
return () => _c$
|
|
1822
|
+
var _c$7 = memo(() => !!Chip());
|
|
1823
|
+
return () => _c$7() ? createComponent(Dynamic, {
|
|
1815
1824
|
get component() {
|
|
1816
1825
|
return Chip();
|
|
1817
1826
|
},
|
|
@@ -1856,7 +1865,7 @@ function DateRows(incoming) {
|
|
|
1856
1865
|
runHydrationEvents();
|
|
1857
1866
|
return _el$31;
|
|
1858
1867
|
})() : null;
|
|
1859
|
-
})()), _el$
|
|
1868
|
+
})()), _el$18, _co$5);
|
|
1860
1869
|
runHydrationEvents();
|
|
1861
1870
|
return _el$10;
|
|
1862
1871
|
}
|
|
@@ -4213,22 +4222,20 @@ function TimeGrid(incoming) {
|
|
|
4213
4222
|
borderRadius: 6
|
|
4214
4223
|
}
|
|
4215
4224
|
})], true);
|
|
4216
|
-
insert(_el$68,
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
},
|
|
4220
|
-
children: (range) => createComponent(Dynamic, {
|
|
4225
|
+
insert(_el$68, scope((() => {
|
|
4226
|
+
var _c$13 = memo(() => !!ghostRange());
|
|
4227
|
+
return () => _c$13() ? createComponent(Dynamic, {
|
|
4221
4228
|
get component() {
|
|
4222
4229
|
return props.renderCreateGhost;
|
|
4223
4230
|
},
|
|
4224
4231
|
get start() {
|
|
4225
|
-
return
|
|
4232
|
+
return ghostRange().start;
|
|
4226
4233
|
},
|
|
4227
4234
|
get end() {
|
|
4228
|
-
return
|
|
4235
|
+
return ghostRange().end;
|
|
4229
4236
|
}
|
|
4230
|
-
})
|
|
4231
|
-
}));
|
|
4237
|
+
}) : void 0;
|
|
4238
|
+
})()));
|
|
4232
4239
|
runHydrationEvents();
|
|
4233
4240
|
return _el$68;
|
|
4234
4241
|
})()
|
|
@@ -4243,8 +4250,8 @@ function TimeGrid(incoming) {
|
|
|
4243
4250
|
var _el$69 = getNextElement(_tmpl$0);
|
|
4244
4251
|
ref(() => (el) => ghostRef.current = el, _el$69);
|
|
4245
4252
|
insert(_el$69, scope((() => {
|
|
4246
|
-
var _c$
|
|
4247
|
-
return () => _c$
|
|
4253
|
+
var _c$14 = memo(() => !!Renderer());
|
|
4254
|
+
return () => _c$14() ? createComponent(Dynamic, {
|
|
4248
4255
|
get component() {
|
|
4249
4256
|
return Renderer();
|
|
4250
4257
|
},
|
|
@@ -6872,25 +6879,23 @@ function ResourceTimeline(incoming) {
|
|
|
6872
6879
|
borderRadius: 6
|
|
6873
6880
|
}
|
|
6874
6881
|
})], true);
|
|
6875
|
-
insert(_el$39,
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
},
|
|
6879
|
-
children: (range) => createComponent(Dynamic, {
|
|
6882
|
+
insert(_el$39, scope((() => {
|
|
6883
|
+
var _c$5 = memo(() => !!createRange());
|
|
6884
|
+
return () => _c$5() ? createComponent(Dynamic, {
|
|
6880
6885
|
get component() {
|
|
6881
6886
|
return props.renderCreateGhost;
|
|
6882
6887
|
},
|
|
6883
6888
|
get start() {
|
|
6884
|
-
return
|
|
6889
|
+
return createRange().start;
|
|
6885
6890
|
},
|
|
6886
6891
|
get end() {
|
|
6887
|
-
return
|
|
6892
|
+
return createRange().end;
|
|
6888
6893
|
},
|
|
6889
6894
|
get resource() {
|
|
6890
6895
|
return resource();
|
|
6891
6896
|
}
|
|
6892
|
-
})
|
|
6893
|
-
}));
|
|
6897
|
+
}) : void 0;
|
|
6898
|
+
})()));
|
|
6894
6899
|
runHydrationEvents();
|
|
6895
6900
|
return _el$39;
|
|
6896
6901
|
})()
|
|
@@ -7018,8 +7023,8 @@ function ResourceTimeline(incoming) {
|
|
|
7018
7023
|
}
|
|
7019
7024
|
}), true);
|
|
7020
7025
|
insert(_el$51, scope((() => {
|
|
7021
|
-
var _c$
|
|
7022
|
-
return () => _c$
|
|
7026
|
+
var _c$6 = memo(() => !!props.renderResourceHeader);
|
|
7027
|
+
return () => _c$6() ? props.renderResourceHeader(resource(), index()) : resource().title ?? resource().id;
|
|
7023
7028
|
})()));
|
|
7024
7029
|
spread(_el$52, [
|
|
7025
7030
|
{ get "data-resource-id"() {
|
|
@@ -7172,8 +7177,8 @@ function ResourceTimeline(incoming) {
|
|
|
7172
7177
|
} })
|
|
7173
7178
|
], true);
|
|
7174
7179
|
insert(_el$66, scope((() => {
|
|
7175
|
-
var _c$
|
|
7176
|
-
return () => _c$
|
|
7180
|
+
var _c$7 = memo(() => !!Renderer());
|
|
7181
|
+
return () => _c$7() ? createComponent(Dynamic, mergeProps({ get component() {
|
|
7177
7182
|
return Renderer();
|
|
7178
7183
|
} }, args)) : createComponent(DefaultBar, mergeProps(args, {
|
|
7179
7184
|
get theme() {
|
|
@@ -7185,8 +7190,8 @@ function ResourceTimeline(incoming) {
|
|
|
7185
7190
|
}));
|
|
7186
7191
|
})()), _el$68, _co$17);
|
|
7187
7192
|
insert(_el$66, scope((() => {
|
|
7188
|
-
var _c$
|
|
7189
|
-
return () => _c$
|
|
7193
|
+
var _c$8 = memo(() => !!draggable());
|
|
7194
|
+
return () => _c$8() ? (() => {
|
|
7190
7195
|
var _el$71 = getNextElement(_tmpl$6);
|
|
7191
7196
|
_el$71._$$pointerdown = (e) => {
|
|
7192
7197
|
e.stopPropagation();
|
|
@@ -7241,25 +7246,23 @@ function ResourceTimeline(incoming) {
|
|
|
7241
7246
|
borderRadius: 6
|
|
7242
7247
|
}
|
|
7243
7248
|
})], true);
|
|
7244
|
-
insert(_el$72,
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
},
|
|
7248
|
-
children: (range) => createComponent(Dynamic, {
|
|
7249
|
+
insert(_el$72, scope((() => {
|
|
7250
|
+
var _c$9 = memo(() => !!createRange());
|
|
7251
|
+
return () => _c$9() ? createComponent(Dynamic, {
|
|
7249
7252
|
get component() {
|
|
7250
7253
|
return props.renderCreateGhost;
|
|
7251
7254
|
},
|
|
7252
7255
|
get start() {
|
|
7253
|
-
return
|
|
7256
|
+
return createRange().start;
|
|
7254
7257
|
},
|
|
7255
7258
|
get end() {
|
|
7256
|
-
return
|
|
7259
|
+
return createRange().end;
|
|
7257
7260
|
},
|
|
7258
7261
|
get resource() {
|
|
7259
7262
|
return resource();
|
|
7260
7263
|
}
|
|
7261
|
-
})
|
|
7262
|
-
}));
|
|
7264
|
+
}) : void 0;
|
|
7265
|
+
})()));
|
|
7263
7266
|
runHydrationEvents();
|
|
7264
7267
|
return _el$72;
|
|
7265
7268
|
})()
|