@event-calendar/core 4.6.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -4
- package/dist/index.css +1 -1
- package/dist/index.js +180 -246
- package/package.json +2 -2
- package/src/plugins/interaction/Action.svelte +3 -2
- package/src/storage/options.js +3 -0
- package/src/storage/state.js +3 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* EventCalendar v4.
|
|
2
|
+
* EventCalendar v4.7.1
|
|
3
3
|
* https://github.com/vkurko/calendar
|
|
4
4
|
*/
|
|
5
5
|
import { tick, getContext, untrack, setContext, onMount, mount, unmount } from "svelte";
|
|
6
6
|
import * as $ from "svelte/internal/client";
|
|
7
7
|
import "svelte/internal/disclose-version";
|
|
8
|
+
import "svelte/internal/flags/async";
|
|
8
9
|
import { derived, writable, readable, get } from "svelte/store";
|
|
9
10
|
import "svelte/internal/flags/legacy";
|
|
10
11
|
import { SvelteSet } from "svelte/reactivity";
|
|
@@ -18,9 +19,9 @@ function setContent(node, content) {
|
|
|
18
19
|
update(content2) {
|
|
19
20
|
if (typeof content2 == "string") {
|
|
20
21
|
node.innerText = content2;
|
|
21
|
-
} else if (content2
|
|
22
|
+
} else if (content2?.domNodes) {
|
|
22
23
|
node.replaceChildren(...content2.domNodes);
|
|
23
|
-
} else if (content2
|
|
24
|
+
} else if (content2?.html) {
|
|
24
25
|
node.innerHTML = content2.html;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -251,7 +252,7 @@ function flushDebounce(queue) {
|
|
|
251
252
|
queue.clear();
|
|
252
253
|
}
|
|
253
254
|
function task(fn, handle, tasks) {
|
|
254
|
-
handle
|
|
255
|
+
handle ??= fn;
|
|
255
256
|
if (!tasks.has(handle)) {
|
|
256
257
|
tasks.set(handle, setTimeout(() => {
|
|
257
258
|
tasks.delete(handle);
|
|
@@ -264,7 +265,7 @@ function setPayload(obj, payload) {
|
|
|
264
265
|
obj[payloadProp] = payload;
|
|
265
266
|
}
|
|
266
267
|
function hasPayload(obj) {
|
|
267
|
-
return !!
|
|
268
|
+
return !!obj?.[payloadProp];
|
|
268
269
|
}
|
|
269
270
|
function getPayload(obj) {
|
|
270
271
|
return obj[payloadProp];
|
|
@@ -555,11 +556,10 @@ function repositionEvent$1(chunk, longChunks, height2) {
|
|
|
555
556
|
return margin;
|
|
556
557
|
}
|
|
557
558
|
function runReposition(refs, data) {
|
|
558
|
-
var _a;
|
|
559
559
|
refs.length = data.length;
|
|
560
560
|
let result = [];
|
|
561
561
|
for (let ref of refs) {
|
|
562
|
-
result.push(
|
|
562
|
+
result.push(ref?.reposition?.());
|
|
563
563
|
}
|
|
564
564
|
return result;
|
|
565
565
|
}
|
|
@@ -671,12 +671,10 @@ function createResource(input) {
|
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
673
|
function resourceBackgroundColor(event, resources) {
|
|
674
|
-
|
|
675
|
-
return (_a = findResource(event, resources)) == null ? void 0 : _a.eventBackgroundColor;
|
|
674
|
+
return findResource(event, resources)?.eventBackgroundColor;
|
|
676
675
|
}
|
|
677
676
|
function resourceTextColor(event, resources) {
|
|
678
|
-
|
|
679
|
-
return (_a = findResource(event, resources)) == null ? void 0 : _a.eventTextColor;
|
|
677
|
+
return findResource(event, resources)?.eventTextColor;
|
|
680
678
|
}
|
|
681
679
|
function findResource(event, resources) {
|
|
682
680
|
return resources.find((resource) => event.resourceIds.includes(resource.id));
|
|
@@ -784,7 +782,7 @@ function createSlotTimeLimits($slotMinTime, $slotMaxTime, $flexibleSlotTimeLimit
|
|
|
784
782
|
if ($flexibleSlotTimeLimits) {
|
|
785
783
|
let minMin = createDuration(min(toSeconds(min$1), max(0, toSeconds(max$1) - DAY_IN_SECONDS)));
|
|
786
784
|
let maxMax = createDuration(max(toSeconds(max$1), toSeconds(minMin) + DAY_IN_SECONDS));
|
|
787
|
-
let filter = isFunction($flexibleSlotTimeLimits
|
|
785
|
+
let filter = isFunction($flexibleSlotTimeLimits?.eventFilter) ? $flexibleSlotTimeLimits.eventFilter : (event) => !bgEvent(event.display);
|
|
788
786
|
loop: for (let date of $_viewDates) {
|
|
789
787
|
let start = addDuration(cloneDate(date), min$1);
|
|
790
788
|
let end = addDuration(cloneDate(date), max$1);
|
|
@@ -813,8 +811,8 @@ function createSlotTimeLimits($slotMinTime, $slotMaxTime, $flexibleSlotTimeLimit
|
|
|
813
811
|
}
|
|
814
812
|
return { min: min$1, max: max$1 };
|
|
815
813
|
}
|
|
814
|
+
const specialOptions = ["buttonText", "customButtons", "theme"];
|
|
816
815
|
function createOptions(plugins) {
|
|
817
|
-
var _a;
|
|
818
816
|
let options = {
|
|
819
817
|
allDayContent: void 0,
|
|
820
818
|
allDaySlot: true,
|
|
@@ -940,12 +938,11 @@ function createOptions(plugins) {
|
|
|
940
938
|
views: {}
|
|
941
939
|
};
|
|
942
940
|
for (let plugin of plugins) {
|
|
943
|
-
|
|
941
|
+
plugin.createOptions?.(options);
|
|
944
942
|
}
|
|
945
943
|
return options;
|
|
946
944
|
}
|
|
947
945
|
function createParsers(plugins) {
|
|
948
|
-
var _a;
|
|
949
946
|
let parsers = {
|
|
950
947
|
date: (date) => setMidnight(createDate(date)),
|
|
951
948
|
duration: createDuration,
|
|
@@ -962,7 +959,7 @@ function createParsers(plugins) {
|
|
|
962
959
|
validRange: createDateRange
|
|
963
960
|
};
|
|
964
961
|
for (let plugin of plugins) {
|
|
965
|
-
|
|
962
|
+
plugin.createParsers?.(parsers);
|
|
966
963
|
}
|
|
967
964
|
return parsers;
|
|
968
965
|
}
|
|
@@ -976,7 +973,7 @@ function diff(options, prevOptions) {
|
|
|
976
973
|
return diff2;
|
|
977
974
|
}
|
|
978
975
|
function dayGrid(state) {
|
|
979
|
-
return derived(state.view, ($view) => $view
|
|
976
|
+
return derived(state.view, ($view) => $view?.startsWith("dayGrid"));
|
|
980
977
|
}
|
|
981
978
|
function activeRange(state) {
|
|
982
979
|
return derived(
|
|
@@ -1150,7 +1147,6 @@ function today(state) {
|
|
|
1150
1147
|
}
|
|
1151
1148
|
class State {
|
|
1152
1149
|
constructor(plugins, input) {
|
|
1153
|
-
var _a, _b;
|
|
1154
1150
|
plugins = plugins || [];
|
|
1155
1151
|
let options = createOptions(plugins);
|
|
1156
1152
|
let parsers = createParsers(plugins);
|
|
@@ -1196,7 +1192,7 @@ class State {
|
|
|
1196
1192
|
};
|
|
1197
1193
|
this._get = (key) => validKey(key, this) ? get(this[key]) : void 0;
|
|
1198
1194
|
for (let plugin of plugins) {
|
|
1199
|
-
|
|
1195
|
+
plugin.createStores?.(this);
|
|
1200
1196
|
}
|
|
1201
1197
|
if (input.view) {
|
|
1202
1198
|
this.view.set(input.view);
|
|
@@ -1204,14 +1200,14 @@ class State {
|
|
|
1204
1200
|
let views = /* @__PURE__ */ new Set([...keys(options.views), ...keys(input.views ?? {})]);
|
|
1205
1201
|
for (let view2 of views) {
|
|
1206
1202
|
let defOpts = mergeOpts(options, options.views[view2] ?? {});
|
|
1207
|
-
let opts = mergeOpts(defOpts, input,
|
|
1203
|
+
let opts = mergeOpts(defOpts, input, input.views?.[view2] ?? {});
|
|
1208
1204
|
let component = opts.component;
|
|
1209
1205
|
filterOpts(opts, this);
|
|
1210
1206
|
for (let key of keys(opts)) {
|
|
1211
1207
|
let { set, _set = set, ...rest } = this[key];
|
|
1212
1208
|
this[key] = {
|
|
1213
1209
|
// Set value in all views
|
|
1214
|
-
set:
|
|
1210
|
+
set: specialOptions.includes(key) ? (value) => {
|
|
1215
1211
|
if (isFunction(value)) {
|
|
1216
1212
|
let result = value(defOpts[key]);
|
|
1217
1213
|
opts[key] = result;
|
|
@@ -1263,7 +1259,7 @@ function mergeOpts(...args) {
|
|
|
1263
1259
|
let result = {};
|
|
1264
1260
|
for (let opts of args) {
|
|
1265
1261
|
let override = {};
|
|
1266
|
-
for (let key of
|
|
1262
|
+
for (let key of specialOptions) {
|
|
1267
1263
|
if (isFunction(opts[key])) {
|
|
1268
1264
|
override[key] = opts[key](result[key]);
|
|
1269
1265
|
}
|
|
@@ -1290,7 +1286,6 @@ var root_10$1 = $.from_html(`<button></button>`);
|
|
|
1290
1286
|
var root_12$1 = $.from_html(`<button> </button>`);
|
|
1291
1287
|
function Buttons($$anchor, $$props) {
|
|
1292
1288
|
$.push($$props, false);
|
|
1293
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1294
1289
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
1295
1290
|
const $date = () => $.store_get(date, "$date", $$stores);
|
|
1296
1291
|
const $duration = () => $.store_get(duration, "$duration", $$stores);
|
|
@@ -1302,6 +1297,7 @@ function Buttons($$anchor, $$props) {
|
|
|
1302
1297
|
const $buttonText = () => $.store_get(buttonText, "$buttonText", $$stores);
|
|
1303
1298
|
const $customButtons = () => $.store_get(customButtons, "$customButtons", $$stores);
|
|
1304
1299
|
const $view = () => $.store_get(view2, "$view", $$stores);
|
|
1300
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1305
1301
|
let buttons = $.prop($$props, "buttons", 8);
|
|
1306
1302
|
let {
|
|
1307
1303
|
_currentRange,
|
|
@@ -1371,7 +1367,7 @@ function Buttons($$anchor, $$props) {
|
|
|
1371
1367
|
{
|
|
1372
1368
|
var consequent = ($$anchor3) => {
|
|
1373
1369
|
var h2 = root_2$7();
|
|
1374
|
-
$.action(h2, ($$node, $$action_arg) => setContent
|
|
1370
|
+
$.action(h2, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), $_viewTitle);
|
|
1375
1371
|
$.template_effect(() => $.set_class(h2, 1, ($theme(), $.untrack(() => $theme().title))));
|
|
1376
1372
|
$.append($$anchor3, h2);
|
|
1377
1373
|
};
|
|
@@ -1434,10 +1430,9 @@ function Buttons($$anchor, $$props) {
|
|
|
1434
1430
|
var consequent_4 = ($$anchor7) => {
|
|
1435
1431
|
var button_4 = root_10$1();
|
|
1436
1432
|
$.effect(() => $.event("click", button_4, function(...$$args) {
|
|
1437
|
-
|
|
1438
|
-
(_a = $customButtons()[$.get(button)].click) == null ? void 0 : _a.apply(this, $$args);
|
|
1433
|
+
$customButtons()[$.get(button)].click?.apply(this, $$args);
|
|
1439
1434
|
}));
|
|
1440
|
-
$.action(button_4, ($$node, $$action_arg) => setContent
|
|
1435
|
+
$.action(button_4, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $customButtons()[$.get(button)].text);
|
|
1441
1436
|
$.template_effect(() => $.set_class(button_4, 1, `${($theme(), $.untrack(() => $theme().button)) ?? ""} ec-${$.get(button) ?? ""}${($customButtons(), $.get(button), $theme(), $.untrack(() => $customButtons()[$.get(button)].active ? " " + $theme().active : "")) ?? ""}`));
|
|
1442
1437
|
$.append($$anchor7, button_4);
|
|
1443
1438
|
};
|
|
@@ -1526,15 +1521,14 @@ var root_1$d = $.from_html(`<div></div>`);
|
|
|
1526
1521
|
var root$r = $.from_html(`<nav></nav>`);
|
|
1527
1522
|
function Toolbar($$anchor, $$props) {
|
|
1528
1523
|
$.push($$props, true);
|
|
1529
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1530
1524
|
const $headerToolbar = () => $.store_get(headerToolbar, "$headerToolbar", $$stores);
|
|
1531
1525
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
1526
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1532
1527
|
let { headerToolbar, theme } = getContext("state");
|
|
1533
1528
|
let sections = $.derived(() => {
|
|
1534
|
-
var _a;
|
|
1535
1529
|
let sections2 = {};
|
|
1536
1530
|
for (let key of ["start", "center", "end"]) {
|
|
1537
|
-
sections2[key] =
|
|
1531
|
+
sections2[key] = $headerToolbar()[key]?.split(" ").map((group) => group.split(",")) ?? [];
|
|
1538
1532
|
}
|
|
1539
1533
|
return sections2;
|
|
1540
1534
|
});
|
|
@@ -1583,7 +1577,6 @@ function Toolbar($$anchor, $$props) {
|
|
|
1583
1577
|
}
|
|
1584
1578
|
function Auxiliary$1($$anchor, $$props) {
|
|
1585
1579
|
$.push($$props, true);
|
|
1586
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1587
1580
|
const $_activeRange = () => $.store_get(_activeRange, "$_activeRange", $$stores);
|
|
1588
1581
|
const $datesSet = () => $.store_get(datesSet, "$datesSet", $$stores);
|
|
1589
1582
|
const $_view = () => $.store_get(_view, "$_view", $$stores);
|
|
@@ -1593,6 +1586,7 @@ function Auxiliary$1($$anchor, $$props) {
|
|
|
1593
1586
|
const $_recheckScrollable = () => $.store_get(_recheckScrollable, "$_recheckScrollable", $$stores);
|
|
1594
1587
|
const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
|
|
1595
1588
|
const $_auxiliary = () => $.store_get(_auxiliary, "$_auxiliary", $$stores);
|
|
1589
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1596
1590
|
let {
|
|
1597
1591
|
datesSet,
|
|
1598
1592
|
eventAllUpdated,
|
|
@@ -1660,7 +1654,6 @@ function Auxiliary$1($$anchor, $$props) {
|
|
|
1660
1654
|
var root$q = $.from_html(`<div><!> <!></div> <!>`, 1);
|
|
1661
1655
|
function Calendar($$anchor, $$props) {
|
|
1662
1656
|
$.push($$props, true);
|
|
1663
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1664
1657
|
const $_events = () => $.store_get(_events, "$_events", $$stores);
|
|
1665
1658
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
1666
1659
|
const $date = () => $.store_get(date, "$date", $$stores);
|
|
@@ -1672,6 +1665,7 @@ function Calendar($$anchor, $$props) {
|
|
|
1672
1665
|
const $_iClass = () => $.store_get(_iClass, "$_iClass", $$stores);
|
|
1673
1666
|
const $height = () => $.store_get(height2, "$height", $$stores);
|
|
1674
1667
|
const $view = () => $.store_get(view2, "$view", $$stores);
|
|
1668
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1675
1669
|
let plugins = $.prop($$props, "plugins", 19, () => []), options = $.prop($$props, "options", 19, () => ({}));
|
|
1676
1670
|
let state = new State(plugins(), options());
|
|
1677
1671
|
setContext("state", state);
|
|
@@ -1749,8 +1743,7 @@ function Calendar($$anchor, $$props) {
|
|
|
1749
1743
|
return toViewWithLocalDates(get(state._view));
|
|
1750
1744
|
}
|
|
1751
1745
|
function unselect() {
|
|
1752
|
-
|
|
1753
|
-
(_a = $_interaction().action) == null ? void 0 : _a.unselect();
|
|
1746
|
+
$_interaction().action?.unselect();
|
|
1754
1747
|
return this;
|
|
1755
1748
|
}
|
|
1756
1749
|
function dateFromPoint(x, y) {
|
|
@@ -1771,6 +1764,21 @@ function Calendar($$anchor, $$props) {
|
|
|
1771
1764
|
return this;
|
|
1772
1765
|
}
|
|
1773
1766
|
let View2 = $.derived($_viewComponent);
|
|
1767
|
+
var $$exports = {
|
|
1768
|
+
setOption,
|
|
1769
|
+
getOption,
|
|
1770
|
+
refetchEvents,
|
|
1771
|
+
getEvents,
|
|
1772
|
+
getEventById,
|
|
1773
|
+
addEvent,
|
|
1774
|
+
updateEvent,
|
|
1775
|
+
removeEventById,
|
|
1776
|
+
getView,
|
|
1777
|
+
unselect,
|
|
1778
|
+
dateFromPoint,
|
|
1779
|
+
next,
|
|
1780
|
+
prev
|
|
1781
|
+
};
|
|
1774
1782
|
var fragment = root$q();
|
|
1775
1783
|
var div = $.first_child(fragment);
|
|
1776
1784
|
let styles;
|
|
@@ -1795,21 +1803,7 @@ function Calendar($$anchor, $$props) {
|
|
|
1795
1803
|
]
|
|
1796
1804
|
);
|
|
1797
1805
|
$.append($$anchor, fragment);
|
|
1798
|
-
var $$pop = $.pop(
|
|
1799
|
-
setOption,
|
|
1800
|
-
getOption,
|
|
1801
|
-
refetchEvents,
|
|
1802
|
-
getEvents,
|
|
1803
|
-
getEventById,
|
|
1804
|
-
addEvent,
|
|
1805
|
-
updateEvent,
|
|
1806
|
-
removeEventById,
|
|
1807
|
-
getView,
|
|
1808
|
-
unselect,
|
|
1809
|
-
dateFromPoint,
|
|
1810
|
-
next,
|
|
1811
|
-
prev
|
|
1812
|
-
});
|
|
1806
|
+
var $$pop = $.pop($$exports);
|
|
1813
1807
|
$$cleanup();
|
|
1814
1808
|
return $$pop;
|
|
1815
1809
|
}
|
|
@@ -1835,11 +1829,11 @@ var root_1$c = $.from_html(`<div role="columnheader"><span></span></div>`);
|
|
|
1835
1829
|
var root$p = $.from_html(`<div><div role="row"></div> <div></div></div>`);
|
|
1836
1830
|
function Header$1($$anchor, $$props) {
|
|
1837
1831
|
$.push($$props, false);
|
|
1838
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1839
1832
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
1840
1833
|
const $_days = () => $.store_get(_days, "$_days", $$stores);
|
|
1841
1834
|
const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
|
|
1842
1835
|
const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
|
|
1836
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1843
1837
|
let { theme, _intlDayHeader, _intlDayHeaderAL, _days } = getContext("state");
|
|
1844
1838
|
$.init();
|
|
1845
1839
|
var div = root$p();
|
|
@@ -1847,7 +1841,7 @@ function Header$1($$anchor, $$props) {
|
|
|
1847
1841
|
$.each(div_1, 5, $_days, $.index, ($$anchor2, day) => {
|
|
1848
1842
|
var div_2 = root_1$c();
|
|
1849
1843
|
var span = $.child(div_2);
|
|
1850
|
-
$.action(span, ($$node, $$action_arg) => setContent
|
|
1844
|
+
$.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(day)));
|
|
1851
1845
|
$.reset(div_2);
|
|
1852
1846
|
$.template_effect(
|
|
1853
1847
|
($0, $1) => {
|
|
@@ -1855,10 +1849,7 @@ function Header$1($$anchor, $$props) {
|
|
|
1855
1849
|
$.set_attribute(span, "aria-label", $1);
|
|
1856
1850
|
},
|
|
1857
1851
|
[
|
|
1858
|
-
() =>
|
|
1859
|
-
var _a;
|
|
1860
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(day).getUTCDay()];
|
|
1861
|
-
},
|
|
1852
|
+
() => $theme().weekdays?.[$.get(day).getUTCDay()],
|
|
1862
1853
|
() => $_intlDayHeaderAL().format($.get(day))
|
|
1863
1854
|
]
|
|
1864
1855
|
);
|
|
@@ -1880,7 +1871,6 @@ var root_1$b = $.from_html(`<div></div>`);
|
|
|
1880
1871
|
var root$o = $.from_html(`<article><!></article>`);
|
|
1881
1872
|
function BaseEvent($$anchor, $$props) {
|
|
1882
1873
|
$.push($$props, true);
|
|
1883
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1884
1874
|
const $resources = () => $.store_get(resources, "$resources", $$stores);
|
|
1885
1875
|
const $eventBackgroundColor = () => $.store_get(eventBackgroundColor, "$eventBackgroundColor", $$stores);
|
|
1886
1876
|
const $eventColor = () => $.store_get(eventColor, "$eventColor", $$stores);
|
|
@@ -1895,6 +1885,7 @@ function BaseEvent($$anchor, $$props) {
|
|
|
1895
1885
|
const $eventClick = () => $.store_get(eventClick, "$eventClick", $$stores);
|
|
1896
1886
|
const $eventMouseEnter = () => $.store_get(eventMouseEnter, "$eventMouseEnter", $$stores);
|
|
1897
1887
|
const $eventMouseLeave = () => $.store_get(eventMouseLeave, "$eventMouseLeave", $$stores);
|
|
1888
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
1898
1889
|
let el = $.prop($$props, "el", 15), classes = $.prop($$props, "classes", 3, identity), styles = $.prop($$props, "styles", 3, identity);
|
|
1899
1890
|
let {
|
|
1900
1891
|
displayEventEnd,
|
|
@@ -1946,21 +1937,18 @@ function BaseEvent($$anchor, $$props) {
|
|
|
1946
1937
|
let onmouseleave = $.derived(() => createHandler($eventMouseLeave(), $.get(display)));
|
|
1947
1938
|
var article = root$o();
|
|
1948
1939
|
article.__click = function(...$$args) {
|
|
1949
|
-
|
|
1950
|
-
(_a = $.get(onclick2)) == null ? void 0 : _a.apply(this, $$args);
|
|
1940
|
+
$.get(onclick2)?.apply(this, $$args);
|
|
1951
1941
|
};
|
|
1952
1942
|
article.__keydown = function(...$$args) {
|
|
1953
|
-
|
|
1954
|
-
(_a = $.get(onkeydown)) == null ? void 0 : _a.apply(this, $$args);
|
|
1943
|
+
$.get(onkeydown)?.apply(this, $$args);
|
|
1955
1944
|
};
|
|
1956
1945
|
article.__pointerdown = function(...$$args) {
|
|
1957
|
-
|
|
1958
|
-
(_a = $$props.onpointerdown) == null ? void 0 : _a.apply(this, $$args);
|
|
1946
|
+
$$props.onpointerdown?.apply(this, $$args);
|
|
1959
1947
|
};
|
|
1960
1948
|
{
|
|
1961
1949
|
const defaultBody = ($$anchor2) => {
|
|
1962
1950
|
var div = root_1$b();
|
|
1963
|
-
$.action(div, ($$node, $$action_arg) => setContent
|
|
1951
|
+
$.action(div, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
|
|
1964
1952
|
$.template_effect(() => $.set_class(div, 1, $.clsx($theme().eventBody)));
|
|
1965
1953
|
$.append($$anchor2, div);
|
|
1966
1954
|
};
|
|
@@ -1990,12 +1978,10 @@ function BaseEvent($$anchor, $$props) {
|
|
|
1990
1978
|
$.set_attribute(article, "tabindex", $.get(onclick2) ? 0 : void 0);
|
|
1991
1979
|
});
|
|
1992
1980
|
$.event("mouseenter", article, function(...$$args) {
|
|
1993
|
-
|
|
1994
|
-
(_a = $.get(onmouseenter)) == null ? void 0 : _a.apply(this, $$args);
|
|
1981
|
+
$.get(onmouseenter)?.apply(this, $$args);
|
|
1995
1982
|
});
|
|
1996
1983
|
$.event("mouseleave", article, function(...$$args) {
|
|
1997
|
-
|
|
1998
|
-
(_a = $.get(onmouseleave)) == null ? void 0 : _a.apply(this, $$args);
|
|
1984
|
+
$.get(onmouseleave)?.apply(this, $$args);
|
|
1999
1985
|
});
|
|
2000
1986
|
$.append($$anchor, article);
|
|
2001
1987
|
$.pop();
|
|
@@ -2004,20 +1990,16 @@ function BaseEvent($$anchor, $$props) {
|
|
|
2004
1990
|
$.delegate(["click", "keydown", "pointerdown"]);
|
|
2005
1991
|
function InteractableEvent($$anchor, $$props) {
|
|
2006
1992
|
$.push($$props, true);
|
|
2007
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2008
1993
|
const $_iClasses = () => $.store_get(_iClasses, "$_iClasses", $$stores);
|
|
2009
1994
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
1995
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2010
1996
|
let el = $.prop($$props, "el", 15);
|
|
2011
1997
|
let { _interaction, _iClasses } = getContext("state");
|
|
2012
1998
|
let event = $.derived(() => $$props.chunk.event);
|
|
2013
1999
|
let display = $.derived(() => $$props.chunk.event.display);
|
|
2014
2000
|
let classes = $.derived(() => (classNames) => $_iClasses()(classNames, $.get(event)));
|
|
2015
2001
|
function createDragHandler(event2) {
|
|
2016
|
-
|
|
2017
|
-
return ((_a = $_interaction().action) == null ? void 0 : _a.draggable(event2)) ? (jsEvent) => {
|
|
2018
|
-
var _a2, _b2;
|
|
2019
|
-
return $_interaction().action.drag(event2, jsEvent, (_a2 = $$props.forceDate) == null ? void 0 : _a2.call($$props), (_b2 = $$props.forceMargin) == null ? void 0 : _b2.call($$props));
|
|
2020
|
-
} : (_b = $_interaction().action) == null ? void 0 : _b.noAction;
|
|
2002
|
+
return $_interaction().action?.draggable(event2) ? (jsEvent) => $_interaction().action.drag(event2, jsEvent, $$props.forceDate?.(), $$props.forceMargin?.()) : $_interaction().action?.noAction;
|
|
2021
2003
|
}
|
|
2022
2004
|
let onpointerdown = $.derived(() => !bgEvent($.get(display)) && !helperEvent($.get(display)) ? createDragHandler($.get(event)) : void 0);
|
|
2023
2005
|
let Resizer2 = $.derived(() => $_interaction().resizer);
|
|
@@ -2095,10 +2077,10 @@ function InteractableEvent($$anchor, $$props) {
|
|
|
2095
2077
|
}
|
|
2096
2078
|
function Event$4($$anchor, $$props) {
|
|
2097
2079
|
$.push($$props, true);
|
|
2098
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2099
2080
|
const $dayMaxEvents = () => $.store_get(dayMaxEvents, "$dayMaxEvents", $$stores);
|
|
2100
2081
|
const $_hiddenEvents = () => $.store_get(_hiddenEvents, "$_hiddenEvents", $$stores);
|
|
2101
2082
|
const $_popupDate = () => $.store_get(_popupDate, "$_popupDate", $$stores);
|
|
2083
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2102
2084
|
let longChunks = $.prop($$props, "longChunks", 19, () => ({})), inPopup = $.prop($$props, "inPopup", 3, false), dates = $.prop($$props, "dates", 19, () => []);
|
|
2103
2085
|
let { dayMaxEvents, _hiddenEvents, _popupDate } = getContext("state");
|
|
2104
2086
|
let el = $.state(void 0);
|
|
@@ -2167,6 +2149,7 @@ function Event$4($$anchor, $$props) {
|
|
|
2167
2149
|
}
|
|
2168
2150
|
return h;
|
|
2169
2151
|
}
|
|
2152
|
+
var $$exports = { reposition };
|
|
2170
2153
|
InteractableEvent($$anchor, {
|
|
2171
2154
|
get chunk() {
|
|
2172
2155
|
return $$props.chunk;
|
|
@@ -2187,20 +2170,20 @@ function Event$4($$anchor, $$props) {
|
|
|
2187
2170
|
$.set(el, $$value, true);
|
|
2188
2171
|
}
|
|
2189
2172
|
});
|
|
2190
|
-
var $$pop = $.pop(
|
|
2173
|
+
var $$pop = $.pop($$exports);
|
|
2191
2174
|
$$cleanup();
|
|
2192
2175
|
return $$pop;
|
|
2193
2176
|
}
|
|
2194
2177
|
var root$n = $.from_html(`<div><div><time></time> <a role="button" tabindex="0">×</a></div> <div></div></div>`);
|
|
2195
2178
|
function Popup($$anchor, $$props) {
|
|
2196
2179
|
$.push($$props, true);
|
|
2197
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2198
2180
|
const $_popupChunks = () => $.store_get(_popupChunks, "$_popupChunks", $$stores);
|
|
2199
2181
|
const $_popupDate = () => $.store_get(_popupDate, "$_popupDate", $$stores);
|
|
2200
2182
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
2201
2183
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
2202
2184
|
const $_intlDayPopover = () => $.store_get(_intlDayPopover, "$_intlDayPopover", $$stores);
|
|
2203
2185
|
const $buttonText = () => $.store_get(buttonText, "$buttonText", $$stores);
|
|
2186
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2204
2187
|
let {
|
|
2205
2188
|
buttonText,
|
|
2206
2189
|
theme,
|
|
@@ -2263,29 +2246,25 @@ function Popup($$anchor, $$props) {
|
|
|
2263
2246
|
$.store_set(_popupChunks, []);
|
|
2264
2247
|
}
|
|
2265
2248
|
function handlePointerDownOutside() {
|
|
2266
|
-
var _a;
|
|
2267
2249
|
close();
|
|
2268
|
-
|
|
2250
|
+
$_interaction().action?.noClick();
|
|
2269
2251
|
}
|
|
2270
2252
|
var div = root$n();
|
|
2271
2253
|
var event_handler = $.derived(stopPropagation);
|
|
2272
2254
|
div.__pointerdown = function(...$$args) {
|
|
2273
|
-
|
|
2274
|
-
(_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
|
|
2255
|
+
$.get(event_handler)?.apply(this, $$args);
|
|
2275
2256
|
};
|
|
2276
2257
|
var div_1 = $.child(div);
|
|
2277
2258
|
var time = $.child(div_1);
|
|
2278
|
-
$.action(time, ($$node, $$action_arg) => setContent
|
|
2259
|
+
$.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayPopover().format($_popupDate()));
|
|
2279
2260
|
var a = $.sibling(time, 2);
|
|
2280
2261
|
var event_handler_1 = $.derived(() => stopPropagation(close));
|
|
2281
2262
|
a.__click = function(...$$args) {
|
|
2282
|
-
|
|
2283
|
-
(_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
|
|
2263
|
+
$.get(event_handler_1)?.apply(this, $$args);
|
|
2284
2264
|
};
|
|
2285
2265
|
var event_handler_2 = $.derived(() => keyEnter(close));
|
|
2286
2266
|
a.__keydown = function(...$$args) {
|
|
2287
|
-
|
|
2288
|
-
(_a = $.get(event_handler_2)) == null ? void 0 : _a.apply(this, $$args);
|
|
2267
|
+
$.get(event_handler_2)?.apply(this, $$args);
|
|
2289
2268
|
};
|
|
2290
2269
|
$.reset(div_1);
|
|
2291
2270
|
var div_2 = $.sibling(div_1, 2);
|
|
@@ -2300,7 +2279,7 @@ function Popup($$anchor, $$props) {
|
|
|
2300
2279
|
$.reset(div_2);
|
|
2301
2280
|
$.reset(div);
|
|
2302
2281
|
$.bind_this(div, ($$value) => $.set(el, $$value), () => $.get(el));
|
|
2303
|
-
$.action(div, ($$node, $$action_arg) => outsideEvent
|
|
2282
|
+
$.action(div, ($$node, $$action_arg) => outsideEvent?.($$node, $$action_arg), () => "pointerdown");
|
|
2304
2283
|
$.template_effect(
|
|
2305
2284
|
($0) => {
|
|
2306
2285
|
$.set_class(div, 1, $theme().popup);
|
|
@@ -2326,7 +2305,6 @@ var root_10 = $.from_html(`<a role="button" tabindex="0" aria-haspopup="true"></
|
|
|
2326
2305
|
var root$m = $.from_html(`<div role="cell"><div><time></time> <!></div> <div><!></div> <!> <div><!></div> <!> <div><!></div></div>`);
|
|
2327
2306
|
function Day$4($$anchor, $$props) {
|
|
2328
2307
|
$.push($$props, true);
|
|
2329
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2330
2308
|
const $_hiddenEvents = () => $.store_get(_hiddenEvents, "$_hiddenEvents", $$stores);
|
|
2331
2309
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
2332
2310
|
const $currentDate = () => $.store_get(currentDate, "$currentDate", $$stores);
|
|
@@ -2340,6 +2318,7 @@ function Day$4($$anchor, $$props) {
|
|
|
2340
2318
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
2341
2319
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
2342
2320
|
const $_intlDayCell = () => $.store_get(_intlDayCell, "$_intlDayCell", $$stores);
|
|
2321
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2343
2322
|
let iChunks = $.prop($$props, "iChunks", 19, () => []);
|
|
2344
2323
|
let {
|
|
2345
2324
|
date: currentDate,
|
|
@@ -2417,9 +2396,8 @@ function Day$4($$anchor, $$props) {
|
|
|
2417
2396
|
}
|
|
2418
2397
|
});
|
|
2419
2398
|
function setPopupChunks() {
|
|
2420
|
-
var _a;
|
|
2421
2399
|
let nextDay = addDay(cloneDate($$props.date));
|
|
2422
|
-
let chunks = $.get(dayChunks).concat(
|
|
2400
|
+
let chunks = $.get(dayChunks).concat($$props.longChunks[$$props.date.getTime()]?.chunks || []);
|
|
2423
2401
|
$.store_set(_popupChunks, chunks.map((chunk) => assign({}, chunk, createEventChunk(chunk.event, $$props.date, nextDay), { days: 1, dates: [$$props.date] })).sort((a, b) => a.top - b.top));
|
|
2424
2402
|
}
|
|
2425
2403
|
let showWeekNumber = $.derived(() => $weekNumbers() && $$props.date.getUTCDay() == ($firstDay() ? 1 : 0));
|
|
@@ -2440,19 +2418,19 @@ function Day$4($$anchor, $$props) {
|
|
|
2440
2418
|
runReposition(refs, $.get(dayChunks));
|
|
2441
2419
|
}
|
|
2442
2420
|
}
|
|
2421
|
+
var $$exports = { reposition };
|
|
2443
2422
|
var div = root$m();
|
|
2444
2423
|
div.__pointerdown = function(...$$args) {
|
|
2445
|
-
|
|
2446
|
-
(_b = (_a = $_interaction().action) == null ? void 0 : _a.select) == null ? void 0 : _b.apply(this, $$args);
|
|
2424
|
+
$_interaction().action?.select?.apply(this, $$args);
|
|
2447
2425
|
};
|
|
2448
2426
|
var div_1 = $.child(div);
|
|
2449
2427
|
var time = $.child(div_1);
|
|
2450
|
-
$.action(time, ($$node, $$action_arg) => setContent
|
|
2428
|
+
$.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayCell().format($$props.date));
|
|
2451
2429
|
var node = $.sibling(time, 2);
|
|
2452
2430
|
{
|
|
2453
2431
|
var consequent = ($$anchor2) => {
|
|
2454
2432
|
var span = root_1$a();
|
|
2455
|
-
$.action(span, ($$node, $$action_arg) => setContent
|
|
2433
|
+
$.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(weekNumber));
|
|
2456
2434
|
$.template_effect(() => $.set_class(span, 1, $theme().weekNumber));
|
|
2457
2435
|
$.append($$anchor2, span);
|
|
2458
2436
|
};
|
|
@@ -2547,7 +2525,7 @@ function Day$4($$anchor, $$props) {
|
|
|
2547
2525
|
}
|
|
2548
2526
|
}),
|
|
2549
2527
|
($$value, i2) => refs[i2] = $$value,
|
|
2550
|
-
(i2) => refs
|
|
2528
|
+
(i2) => refs?.[i2],
|
|
2551
2529
|
() => [$.get(i)]
|
|
2552
2530
|
);
|
|
2553
2531
|
});
|
|
@@ -2574,20 +2552,17 @@ function Day$4($$anchor, $$props) {
|
|
|
2574
2552
|
var a_1 = root_10();
|
|
2575
2553
|
var event_handler = $.derived(() => stopPropagation(showMore));
|
|
2576
2554
|
a_1.__click = function(...$$args) {
|
|
2577
|
-
|
|
2578
|
-
(_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
|
|
2555
|
+
$.get(event_handler)?.apply(this, $$args);
|
|
2579
2556
|
};
|
|
2580
2557
|
var event_handler_1 = $.derived(() => keyEnter(showMore));
|
|
2581
2558
|
a_1.__keydown = function(...$$args) {
|
|
2582
|
-
|
|
2583
|
-
(_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
|
|
2559
|
+
$.get(event_handler_1)?.apply(this, $$args);
|
|
2584
2560
|
};
|
|
2585
2561
|
var event_handler_2 = $.derived(stopPropagation);
|
|
2586
2562
|
a_1.__pointerdown = function(...$$args) {
|
|
2587
|
-
|
|
2588
|
-
(_a = $.get(event_handler_2)) == null ? void 0 : _a.apply(this, $$args);
|
|
2563
|
+
$.get(event_handler_2)?.apply(this, $$args);
|
|
2589
2564
|
};
|
|
2590
|
-
$.action(a_1, ($$node, $$action_arg) => setContent
|
|
2565
|
+
$.action(a_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(moreLink));
|
|
2591
2566
|
$.append($$anchor2, a_1);
|
|
2592
2567
|
};
|
|
2593
2568
|
$.if(node_11, ($$render) => {
|
|
@@ -2607,15 +2582,12 @@ function Day$4($$anchor, $$props) {
|
|
|
2607
2582
|
$.set_class(div_6, 1, $theme().dayFoot);
|
|
2608
2583
|
},
|
|
2609
2584
|
[
|
|
2610
|
-
() =>
|
|
2611
|
-
var _a;
|
|
2612
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
|
|
2613
|
-
},
|
|
2585
|
+
() => $theme().weekdays?.[$$props.date.getUTCDay()],
|
|
2614
2586
|
() => toISOString($$props.date, 10)
|
|
2615
2587
|
]
|
|
2616
2588
|
);
|
|
2617
2589
|
$.append($$anchor, div);
|
|
2618
|
-
var $$pop = $.pop(
|
|
2590
|
+
var $$pop = $.pop($$exports);
|
|
2619
2591
|
$$cleanup();
|
|
2620
2592
|
return $$pop;
|
|
2621
2593
|
}
|
|
@@ -2623,7 +2595,6 @@ $.delegate(["pointerdown", "click", "keydown"]);
|
|
|
2623
2595
|
var root$l = $.from_html(`<div role="row"></div>`);
|
|
2624
2596
|
function Week$1($$anchor, $$props) {
|
|
2625
2597
|
$.push($$props, true);
|
|
2626
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2627
2598
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
2628
2599
|
const $_filteredEvents = () => $.store_get(_filteredEvents, "$_filteredEvents", $$stores);
|
|
2629
2600
|
const $filterEventsWithResources = () => $.store_get(filterEventsWithResources, "$filterEventsWithResources", $$stores);
|
|
@@ -2632,6 +2603,7 @@ function Week$1($$anchor, $$props) {
|
|
|
2632
2603
|
const $eventOrder = () => $.store_get(eventOrder, "$eventOrder", $$stores);
|
|
2633
2604
|
const $_iEvents = () => $.store_get(_iEvents, "$_iEvents", $$stores);
|
|
2634
2605
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
2606
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2635
2607
|
let {
|
|
2636
2608
|
_filteredEvents,
|
|
2637
2609
|
_iEvents,
|
|
@@ -2677,6 +2649,7 @@ function Week$1($$anchor, $$props) {
|
|
|
2677
2649
|
function reposition() {
|
|
2678
2650
|
runReposition(refs, $$props.dates);
|
|
2679
2651
|
}
|
|
2652
|
+
var $$exports = { reposition };
|
|
2680
2653
|
var div = root$l();
|
|
2681
2654
|
$.each(div, 21, () => $$props.dates, $.index, ($$anchor2, date, i) => {
|
|
2682
2655
|
$.bind_this(
|
|
@@ -2701,21 +2674,20 @@ function Week$1($$anchor, $$props) {
|
|
|
2701
2674
|
}
|
|
2702
2675
|
}),
|
|
2703
2676
|
($$value, i2) => refs[i2] = $$value,
|
|
2704
|
-
(i2) => refs
|
|
2677
|
+
(i2) => refs?.[i2],
|
|
2705
2678
|
() => [i]
|
|
2706
2679
|
);
|
|
2707
2680
|
});
|
|
2708
2681
|
$.reset(div);
|
|
2709
2682
|
$.template_effect(() => $.set_class(div, 1, $theme().days));
|
|
2710
2683
|
$.append($$anchor, div);
|
|
2711
|
-
var $$pop = $.pop(
|
|
2684
|
+
var $$pop = $.pop($$exports);
|
|
2712
2685
|
$$cleanup();
|
|
2713
2686
|
return $$pop;
|
|
2714
2687
|
}
|
|
2715
2688
|
var root$k = $.from_html(`<div><div></div></div>`);
|
|
2716
2689
|
function Body$3($$anchor, $$props) {
|
|
2717
2690
|
$.push($$props, true);
|
|
2718
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2719
2691
|
const $hiddenDays = () => $.store_get(hiddenDays, "$hiddenDays", $$stores);
|
|
2720
2692
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
2721
2693
|
const $dayMaxEvents = () => $.store_get(dayMaxEvents, "$dayMaxEvents", $$stores);
|
|
@@ -2723,6 +2695,7 @@ function Body$3($$anchor, $$props) {
|
|
|
2723
2695
|
const $_filteredEvents = () => $.store_get(_filteredEvents, "$_filteredEvents", $$stores);
|
|
2724
2696
|
const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
|
|
2725
2697
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
2698
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2726
2699
|
let {
|
|
2727
2700
|
_bodyEl,
|
|
2728
2701
|
_viewDates,
|
|
@@ -2771,14 +2744,14 @@ function Body$3($$anchor, $$props) {
|
|
|
2771
2744
|
}
|
|
2772
2745
|
}),
|
|
2773
2746
|
($$value, i2) => refs[i2] = $$value,
|
|
2774
|
-
(i2) => refs
|
|
2747
|
+
(i2) => refs?.[i2],
|
|
2775
2748
|
() => [i]
|
|
2776
2749
|
);
|
|
2777
2750
|
});
|
|
2778
2751
|
$.reset(div_1);
|
|
2779
2752
|
$.reset(div);
|
|
2780
2753
|
$.bind_this(div, ($$value) => $.store_set(_bodyEl, $$value), () => $_bodyEl());
|
|
2781
|
-
$.action(div, ($$node, $$action_arg) => observeResize
|
|
2754
|
+
$.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => () => $.store_set(_recheckScrollable, true));
|
|
2782
2755
|
$.template_effect(() => {
|
|
2783
2756
|
$.set_class(div, 1, `${$theme().body ?? ""}${$dayMaxEvents() === true ? " " + $theme().uniform : ""}`);
|
|
2784
2757
|
$.set_class(div_1, 1, $theme().content);
|
|
@@ -2852,7 +2825,6 @@ function limit(value, minLimit, maxLimit) {
|
|
|
2852
2825
|
}
|
|
2853
2826
|
function Action($$anchor, $$props) {
|
|
2854
2827
|
$.push($$props, false);
|
|
2855
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2856
2828
|
const $eventStartEditable = () => $.store_get(eventStartEditable, "$eventStartEditable", $$stores);
|
|
2857
2829
|
const $editable = () => $.store_get(editable, "$editable", $$stores);
|
|
2858
2830
|
const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
|
|
@@ -2888,6 +2860,7 @@ function Action($$anchor, $$props) {
|
|
|
2888
2860
|
const $_events = () => $.store_get(_events, "$_events", $$stores);
|
|
2889
2861
|
const $selectBackgroundColor = () => $.store_get(selectBackgroundColor, "$selectBackgroundColor", $$stores);
|
|
2890
2862
|
const $unselectFn = () => $.store_get(unselectFn, "$unselectFn", $$stores);
|
|
2863
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
2891
2864
|
let {
|
|
2892
2865
|
_iEvents,
|
|
2893
2866
|
_iClass,
|
|
@@ -3405,7 +3378,6 @@ function Action($$anchor, $$props) {
|
|
|
3405
3378
|
let target = jsEvent.target;
|
|
3406
3379
|
let stops = [];
|
|
3407
3380
|
let stop = () => runAll(stops);
|
|
3408
|
-
stops.push(listen(window, "touchmove", noop, { passive: false }));
|
|
3409
3381
|
stops.push(listen(target, "touchmove", createPreventDefaultHandler(() => interacting)));
|
|
3410
3382
|
stops.push(listen(target, "touchend", stop));
|
|
3411
3383
|
stops.push(listen(target, "touchcancel", stop));
|
|
@@ -3418,6 +3390,17 @@ function Action($$anchor, $$props) {
|
|
|
3418
3390
|
}
|
|
3419
3391
|
};
|
|
3420
3392
|
}
|
|
3393
|
+
onMount(() => listen(window, "touchmove", noop, { passive: false }));
|
|
3394
|
+
var $$exports = {
|
|
3395
|
+
draggable,
|
|
3396
|
+
drag,
|
|
3397
|
+
resize,
|
|
3398
|
+
select,
|
|
3399
|
+
noAction,
|
|
3400
|
+
handleScroll,
|
|
3401
|
+
unselect,
|
|
3402
|
+
noClick
|
|
3403
|
+
};
|
|
3421
3404
|
$.init();
|
|
3422
3405
|
$.event("pointermove", $.window, handlePointerMove);
|
|
3423
3406
|
$.event("pointerup", $.window, handlePointerUp);
|
|
@@ -3425,13 +3408,11 @@ function Action($$anchor, $$props) {
|
|
|
3425
3408
|
$.event("scroll", $.window, handleScroll);
|
|
3426
3409
|
var event_handler = $.derived(() => createPreventDefaultHandler(complexAction));
|
|
3427
3410
|
$.event("selectstart", $.window, function(...$$args) {
|
|
3428
|
-
|
|
3429
|
-
(_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
|
|
3411
|
+
$.get(event_handler)?.apply(this, $$args);
|
|
3430
3412
|
});
|
|
3431
3413
|
var event_handler_1 = $.derived(() => createPreventDefaultHandler(() => $.get(timer)));
|
|
3432
3414
|
$.event("contextmenu", $.window, function(...$$args) {
|
|
3433
|
-
|
|
3434
|
-
(_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
|
|
3415
|
+
$.get(event_handler_1)?.apply(this, $$args);
|
|
3435
3416
|
});
|
|
3436
3417
|
$.event("touchstart", $.window, handleTouchStart, void 0, true);
|
|
3437
3418
|
$.bind_prop($$props, "draggable", draggable);
|
|
@@ -3442,24 +3423,15 @@ function Action($$anchor, $$props) {
|
|
|
3442
3423
|
$.bind_prop($$props, "handleScroll", handleScroll);
|
|
3443
3424
|
$.bind_prop($$props, "unselect", unselect);
|
|
3444
3425
|
$.bind_prop($$props, "noClick", noClick);
|
|
3445
|
-
var $$pop = $.pop(
|
|
3446
|
-
draggable,
|
|
3447
|
-
drag,
|
|
3448
|
-
resize,
|
|
3449
|
-
select,
|
|
3450
|
-
noAction,
|
|
3451
|
-
handleScroll,
|
|
3452
|
-
unselect,
|
|
3453
|
-
noClick
|
|
3454
|
-
});
|
|
3426
|
+
var $$pop = $.pop($$exports);
|
|
3455
3427
|
$$cleanup();
|
|
3456
3428
|
return $$pop;
|
|
3457
3429
|
}
|
|
3458
3430
|
function Pointer($$anchor, $$props) {
|
|
3459
3431
|
$.push($$props, true);
|
|
3460
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3461
3432
|
const $_iEvents = () => $.store_get(_iEvents, "$_iEvents", $$stores);
|
|
3462
3433
|
const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
|
|
3434
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3463
3435
|
let { _iEvents, slotDuration } = getContext("state");
|
|
3464
3436
|
let x = 0, y = 0;
|
|
3465
3437
|
$.user_effect(() => {
|
|
@@ -3520,9 +3492,10 @@ function Pointer($$anchor, $$props) {
|
|
|
3520
3492
|
function validEvent(jsEvent) {
|
|
3521
3493
|
return jsEvent.isPrimary && jsEvent.pointerType === "mouse";
|
|
3522
3494
|
}
|
|
3495
|
+
var $$exports = { handleScroll };
|
|
3523
3496
|
$.event("pointermove", $.window, handlePointerMove);
|
|
3524
3497
|
$.event("scroll", $.window, handleScroll);
|
|
3525
|
-
var $$pop = $.pop(
|
|
3498
|
+
var $$pop = $.pop($$exports);
|
|
3526
3499
|
$$cleanup();
|
|
3527
3500
|
return $$pop;
|
|
3528
3501
|
}
|
|
@@ -3531,12 +3504,12 @@ var root_2$6 = $.from_html(`<div></div>`);
|
|
|
3531
3504
|
var root$i = $.from_html(`<!> <!> <!>`, 1);
|
|
3532
3505
|
function Resizer($$anchor, $$props) {
|
|
3533
3506
|
$.push($$props, true);
|
|
3534
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3535
3507
|
const $eventDurationEditable = () => $.store_get(eventDurationEditable, "$eventDurationEditable", $$stores);
|
|
3536
3508
|
const $editable = () => $.store_get(editable, "$editable", $$stores);
|
|
3537
3509
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
3538
3510
|
const $eventResizableFromStart = () => $.store_get(eventResizableFromStart, "$eventResizableFromStart", $$stores);
|
|
3539
3511
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
3512
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3540
3513
|
let forceDate = $.prop($$props, "forceDate", 3, void 0), forceMargin = $.prop($$props, "forceMargin", 3, void 0);
|
|
3541
3514
|
let {
|
|
3542
3515
|
theme,
|
|
@@ -3549,10 +3522,7 @@ function Resizer($$anchor, $$props) {
|
|
|
3549
3522
|
let display = $.derived(() => $$props.chunk.event.display);
|
|
3550
3523
|
let resizable = $.derived(() => !bgEvent($.get(display)) && !helperEvent($.get(display)) && eventResizable($.get(event), $eventDurationEditable(), $editable()));
|
|
3551
3524
|
function createResizeHandler(start) {
|
|
3552
|
-
return (jsEvent) =>
|
|
3553
|
-
var _a, _b;
|
|
3554
|
-
return $_interaction().action.resize($.get(event), jsEvent, start, $$props.axis, (_a = forceDate()) == null ? void 0 : _a(), (_b = forceMargin()) == null ? void 0 : _b(), $$props.chunk.zeroDuration);
|
|
3555
|
-
};
|
|
3525
|
+
return (jsEvent) => $_interaction().action.resize($.get(event), jsEvent, start, $$props.axis, forceDate()?.(), forceMargin()?.(), $$props.chunk.zeroDuration);
|
|
3556
3526
|
}
|
|
3557
3527
|
var fragment = root$i();
|
|
3558
3528
|
var node = $.first_child(fragment);
|
|
@@ -3561,8 +3531,7 @@ function Resizer($$anchor, $$props) {
|
|
|
3561
3531
|
var div = root_1$9();
|
|
3562
3532
|
var event_handler = $.derived(() => createResizeHandler(true));
|
|
3563
3533
|
div.__pointerdown = function(...$$args) {
|
|
3564
|
-
|
|
3565
|
-
(_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
|
|
3534
|
+
$.get(event_handler)?.apply(this, $$args);
|
|
3566
3535
|
};
|
|
3567
3536
|
$.template_effect(() => $.set_class(div, 1, `${$theme().resizer ?? ""} ${$theme().start ?? ""}`));
|
|
3568
3537
|
$.append($$anchor2, div);
|
|
@@ -3579,8 +3548,7 @@ function Resizer($$anchor, $$props) {
|
|
|
3579
3548
|
var div_1 = root_2$6();
|
|
3580
3549
|
var event_handler_1 = $.derived(() => createResizeHandler(false));
|
|
3581
3550
|
div_1.__pointerdown = function(...$$args) {
|
|
3582
|
-
|
|
3583
|
-
(_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
|
|
3551
|
+
$.get(event_handler_1)?.apply(this, $$args);
|
|
3584
3552
|
};
|
|
3585
3553
|
$.template_effect(() => $.set_class(div_1, 1, $theme().resizer));
|
|
3586
3554
|
$.append($$anchor2, div_1);
|
|
@@ -3597,13 +3565,13 @@ $.delegate(["pointerdown"]);
|
|
|
3597
3565
|
var root$h = $.from_html(`<!> <!>`, 1);
|
|
3598
3566
|
function Auxiliary($$anchor, $$props) {
|
|
3599
3567
|
$.push($$props, true);
|
|
3600
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3601
3568
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
3602
3569
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
3603
3570
|
const $eventStartEditable = () => $.store_get(eventStartEditable, "$eventStartEditable", $$stores);
|
|
3604
3571
|
const $editable = () => $.store_get(editable, "$editable", $$stores);
|
|
3605
3572
|
const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
|
|
3606
3573
|
const $pointer = () => $.store_get(pointer, "$pointer", $$stores);
|
|
3574
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3607
3575
|
let {
|
|
3608
3576
|
theme,
|
|
3609
3577
|
editable,
|
|
@@ -3632,24 +3600,17 @@ function Auxiliary($$anchor, $$props) {
|
|
|
3632
3600
|
}
|
|
3633
3601
|
});
|
|
3634
3602
|
function bodyScrollHandler() {
|
|
3635
|
-
var _a;
|
|
3636
3603
|
for (let component of Object.values($_interaction())) {
|
|
3637
|
-
|
|
3604
|
+
component?.handleScroll?.();
|
|
3638
3605
|
}
|
|
3639
3606
|
}
|
|
3640
3607
|
var fragment = root$h();
|
|
3641
3608
|
var node = $.first_child(fragment);
|
|
3642
|
-
$.bind_this(Action(node, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).action = $$value, $.untrack($_interaction)), () =>
|
|
3643
|
-
var _a;
|
|
3644
|
-
return (_a = $_interaction()) == null ? void 0 : _a.action;
|
|
3645
|
-
});
|
|
3609
|
+
$.bind_this(Action(node, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).action = $$value, $.untrack($_interaction)), () => $_interaction()?.action);
|
|
3646
3610
|
var node_1 = $.sibling(node, 2);
|
|
3647
3611
|
{
|
|
3648
3612
|
var consequent = ($$anchor2) => {
|
|
3649
|
-
$.bind_this(Pointer($$anchor2, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).pointer = $$value, $.untrack($_interaction)), () =>
|
|
3650
|
-
var _a;
|
|
3651
|
-
return (_a = $_interaction()) == null ? void 0 : _a.pointer;
|
|
3652
|
-
});
|
|
3613
|
+
$.bind_this(Pointer($$anchor2, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).pointer = $$value, $.untrack($_interaction)), () => $_interaction()?.pointer);
|
|
3653
3614
|
};
|
|
3654
3615
|
$.if(node_1, ($$render) => {
|
|
3655
3616
|
if ($pointer()) $$render(consequent);
|
|
@@ -3705,9 +3666,9 @@ const index$3 = {
|
|
|
3705
3666
|
var root_1$8 = $.from_html(`<div></div> <!>`, 1);
|
|
3706
3667
|
function Event$3($$anchor, $$props) {
|
|
3707
3668
|
$.push($$props, true);
|
|
3708
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3709
3669
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
3710
3670
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
3671
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3711
3672
|
let { theme, _interaction } = getContext("state");
|
|
3712
3673
|
let styles = $.derived(() => (style) => {
|
|
3713
3674
|
delete style["background-color"];
|
|
@@ -3730,10 +3691,7 @@ function Event$3($$anchor, $$props) {
|
|
|
3730
3691
|
);
|
|
3731
3692
|
$.append($$anchor2, fragment_1);
|
|
3732
3693
|
};
|
|
3733
|
-
let $0 = $.derived(() =>
|
|
3734
|
-
var _a;
|
|
3735
|
-
return (_a = $_interaction().action) == null ? void 0 : _a.noAction;
|
|
3736
|
-
});
|
|
3694
|
+
let $0 = $.derived(() => $_interaction().action?.noAction);
|
|
3737
3695
|
BaseEvent($$anchor, {
|
|
3738
3696
|
get chunk() {
|
|
3739
3697
|
return $$props.chunk;
|
|
@@ -3754,7 +3712,6 @@ function Event$3($$anchor, $$props) {
|
|
|
3754
3712
|
var root_1$7 = $.from_html(`<div role="listitem"><h4><time></time> <time></time></h4> <!></div>`);
|
|
3755
3713
|
function Day$3($$anchor, $$props) {
|
|
3756
3714
|
$.push($$props, true);
|
|
3757
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3758
3715
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
3759
3716
|
const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
|
|
3760
3717
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
@@ -3766,6 +3723,7 @@ function Day$3($$anchor, $$props) {
|
|
|
3766
3723
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
3767
3724
|
const $_intlListDay = () => $.store_get(_intlListDay, "$_intlListDay", $$stores);
|
|
3768
3725
|
const $_intlListDaySide = () => $.store_get(_intlListDaySide, "$_intlListDaySide", $$stores);
|
|
3726
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3769
3727
|
let {
|
|
3770
3728
|
_filteredEvents,
|
|
3771
3729
|
_interaction,
|
|
@@ -3816,14 +3774,13 @@ function Day$3($$anchor, $$props) {
|
|
|
3816
3774
|
var consequent = ($$anchor2) => {
|
|
3817
3775
|
var div = root_1$7();
|
|
3818
3776
|
div.__pointerdown = function(...$$args) {
|
|
3819
|
-
|
|
3820
|
-
(_b = (_a = $_interaction().action) == null ? void 0 : _a.select) == null ? void 0 : _b.apply(this, $$args);
|
|
3777
|
+
$_interaction().action?.select?.apply(this, $$args);
|
|
3821
3778
|
};
|
|
3822
3779
|
var h4 = $.child(div);
|
|
3823
3780
|
var time = $.child(h4);
|
|
3824
|
-
$.action(time, ($$node, $$action_arg) => setContent
|
|
3781
|
+
$.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlListDay().format($$props.date));
|
|
3825
3782
|
var time_1 = $.sibling(time, 2);
|
|
3826
|
-
$.action(time_1, ($$node, $$action_arg) => setContent
|
|
3783
|
+
$.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlListDaySide().format($$props.date));
|
|
3827
3784
|
$.reset(h4);
|
|
3828
3785
|
var node_1 = $.sibling(h4, 2);
|
|
3829
3786
|
$.each(node_1, 17, () => $.get(chunks), (chunk) => chunk.event, ($$anchor3, chunk) => {
|
|
@@ -3843,10 +3800,7 @@ function Day$3($$anchor, $$props) {
|
|
|
3843
3800
|
$.set_class(time_1, 1, $theme().daySide);
|
|
3844
3801
|
$.set_attribute(time_1, "datetime", $.get(datetime));
|
|
3845
3802
|
},
|
|
3846
|
-
[() =>
|
|
3847
|
-
var _a;
|
|
3848
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
|
|
3849
|
-
}]
|
|
3803
|
+
[() => $theme().weekdays?.[$$props.date.getUTCDay()]]
|
|
3850
3804
|
);
|
|
3851
3805
|
$.append($$anchor2, div);
|
|
3852
3806
|
};
|
|
@@ -3868,7 +3822,6 @@ var root_1$6 = $.from_html(`<div></div>`);
|
|
|
3868
3822
|
var root$g = $.from_html(`<div><div><!></div></div>`);
|
|
3869
3823
|
function Body$2($$anchor, $$props) {
|
|
3870
3824
|
$.push($$props, true);
|
|
3871
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3872
3825
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
3873
3826
|
const $_filteredEvents = () => $.store_get(_filteredEvents, "$_filteredEvents", $$stores);
|
|
3874
3827
|
const $noEventsContent = () => $.store_get(noEventsContent, "$noEventsContent", $$stores);
|
|
@@ -3876,6 +3829,7 @@ function Body$2($$anchor, $$props) {
|
|
|
3876
3829
|
const $_view = () => $.store_get(_view, "$_view", $$stores);
|
|
3877
3830
|
const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
|
|
3878
3831
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
3832
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
3879
3833
|
let {
|
|
3880
3834
|
_bodyEl,
|
|
3881
3835
|
_filteredEvents,
|
|
@@ -3907,7 +3861,7 @@ function Body$2($$anchor, $$props) {
|
|
|
3907
3861
|
var consequent = ($$anchor2) => {
|
|
3908
3862
|
var div_2 = root_1$6();
|
|
3909
3863
|
div_2.__click = [onclick$1, $noEventsClick, noEventsClick, $_view, _view];
|
|
3910
|
-
$.action(div_2, ($$node, $$action_arg) => setContent
|
|
3864
|
+
$.action(div_2, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
|
|
3911
3865
|
$.template_effect(() => $.set_class(div_2, 1, $theme().noEvents));
|
|
3912
3866
|
$.append($$anchor2, div_2);
|
|
3913
3867
|
};
|
|
@@ -4052,22 +4006,22 @@ var root_1$5 = $.from_html(`<time></time>`);
|
|
|
4052
4006
|
var root$f = $.from_html(`<div><div></div> <!></div> <div role="row"><div><!></div> <!></div>`, 1);
|
|
4053
4007
|
function Section($$anchor, $$props) {
|
|
4054
4008
|
$.push($$props, true);
|
|
4055
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4056
4009
|
const $allDayContent = () => $.store_get(allDayContent, "$allDayContent", $$stores);
|
|
4057
4010
|
const $slotLabelInterval = () => $.store_get(slotLabelInterval, "$slotLabelInterval", $$stores);
|
|
4058
4011
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
4059
4012
|
const $_times = () => $.store_get(_times, "$_times", $$stores);
|
|
4013
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4060
4014
|
let { allDayContent, slotLabelInterval, theme, _times } = getContext("state");
|
|
4061
4015
|
let allDayText = $.derived(() => createAllDayContent($allDayContent()));
|
|
4062
4016
|
let showAllTimes = $.derived(() => $slotLabelInterval() && $slotLabelInterval().seconds <= 0);
|
|
4063
4017
|
var fragment = root$f();
|
|
4064
4018
|
var div = $.first_child(fragment);
|
|
4065
4019
|
var div_1 = $.child(div);
|
|
4066
|
-
$.action(div_1, ($$node, $$action_arg) => setContent
|
|
4020
|
+
$.action(div_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(allDayText));
|
|
4067
4021
|
var node = $.sibling(div_1, 2);
|
|
4068
4022
|
$.each(node, 1, $_times, $.index, ($$anchor2, time, i) => {
|
|
4069
4023
|
var time_1 = root_1$5();
|
|
4070
|
-
$.action(time_1, ($$node, $$action_arg) => setContent
|
|
4024
|
+
$.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(time)[1]);
|
|
4071
4025
|
$.template_effect(() => {
|
|
4072
4026
|
$.set_class(time_1, 1, `${$theme().time ?? ""}${(i || $.get(showAllTimes)) && $.get(time)[2] ? "" : " " + $theme().minor}`);
|
|
4073
4027
|
$.set_attribute(time_1, "datetime", $.get(time)[0]);
|
|
@@ -4117,7 +4071,6 @@ var root_2$5 = $.from_html(`<div></div>`);
|
|
|
4117
4071
|
var root$e = $.from_html(`<div><div><!></div></div>`);
|
|
4118
4072
|
function Body$1($$anchor, $$props) {
|
|
4119
4073
|
$.push($$props, true);
|
|
4120
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4121
4074
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
4122
4075
|
const $scrollTime = () => $.store_get(scrollTime, "$scrollTime", $$stores);
|
|
4123
4076
|
const $_slotTimeLimits = () => $.store_get(_slotTimeLimits, "$_slotTimeLimits", $$stores);
|
|
@@ -4125,6 +4078,7 @@ function Body$1($$anchor, $$props) {
|
|
|
4125
4078
|
const $slotHeight = () => $.store_get(slotHeight, "$slotHeight", $$stores);
|
|
4126
4079
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
4127
4080
|
const $_times = () => $.store_get(_times, "$_times", $$stores);
|
|
4081
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4128
4082
|
let {
|
|
4129
4083
|
_bodyEl,
|
|
4130
4084
|
_viewDates,
|
|
@@ -4173,7 +4127,7 @@ function Body$1($$anchor, $$props) {
|
|
|
4173
4127
|
$.reset(div_1);
|
|
4174
4128
|
$.reset(div);
|
|
4175
4129
|
$.bind_this(div, ($$value) => $.set(el, $$value), () => $.get(el));
|
|
4176
|
-
$.action(div, ($$node, $$action_arg) => observeResize
|
|
4130
|
+
$.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => () => $.store_set(_recheckScrollable, true));
|
|
4177
4131
|
$.template_effect(() => {
|
|
4178
4132
|
$.set_class(div, 1, $theme().body);
|
|
4179
4133
|
$.set_class(div_1, 1, $theme().content);
|
|
@@ -4184,11 +4138,11 @@ function Body$1($$anchor, $$props) {
|
|
|
4184
4138
|
}
|
|
4185
4139
|
function Event$2($$anchor, $$props) {
|
|
4186
4140
|
$.push($$props, true);
|
|
4187
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4188
4141
|
const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
|
|
4189
4142
|
const $_slotTimeLimits = () => $.store_get(_slotTimeLimits, "$_slotTimeLimits", $$stores);
|
|
4190
4143
|
const $slotHeight = () => $.store_get(slotHeight, "$slotHeight", $$stores);
|
|
4191
4144
|
const $slotEventOverlap = () => $.store_get(slotEventOverlap, "$slotEventOverlap", $$stores);
|
|
4145
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4192
4146
|
let { slotEventOverlap, slotDuration, slotHeight, _slotTimeLimits } = getContext("state");
|
|
4193
4147
|
let display = $.derived(() => $$props.chunk.event.display);
|
|
4194
4148
|
let styles = $.derived(() => (style) => {
|
|
@@ -4225,13 +4179,13 @@ function Event$2($$anchor, $$props) {
|
|
|
4225
4179
|
var root$d = $.from_html(`<div></div>`);
|
|
4226
4180
|
function NowIndicator$1($$anchor, $$props) {
|
|
4227
4181
|
$.push($$props, true);
|
|
4228
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4229
4182
|
const $_now = () => $.store_get(_now, "$_now", $$stores);
|
|
4230
4183
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
4231
4184
|
const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
|
|
4232
4185
|
const $_slotTimeLimits = () => $.store_get(_slotTimeLimits, "$_slotTimeLimits", $$stores);
|
|
4233
4186
|
const $slotHeight = () => $.store_get(slotHeight, "$slotHeight", $$stores);
|
|
4234
4187
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
4188
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4235
4189
|
let {
|
|
4236
4190
|
slotDuration,
|
|
4237
4191
|
slotHeight,
|
|
@@ -4259,7 +4213,6 @@ var root_3$4 = $.from_html(`<!> <!> <!>`, 1);
|
|
|
4259
4213
|
var root$c = $.from_html(`<div role="cell"><div><!></div> <div><!></div> <div><!></div></div>`);
|
|
4260
4214
|
function Day$2($$anchor, $$props) {
|
|
4261
4215
|
$.push($$props, true);
|
|
4262
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4263
4216
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
4264
4217
|
const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
|
|
4265
4218
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
@@ -4274,6 +4227,7 @@ function Day$2($$anchor, $$props) {
|
|
|
4274
4227
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
4275
4228
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
4276
4229
|
const $nowIndicator = () => $.store_get(nowIndicator, "$nowIndicator", $$stores);
|
|
4230
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4277
4231
|
let resource = $.prop($$props, "resource", 3, void 0);
|
|
4278
4232
|
let {
|
|
4279
4233
|
_filteredEvents,
|
|
@@ -4340,8 +4294,7 @@ function Day$2($$anchor, $$props) {
|
|
|
4340
4294
|
});
|
|
4341
4295
|
var div = root$c();
|
|
4342
4296
|
div.__pointerdown = function(...$$args) {
|
|
4343
|
-
|
|
4344
|
-
(_b = !$.get(disabled) ? (_a = $_interaction().action) == null ? void 0 : _a.select : void 0) == null ? void 0 : _b.apply(this, $$args);
|
|
4297
|
+
(!$.get(disabled) ? $_interaction().action?.select : void 0)?.apply(this, $$args);
|
|
4345
4298
|
};
|
|
4346
4299
|
var div_1 = $.child(div);
|
|
4347
4300
|
var node = $.child(div_1);
|
|
@@ -4441,10 +4394,7 @@ function Day$2($$anchor, $$props) {
|
|
|
4441
4394
|
$.set_class(div_2, 1, $theme().events);
|
|
4442
4395
|
$.set_class(div_3, 1, $theme().extra);
|
|
4443
4396
|
},
|
|
4444
|
-
[() =>
|
|
4445
|
-
var _a;
|
|
4446
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
|
|
4447
|
-
}]
|
|
4397
|
+
[() => $theme().weekdays?.[$$props.date.getUTCDay()]]
|
|
4448
4398
|
);
|
|
4449
4399
|
$.append($$anchor, div);
|
|
4450
4400
|
$.pop();
|
|
@@ -4473,6 +4423,7 @@ function Event$1($$anchor, $$props) {
|
|
|
4473
4423
|
}
|
|
4474
4424
|
$.set(margin, repositionEvent$1($$props.chunk, longChunks(), height($.get(el))), true);
|
|
4475
4425
|
}
|
|
4426
|
+
var $$exports = { reposition };
|
|
4476
4427
|
InteractableEvent($$anchor, {
|
|
4477
4428
|
get chunk() {
|
|
4478
4429
|
return $$props.chunk;
|
|
@@ -4489,18 +4440,18 @@ function Event$1($$anchor, $$props) {
|
|
|
4489
4440
|
$.set(el, $$value, true);
|
|
4490
4441
|
}
|
|
4491
4442
|
});
|
|
4492
|
-
return $.pop(
|
|
4443
|
+
return $.pop($$exports);
|
|
4493
4444
|
}
|
|
4494
4445
|
var root_3$3 = $.from_html(`<div><!></div>`);
|
|
4495
4446
|
var root$b = $.from_html(`<div role="cell"><div><!></div> <!> <div><!></div></div>`);
|
|
4496
4447
|
function Day$1($$anchor, $$props) {
|
|
4497
4448
|
$.push($$props, true);
|
|
4498
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4499
4449
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
4500
4450
|
const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
|
|
4501
4451
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
4502
4452
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
4503
4453
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
4454
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4504
4455
|
let iChunks = $.prop($$props, "iChunks", 19, () => []), resource = $.prop($$props, "resource", 3, void 0);
|
|
4505
4456
|
let { highlightedDates, theme, validRange, _interaction, _today } = getContext("state");
|
|
4506
4457
|
let el = $.state(void 0);
|
|
@@ -4524,10 +4475,10 @@ function Day$1($$anchor, $$props) {
|
|
|
4524
4475
|
runReposition(refs, $.get(dayChunks));
|
|
4525
4476
|
}
|
|
4526
4477
|
}
|
|
4478
|
+
var $$exports = { reposition };
|
|
4527
4479
|
var div = root$b();
|
|
4528
4480
|
div.__pointerdown = function(...$$args) {
|
|
4529
|
-
|
|
4530
|
-
(_b = !$.get(disabled) ? (_a = $_interaction().action) == null ? void 0 : _a.select : void 0) == null ? void 0 : _b.apply(this, $$args);
|
|
4481
|
+
(!$.get(disabled) ? $_interaction().action?.select : void 0)?.apply(this, $$args);
|
|
4531
4482
|
};
|
|
4532
4483
|
var div_1 = $.child(div);
|
|
4533
4484
|
var node = $.child(div_1);
|
|
@@ -4584,7 +4535,7 @@ function Day$1($$anchor, $$props) {
|
|
|
4584
4535
|
}
|
|
4585
4536
|
}),
|
|
4586
4537
|
($$value, i2) => refs[i2] = $$value,
|
|
4587
|
-
(i2) => refs
|
|
4538
|
+
(i2) => refs?.[i2],
|
|
4588
4539
|
() => [$.get(i)]
|
|
4589
4540
|
);
|
|
4590
4541
|
});
|
|
@@ -4603,20 +4554,16 @@ function Day$1($$anchor, $$props) {
|
|
|
4603
4554
|
$.set_class(div_1, 1, $theme().bgEvents);
|
|
4604
4555
|
$.set_class(div_3, 1, $theme().events);
|
|
4605
4556
|
},
|
|
4606
|
-
[() =>
|
|
4607
|
-
var _a;
|
|
4608
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
|
|
4609
|
-
}]
|
|
4557
|
+
[() => $theme().weekdays?.[$$props.date.getUTCDay()]]
|
|
4610
4558
|
);
|
|
4611
4559
|
$.append($$anchor, div);
|
|
4612
|
-
var $$pop = $.pop(
|
|
4560
|
+
var $$pop = $.pop($$exports);
|
|
4613
4561
|
$$cleanup();
|
|
4614
4562
|
return $$pop;
|
|
4615
4563
|
}
|
|
4616
4564
|
$.delegate(["pointerdown"]);
|
|
4617
4565
|
function Week($$anchor, $$props) {
|
|
4618
4566
|
$.push($$props, true);
|
|
4619
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4620
4567
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
4621
4568
|
const $filterEventsWithResources = () => $.store_get(filterEventsWithResources, "$filterEventsWithResources", $$stores);
|
|
4622
4569
|
const $resources = () => $.store_get(resources, "$resources", $$stores);
|
|
@@ -4624,6 +4571,7 @@ function Week($$anchor, $$props) {
|
|
|
4624
4571
|
const $hiddenDays = () => $.store_get(hiddenDays, "$hiddenDays", $$stores);
|
|
4625
4572
|
const $eventOrder = () => $.store_get(eventOrder, "$eventOrder", $$stores);
|
|
4626
4573
|
const $_iEvents = () => $.store_get(_iEvents, "$_iEvents", $$stores);
|
|
4574
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4627
4575
|
let resource = $.prop($$props, "resource", 3, void 0);
|
|
4628
4576
|
let {
|
|
4629
4577
|
_filteredEvents,
|
|
@@ -4698,7 +4646,7 @@ function Week($$anchor, $$props) {
|
|
|
4698
4646
|
}
|
|
4699
4647
|
}),
|
|
4700
4648
|
($$value, i2) => refs[i2] = $$value,
|
|
4701
|
-
(i2) => refs
|
|
4649
|
+
(i2) => refs?.[i2],
|
|
4702
4650
|
() => [i]
|
|
4703
4651
|
);
|
|
4704
4652
|
});
|
|
@@ -4711,13 +4659,13 @@ var root_3$2 = $.from_html(`<div><div><!> <div></div></div></div>`);
|
|
|
4711
4659
|
var root$a = $.from_html(`<div><!> <div></div></div> <!> <!>`, 1);
|
|
4712
4660
|
function View$2($$anchor, $$props) {
|
|
4713
4661
|
$.push($$props, false);
|
|
4714
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4715
4662
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
4716
4663
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
4717
4664
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
4718
4665
|
const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
|
|
4719
4666
|
const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
|
|
4720
4667
|
const $allDaySlot = () => $.store_get(allDaySlot, "$allDaySlot", $$stores);
|
|
4668
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4721
4669
|
let {
|
|
4722
4670
|
_viewDates,
|
|
4723
4671
|
_intlDayHeader,
|
|
@@ -4737,7 +4685,7 @@ function View$2($$anchor, $$props) {
|
|
|
4737
4685
|
$.each(node_1, 1, $_viewDates, $.index, ($$anchor3, date) => {
|
|
4738
4686
|
var div_1 = root_2$4();
|
|
4739
4687
|
var time = $.child(div_1);
|
|
4740
|
-
$.action(time, ($$node, $$action_arg) => setContent
|
|
4688
|
+
$.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
|
|
4741
4689
|
$.reset(div_1);
|
|
4742
4690
|
$.template_effect(
|
|
4743
4691
|
($0, $1, $2, $3) => {
|
|
@@ -4746,10 +4694,7 @@ function View$2($$anchor, $$props) {
|
|
|
4746
4694
|
$.set_attribute(time, "aria-label", $3);
|
|
4747
4695
|
},
|
|
4748
4696
|
[
|
|
4749
|
-
() =>
|
|
4750
|
-
var _a;
|
|
4751
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(date).getUTCDay()];
|
|
4752
|
-
},
|
|
4697
|
+
() => $theme().weekdays?.[$.get(date).getUTCDay()],
|
|
4753
4698
|
() => datesEqual($.get(date), $_today()) ? " " + $theme().today : "",
|
|
4754
4699
|
() => toISOString($.get(date), 10),
|
|
4755
4700
|
() => $_intlDayHeaderAL().format($.get(date))
|
|
@@ -4845,10 +4790,10 @@ const TimeGrid = {
|
|
|
4845
4790
|
var root$9 = $.from_html(`<span></span>`);
|
|
4846
4791
|
function Label$1($$anchor, $$props) {
|
|
4847
4792
|
$.push($$props, true);
|
|
4848
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4849
4793
|
const $resourceLabelContent = () => $.store_get(resourceLabelContent, "$resourceLabelContent", $$stores);
|
|
4850
4794
|
const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
|
|
4851
4795
|
const $resourceLabelDidMount = () => $.store_get(resourceLabelDidMount, "$resourceLabelDidMount", $$stores);
|
|
4796
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4852
4797
|
let date = $.prop($$props, "date", 3, void 0), setLabel = $.prop($$props, "setLabel", 3, void 0);
|
|
4853
4798
|
let {
|
|
4854
4799
|
resourceLabelContent,
|
|
@@ -4889,7 +4834,7 @@ function Label$1($$anchor, $$props) {
|
|
|
4889
4834
|
});
|
|
4890
4835
|
var span = root$9();
|
|
4891
4836
|
$.bind_this(span, ($$value) => $.set(el, $$value), () => $.get(el));
|
|
4892
|
-
$.action(span, ($$node, $$action_arg) => setContent
|
|
4837
|
+
$.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
|
|
4893
4838
|
$.template_effect(() => $.set_attribute(span, "aria-label", $.get(ariaLabel)));
|
|
4894
4839
|
$.append($$anchor, span);
|
|
4895
4840
|
$.pop();
|
|
@@ -4908,7 +4853,6 @@ var root_17 = $.from_html(`<div></div>`);
|
|
|
4908
4853
|
var root$8 = $.from_html(`<div><!> <div></div></div> <!> <!>`, 1);
|
|
4909
4854
|
function View$1($$anchor, $$props) {
|
|
4910
4855
|
$.push($$props, true);
|
|
4911
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4912
4856
|
const $datesAboveResources = () => $.store_get(datesAboveResources, "$datesAboveResources", $$stores);
|
|
4913
4857
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
4914
4858
|
const $_viewResources = () => $.store_get(_viewResources, "$_viewResources", $$stores);
|
|
@@ -4917,6 +4861,7 @@ function View$1($$anchor, $$props) {
|
|
|
4917
4861
|
const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
|
|
4918
4862
|
const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
|
|
4919
4863
|
const $allDaySlot = () => $.store_get(allDaySlot, "$allDaySlot", $$stores);
|
|
4864
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
4920
4865
|
let {
|
|
4921
4866
|
datesAboveResources,
|
|
4922
4867
|
_today,
|
|
@@ -4943,7 +4888,7 @@ function View$1($$anchor, $$props) {
|
|
|
4943
4888
|
var consequent = ($$anchor4) => {
|
|
4944
4889
|
var div_2 = root_3$1();
|
|
4945
4890
|
var time = $.child(div_2);
|
|
4946
|
-
$.action(time, ($$node, $$action_arg) => setContent
|
|
4891
|
+
$.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(item0)));
|
|
4947
4892
|
$.reset(div_2);
|
|
4948
4893
|
$.template_effect(
|
|
4949
4894
|
($0, $1, $2, $3) => {
|
|
@@ -4952,10 +4897,7 @@ function View$1($$anchor, $$props) {
|
|
|
4952
4897
|
$.set_attribute(time, "aria-label", $3);
|
|
4953
4898
|
},
|
|
4954
4899
|
[
|
|
4955
|
-
() =>
|
|
4956
|
-
var _a;
|
|
4957
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(item0).getUTCDay()];
|
|
4958
|
-
},
|
|
4900
|
+
() => $theme().weekdays?.[$.get(item0).getUTCDay()],
|
|
4959
4901
|
() => datesEqual($.get(item0), $_today()) ? " " + $theme().today : "",
|
|
4960
4902
|
() => toISOString($.get(item0), 10),
|
|
4961
4903
|
() => $_intlDayHeaderAL().format($.get(item0))
|
|
@@ -5007,7 +4949,7 @@ function View$1($$anchor, $$props) {
|
|
|
5007
4949
|
var alternate_1 = ($$anchor6) => {
|
|
5008
4950
|
var div_6 = root_8();
|
|
5009
4951
|
var time_1 = $.child(div_6);
|
|
5010
|
-
$.action(time_1, ($$node, $$action_arg) => setContent
|
|
4952
|
+
$.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(item1)));
|
|
5011
4953
|
$.reset(div_6);
|
|
5012
4954
|
$.template_effect(
|
|
5013
4955
|
($0, $1, $2, $3) => {
|
|
@@ -5016,10 +4958,7 @@ function View$1($$anchor, $$props) {
|
|
|
5016
4958
|
$.set_attribute(time_1, "aria-label", `${resourceLabels[i] ?? ""}${$3 ?? ""}`);
|
|
5017
4959
|
},
|
|
5018
4960
|
[
|
|
5019
|
-
() =>
|
|
5020
|
-
var _a;
|
|
5021
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(item1).getUTCDay()];
|
|
5022
|
-
},
|
|
4961
|
+
() => $theme().weekdays?.[$.get(item1).getUTCDay()],
|
|
5023
4962
|
() => datesEqual($.get(item1), $_today()) ? " " + $theme().today : "",
|
|
5024
4963
|
() => toISOString($.get(item1), 10),
|
|
5025
4964
|
() => $_intlDayHeaderAL().format($.get(item1))
|
|
@@ -5232,10 +5171,10 @@ function nestedResources(state) {
|
|
|
5232
5171
|
var root$7 = $.from_html(`<span></span>`);
|
|
5233
5172
|
function Label($$anchor, $$props) {
|
|
5234
5173
|
$.push($$props, true);
|
|
5235
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5236
5174
|
const $resourceLabelContent = () => $.store_get(resourceLabelContent, "$resourceLabelContent", $$stores);
|
|
5237
5175
|
const $_resHs = () => $.store_get(_resHs, "$_resHs", $$stores);
|
|
5238
5176
|
const $resourceLabelDidMount = () => $.store_get(resourceLabelDidMount, "$resourceLabelDidMount", $$stores);
|
|
5177
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5239
5178
|
let date = $.prop($$props, "date", 3, void 0);
|
|
5240
5179
|
let { resourceLabelContent, resourceLabelDidMount, _resHs } = getContext("state");
|
|
5241
5180
|
let el = $.state(void 0);
|
|
@@ -5267,7 +5206,7 @@ function Label($$anchor, $$props) {
|
|
|
5267
5206
|
});
|
|
5268
5207
|
var span = root$7();
|
|
5269
5208
|
$.bind_this(span, ($$value) => $.set(el, $$value), () => $.get(el));
|
|
5270
|
-
$.action(span, ($$node, $$action_arg) => setContent
|
|
5209
|
+
$.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
|
|
5271
5210
|
$.append($$anchor, span);
|
|
5272
5211
|
$.pop();
|
|
5273
5212
|
$$cleanup();
|
|
@@ -5283,8 +5222,8 @@ var root_2$2 = $.from_html(`<button><!></button>`);
|
|
|
5283
5222
|
var root$6 = $.from_html(`<!> <span><!></span>`, 1);
|
|
5284
5223
|
function Expander($$anchor, $$props) {
|
|
5285
5224
|
$.push($$props, true);
|
|
5286
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5287
5225
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
5226
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5288
5227
|
let { resources, theme } = getContext("state");
|
|
5289
5228
|
let payload = $.state({});
|
|
5290
5229
|
let expanded = $.state(true);
|
|
@@ -5334,8 +5273,7 @@ function Expander($$anchor, $$props) {
|
|
|
5334
5273
|
$.append($$anchor2, button);
|
|
5335
5274
|
};
|
|
5336
5275
|
$.if(node_1, ($$render) => {
|
|
5337
|
-
|
|
5338
|
-
if ((_a = $.get(payload).children) == null ? void 0 : _a.length) $$render(consequent_1);
|
|
5276
|
+
if ($.get(payload).children?.length) $$render(consequent_1);
|
|
5339
5277
|
});
|
|
5340
5278
|
}
|
|
5341
5279
|
$.reset(span_1);
|
|
@@ -5349,7 +5287,6 @@ var root_1$3 = $.from_html(`<div role="rowheader"><!> <!></div>`);
|
|
|
5349
5287
|
var root$5 = $.from_html(`<div><div></div> <div></div></div>`);
|
|
5350
5288
|
function Sidebar($$anchor, $$props) {
|
|
5351
5289
|
$.push($$props, true);
|
|
5352
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5353
5290
|
const $_viewResources = () => $.store_get(_viewResources, "$_viewResources", $$stores);
|
|
5354
5291
|
const $_resHs = () => $.store_get(_resHs, "$_resHs", $$stores);
|
|
5355
5292
|
const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
|
|
@@ -5358,6 +5295,7 @@ function Sidebar($$anchor, $$props) {
|
|
|
5358
5295
|
const $_sidebarEl = () => $.store_get(_sidebarEl, "$_sidebarEl", $$stores);
|
|
5359
5296
|
const $_daysHs = () => $.store_get(_daysHs, "$_daysHs", $$stores);
|
|
5360
5297
|
const $_nestedResources = () => $.store_get(_nestedResources, "$_nestedResources", $$stores);
|
|
5298
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5361
5299
|
let {
|
|
5362
5300
|
_viewResources,
|
|
5363
5301
|
_headerHeight,
|
|
@@ -5434,7 +5372,6 @@ var root_1$2 = $.from_html(`<div><!></div>`);
|
|
|
5434
5372
|
var root$4 = $.from_html(`<div><div role="row"></div> <div></div></div>`);
|
|
5435
5373
|
function Header($$anchor, $$props) {
|
|
5436
5374
|
$.push($$props, false);
|
|
5437
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5438
5375
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
5439
5376
|
const $_headerEl = () => $.store_get(_headerEl, "$_headerEl", $$stores);
|
|
5440
5377
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
@@ -5443,6 +5380,7 @@ function Header($$anchor, $$props) {
|
|
|
5443
5380
|
const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
|
|
5444
5381
|
const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
|
|
5445
5382
|
const $_dayTimes = () => $.store_get(_dayTimes, "$_dayTimes", $$stores);
|
|
5383
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5446
5384
|
let {
|
|
5447
5385
|
_headerEl,
|
|
5448
5386
|
_headerHeight,
|
|
@@ -5465,13 +5403,13 @@ function Header($$anchor, $$props) {
|
|
|
5465
5403
|
var fragment = root_2$1();
|
|
5466
5404
|
var div_3 = $.first_child(fragment);
|
|
5467
5405
|
var time_1 = $.child(div_3);
|
|
5468
|
-
$.action(time_1, ($$node, $$action_arg) => setContent
|
|
5406
|
+
$.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
|
|
5469
5407
|
$.reset(div_3);
|
|
5470
5408
|
var div_4 = $.sibling(div_3, 2);
|
|
5471
5409
|
$.each(div_4, 5, () => $_dayTimes()[$.get(date).getTime()], $.index, ($$anchor4, time) => {
|
|
5472
5410
|
var div_5 = root_3();
|
|
5473
5411
|
var time_2 = $.child(div_5);
|
|
5474
|
-
$.action(time_2, ($$node, $$action_arg) => setContent
|
|
5412
|
+
$.action(time_2, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(time)[1]);
|
|
5475
5413
|
$.reset(div_5);
|
|
5476
5414
|
$.template_effect(() => {
|
|
5477
5415
|
$.set_class(div_5, 1, `${$theme().time ?? ""}${$.get(time)[2] ? "" : " " + $theme().minor}`);
|
|
@@ -5497,7 +5435,7 @@ function Header($$anchor, $$props) {
|
|
|
5497
5435
|
var alternate = ($$anchor3) => {
|
|
5498
5436
|
var div_6 = root_4();
|
|
5499
5437
|
var time_3 = $.child(div_6);
|
|
5500
|
-
$.action(time_3, ($$node, $$action_arg) => setContent
|
|
5438
|
+
$.action(time_3, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
|
|
5501
5439
|
$.reset(div_6);
|
|
5502
5440
|
$.template_effect(
|
|
5503
5441
|
($0, $1) => {
|
|
@@ -5519,10 +5457,7 @@ function Header($$anchor, $$props) {
|
|
|
5519
5457
|
}
|
|
5520
5458
|
$.reset(div_2);
|
|
5521
5459
|
$.template_effect(($0, $1) => $.set_class(div_2, 1, `${$theme().day ?? ""} ${$0 ?? ""}${$1 ?? ""}`), [
|
|
5522
|
-
() =>
|
|
5523
|
-
var _a;
|
|
5524
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(date).getUTCDay()];
|
|
5525
|
-
},
|
|
5460
|
+
() => $theme().weekdays?.[$.get(date).getUTCDay()],
|
|
5526
5461
|
() => datesEqual($.get(date), $_today()) ? " " + $theme().today : ""
|
|
5527
5462
|
]);
|
|
5528
5463
|
$.append($$anchor2, div_2);
|
|
@@ -5531,7 +5466,7 @@ function Header($$anchor, $$props) {
|
|
|
5531
5466
|
var div_7 = $.sibling(div_1, 2);
|
|
5532
5467
|
$.reset(div);
|
|
5533
5468
|
$.bind_this(div, ($$value) => $.store_set(_headerEl, $$value), () => $_headerEl());
|
|
5534
|
-
$.action(div, ($$node, $$action_arg) => observeResize
|
|
5469
|
+
$.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => () => $.store_set(_headerHeight, $_headerEl().clientHeight));
|
|
5535
5470
|
$.template_effect(() => {
|
|
5536
5471
|
$.set_class(div, 1, $theme().header);
|
|
5537
5472
|
$.set_class(div_1, 1, $theme().days);
|
|
@@ -5638,7 +5573,7 @@ function repositionEvent(chunk, dayChunks, longChunks, height2, allDay) {
|
|
|
5638
5573
|
chunk.bottom = height2;
|
|
5639
5574
|
let margin = 1;
|
|
5640
5575
|
let key = chunk.date.getTime();
|
|
5641
|
-
longChunks =
|
|
5576
|
+
longChunks = longChunks?.[key] ?? [];
|
|
5642
5577
|
let chunks = [...dayChunks, ...longChunks];
|
|
5643
5578
|
chunks.sort((a, b) => (a.top ?? 0) - (b.top ?? 0) || a.start - b.start || b.event.allDay - a.event.allDay);
|
|
5644
5579
|
for (let dayChunk of chunks) {
|
|
@@ -5659,9 +5594,9 @@ function getSlotTimeLimits($_dayTimeLimits, date) {
|
|
|
5659
5594
|
}
|
|
5660
5595
|
function Event($$anchor, $$props) {
|
|
5661
5596
|
$.push($$props, true);
|
|
5662
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5663
5597
|
const $slotWidth = () => $.store_get(slotWidth, "$slotWidth", $$stores);
|
|
5664
5598
|
const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
|
|
5599
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5665
5600
|
let dayChunks = $.prop($$props, "dayChunks", 19, () => []), longChunks = $.prop($$props, "longChunks", 19, () => ({})), resource = $.prop($$props, "resource", 3, void 0);
|
|
5666
5601
|
let { slotDuration, slotWidth } = getContext("state");
|
|
5667
5602
|
let el = $.state(void 0);
|
|
@@ -5694,6 +5629,7 @@ function Event($$anchor, $$props) {
|
|
|
5694
5629
|
$.set(margin, repositionEvent($$props.chunk, dayChunks(), longChunks(), h, !toSeconds($slotDuration())), true);
|
|
5695
5630
|
return $.get(margin) + h;
|
|
5696
5631
|
}
|
|
5632
|
+
var $$exports = { reposition };
|
|
5697
5633
|
var fragment = $.comment();
|
|
5698
5634
|
var node = $.first_child(fragment);
|
|
5699
5635
|
{
|
|
@@ -5720,7 +5656,7 @@ function Event($$anchor, $$props) {
|
|
|
5720
5656
|
});
|
|
5721
5657
|
}
|
|
5722
5658
|
$.append($$anchor, fragment);
|
|
5723
|
-
var $$pop = $.pop(
|
|
5659
|
+
var $$pop = $.pop($$exports);
|
|
5724
5660
|
$$cleanup();
|
|
5725
5661
|
return $$pop;
|
|
5726
5662
|
}
|
|
@@ -5728,7 +5664,6 @@ var root_1$1 = $.from_html(`<!> <!> <!> <!>`, 1);
|
|
|
5728
5664
|
var root$3 = $.from_html(`<div role="cell"><div><!></div></div>`);
|
|
5729
5665
|
function Day($$anchor, $$props) {
|
|
5730
5666
|
$.push($$props, true);
|
|
5731
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5732
5667
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
5733
5668
|
const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
|
|
5734
5669
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
@@ -5737,6 +5672,7 @@ function Day($$anchor, $$props) {
|
|
|
5737
5672
|
const $slotWidth = () => $.store_get(slotWidth, "$slotWidth", $$stores);
|
|
5738
5673
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
5739
5674
|
const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
|
|
5675
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5740
5676
|
let iChunks = $.prop($$props, "iChunks", 19, () => []);
|
|
5741
5677
|
let {
|
|
5742
5678
|
highlightedDates,
|
|
@@ -5777,10 +5713,10 @@ function Day($$anchor, $$props) {
|
|
|
5777
5713
|
function reposition() {
|
|
5778
5714
|
return max(...runReposition(refs, $.get(dayChunks)));
|
|
5779
5715
|
}
|
|
5716
|
+
var $$exports = { reposition };
|
|
5780
5717
|
var div = root$3();
|
|
5781
5718
|
div.__pointerdown = function(...$$args) {
|
|
5782
|
-
|
|
5783
|
-
(_b = (_a = $_interaction().action) == null ? void 0 : _a.select) == null ? void 0 : _b.apply(this, $$args);
|
|
5719
|
+
$_interaction().action?.select?.apply(this, $$args);
|
|
5784
5720
|
};
|
|
5785
5721
|
var div_1 = $.child(div);
|
|
5786
5722
|
var node = $.child(div_1);
|
|
@@ -5826,7 +5762,7 @@ function Day($$anchor, $$props) {
|
|
|
5826
5762
|
}
|
|
5827
5763
|
}),
|
|
5828
5764
|
($$value, i2) => refs[i2] = $$value,
|
|
5829
|
-
(i2) => refs
|
|
5765
|
+
(i2) => refs?.[i2],
|
|
5830
5766
|
() => [$.get(i)]
|
|
5831
5767
|
);
|
|
5832
5768
|
});
|
|
@@ -5862,15 +5798,12 @@ function Day($$anchor, $$props) {
|
|
|
5862
5798
|
$.set_class(div_1, 1, $theme().events);
|
|
5863
5799
|
},
|
|
5864
5800
|
[
|
|
5865
|
-
() =>
|
|
5866
|
-
var _a;
|
|
5867
|
-
return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
|
|
5868
|
-
},
|
|
5801
|
+
() => $theme().weekdays?.[$$props.date.getUTCDay()],
|
|
5869
5802
|
() => $.get(allDay) ? null : ceil((toSeconds($.get(slotTimeLimits2).max) - toSeconds($.get(slotTimeLimits2).min)) / toSeconds($slotDuration()))
|
|
5870
5803
|
]
|
|
5871
5804
|
);
|
|
5872
5805
|
$.append($$anchor, div);
|
|
5873
|
-
var $$pop = $.pop(
|
|
5806
|
+
var $$pop = $.pop($$exports);
|
|
5874
5807
|
$$cleanup();
|
|
5875
5808
|
return $$pop;
|
|
5876
5809
|
}
|
|
@@ -5878,7 +5811,6 @@ $.delegate(["pointerdown"]);
|
|
|
5878
5811
|
var root$2 = $.from_html(`<div role="row"></div>`);
|
|
5879
5812
|
function Days($$anchor, $$props) {
|
|
5880
5813
|
$.push($$props, true);
|
|
5881
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5882
5814
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
5883
5815
|
const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
|
|
5884
5816
|
const $_dayTimeLimits = () => $.store_get(_dayTimeLimits, "$_dayTimeLimits", $$stores);
|
|
@@ -5889,6 +5821,7 @@ function Days($$anchor, $$props) {
|
|
|
5889
5821
|
const $_daysHs = () => $.store_get(_daysHs, "$_daysHs", $$stores);
|
|
5890
5822
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
5891
5823
|
const $_resHs = () => $.store_get(_resHs, "$_resHs", $$stores);
|
|
5824
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5892
5825
|
let {
|
|
5893
5826
|
_viewDates,
|
|
5894
5827
|
_filteredEvents,
|
|
@@ -5947,6 +5880,7 @@ function Days($$anchor, $$props) {
|
|
|
5947
5880
|
$_daysHs().set($$props.resource, ceil(max(...runReposition(refs, $_viewDates()))) + 10);
|
|
5948
5881
|
$.store_set(_daysHs, $_daysHs());
|
|
5949
5882
|
}
|
|
5883
|
+
var $$exports = { reposition };
|
|
5950
5884
|
var div = root$2();
|
|
5951
5885
|
$.each(div, 5, $_viewDates, $.index, ($$anchor2, date, i) => {
|
|
5952
5886
|
$.bind_this(
|
|
@@ -5971,7 +5905,7 @@ function Days($$anchor, $$props) {
|
|
|
5971
5905
|
}
|
|
5972
5906
|
}),
|
|
5973
5907
|
($$value, i2) => refs[i2] = $$value,
|
|
5974
|
-
(i2) => refs
|
|
5908
|
+
(i2) => refs?.[i2],
|
|
5975
5909
|
() => [i]
|
|
5976
5910
|
);
|
|
5977
5911
|
});
|
|
@@ -5986,7 +5920,7 @@ function Days($$anchor, $$props) {
|
|
|
5986
5920
|
]
|
|
5987
5921
|
);
|
|
5988
5922
|
$.append($$anchor, div);
|
|
5989
|
-
var $$pop = $.pop(
|
|
5923
|
+
var $$pop = $.pop($$exports);
|
|
5990
5924
|
$$cleanup();
|
|
5991
5925
|
return $$pop;
|
|
5992
5926
|
}
|
|
@@ -5994,7 +5928,6 @@ var root_2 = $.from_html(`<div></div>`);
|
|
|
5994
5928
|
var root$1 = $.from_html(`<div><div><div></div> <!></div></div>`);
|
|
5995
5929
|
function Body($$anchor, $$props) {
|
|
5996
5930
|
$.push($$props, true);
|
|
5997
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
5998
5931
|
const $_dayTimeLimits = () => $.store_get(_dayTimeLimits, "$_dayTimeLimits", $$stores);
|
|
5999
5932
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
6000
5933
|
const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
|
|
@@ -6008,6 +5941,7 @@ function Body($$anchor, $$props) {
|
|
|
6008
5941
|
const $_sidebarEl = () => $.store_get(_sidebarEl, "$_sidebarEl", $$stores);
|
|
6009
5942
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
6010
5943
|
const $_dayTimes = () => $.store_get(_dayTimes, "$_dayTimes", $$stores);
|
|
5944
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
6011
5945
|
let {
|
|
6012
5946
|
_bodyEl,
|
|
6013
5947
|
_bodyHeight,
|
|
@@ -6081,14 +6015,14 @@ function Body($$anchor, $$props) {
|
|
|
6081
6015
|
}
|
|
6082
6016
|
}),
|
|
6083
6017
|
($$value, i2) => refs[i2] = $$value,
|
|
6084
|
-
(i2) => refs
|
|
6018
|
+
(i2) => refs?.[i2],
|
|
6085
6019
|
() => [i]
|
|
6086
6020
|
);
|
|
6087
6021
|
});
|
|
6088
6022
|
$.reset(div_1);
|
|
6089
6023
|
$.reset(div);
|
|
6090
6024
|
$.bind_this(div, ($$value) => $.store_set(_bodyEl, $$value), () => $_bodyEl());
|
|
6091
|
-
$.action(div, ($$node, $$action_arg) => observeResize
|
|
6025
|
+
$.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => onresize);
|
|
6092
6026
|
$.template_effect(() => {
|
|
6093
6027
|
$.set_class(div, 1, $theme().body);
|
|
6094
6028
|
$.set_class(div_1, 1, $theme().content);
|
|
@@ -6102,7 +6036,6 @@ function Body($$anchor, $$props) {
|
|
|
6102
6036
|
var root_1 = $.from_html(`<div></div>`);
|
|
6103
6037
|
function NowIndicator($$anchor, $$props) {
|
|
6104
6038
|
$.push($$props, true);
|
|
6105
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
6106
6039
|
const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
|
|
6107
6040
|
const $_dayTimeLimits = () => $.store_get(_dayTimeLimits, "$_dayTimeLimits", $$stores);
|
|
6108
6041
|
const $_today = () => $.store_get(_today, "$_today", $$stores);
|
|
@@ -6114,6 +6047,7 @@ function NowIndicator($$anchor, $$props) {
|
|
|
6114
6047
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
6115
6048
|
const $_headerHeight = () => $.store_get(_headerHeight, "$_headerHeight", $$stores);
|
|
6116
6049
|
const $_bodyHeight = () => $.store_get(_bodyHeight, "$_bodyHeight", $$stores);
|
|
6050
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
6117
6051
|
let {
|
|
6118
6052
|
slotDuration,
|
|
6119
6053
|
slotWidth,
|
|
@@ -6179,9 +6113,9 @@ function NowIndicator($$anchor, $$props) {
|
|
|
6179
6113
|
var root = $.from_html(`<div><!> <div><!> <!> <!></div></div>`);
|
|
6180
6114
|
function View($$anchor, $$props) {
|
|
6181
6115
|
$.push($$props, false);
|
|
6182
|
-
const [$$stores, $$cleanup] = $.setup_stores();
|
|
6183
6116
|
const $theme = () => $.store_get(theme, "$theme", $$stores);
|
|
6184
6117
|
const $nowIndicator = () => $.store_get(nowIndicator, "$nowIndicator", $$stores);
|
|
6118
|
+
const [$$stores, $$cleanup] = $.setup_stores();
|
|
6185
6119
|
let { nowIndicator, theme } = getContext("state");
|
|
6186
6120
|
$.init();
|
|
6187
6121
|
var div = root();
|