@event-calendar/core 4.4.1 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +24 -23
- package/package.json +2 -2
- package/src/Calendar.svelte +2 -1
package/README.md
CHANGED
|
@@ -228,8 +228,8 @@ This bundle contains a version of the calendar that includes all plugins and is
|
|
|
228
228
|
|
|
229
229
|
The first step is to include the following lines of code in the `<head>` section of your page:
|
|
230
230
|
```html
|
|
231
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.4.
|
|
232
|
-
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.4.
|
|
231
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.4.2/dist/event-calendar.min.css">
|
|
232
|
+
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.4.2/dist/event-calendar.min.js"></script>
|
|
233
233
|
```
|
|
234
234
|
|
|
235
235
|
<details>
|
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* EventCalendar v4.4.
|
|
2
|
+
* EventCalendar v4.4.2
|
|
3
3
|
* https://github.com/vkurko/calendar
|
|
4
4
|
*/
|
|
5
5
|
import { tick, getContext, untrack, setContext, onMount, mount, unmount } from "svelte";
|
|
@@ -1354,7 +1354,7 @@ function Buttons($$anchor, $$props) {
|
|
|
1354
1354
|
var consequent = ($$anchor3) => {
|
|
1355
1355
|
var h2 = root_2$7();
|
|
1356
1356
|
$.action(h2, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), $_viewTitle);
|
|
1357
|
-
$.template_effect(() => $.set_class(h2, 1, $theme().title));
|
|
1357
|
+
$.template_effect(() => $.set_class(h2, 1, ($theme(), $.untrack(() => $theme().title))));
|
|
1358
1358
|
$.append($$anchor3, h2);
|
|
1359
1359
|
};
|
|
1360
1360
|
var alternate = ($$anchor3, $$elseif) => {
|
|
@@ -1364,11 +1364,11 @@ function Buttons($$anchor, $$props) {
|
|
|
1364
1364
|
var i = $.child(button_1);
|
|
1365
1365
|
$.reset(button_1);
|
|
1366
1366
|
$.template_effect(() => {
|
|
1367
|
-
$.set_class(button_1, 1, `${$theme().button ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1368
|
-
$.set_attribute(button_1, "aria-label", $buttonText().prev);
|
|
1369
|
-
$.set_attribute(button_1, "title", $buttonText().prev);
|
|
1367
|
+
$.set_class(button_1, 1, `${($theme(), $.untrack(() => $theme().button)) ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1368
|
+
$.set_attribute(button_1, "aria-label", ($buttonText(), $.untrack(() => $buttonText().prev)));
|
|
1369
|
+
$.set_attribute(button_1, "title", ($buttonText(), $.untrack(() => $buttonText().prev)));
|
|
1370
1370
|
button_1.disabled = $.get(prevDisabled);
|
|
1371
|
-
$.set_class(i, 1, `${$theme().icon ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1371
|
+
$.set_class(i, 1, `${($theme(), $.untrack(() => $theme().icon)) ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1372
1372
|
});
|
|
1373
1373
|
$.event("click", button_1, prev);
|
|
1374
1374
|
$.append($$anchor4, button_1);
|
|
@@ -1380,11 +1380,11 @@ function Buttons($$anchor, $$props) {
|
|
|
1380
1380
|
var i_1 = $.child(button_2);
|
|
1381
1381
|
$.reset(button_2);
|
|
1382
1382
|
$.template_effect(() => {
|
|
1383
|
-
$.set_class(button_2, 1, `${$theme().button ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1384
|
-
$.set_attribute(button_2, "aria-label", $buttonText().next);
|
|
1385
|
-
$.set_attribute(button_2, "title", $buttonText().next);
|
|
1383
|
+
$.set_class(button_2, 1, `${($theme(), $.untrack(() => $theme().button)) ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1384
|
+
$.set_attribute(button_2, "aria-label", ($buttonText(), $.untrack(() => $buttonText().next)));
|
|
1385
|
+
$.set_attribute(button_2, "title", ($buttonText(), $.untrack(() => $buttonText().next)));
|
|
1386
1386
|
button_2.disabled = $.get(nextDisabled);
|
|
1387
|
-
$.set_class(i_1, 1, `${$theme().icon ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1387
|
+
$.set_class(i_1, 1, `${($theme(), $.untrack(() => $theme().icon)) ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1388
1388
|
});
|
|
1389
1389
|
$.event("click", button_2, next);
|
|
1390
1390
|
$.append($$anchor5, button_2);
|
|
@@ -1396,9 +1396,9 @@ function Buttons($$anchor, $$props) {
|
|
|
1396
1396
|
var text = $.child(button_3, true);
|
|
1397
1397
|
$.reset(button_3);
|
|
1398
1398
|
$.template_effect(() => {
|
|
1399
|
-
$.set_class(button_3, 1, `${$theme().button ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1399
|
+
$.set_class(button_3, 1, `${($theme(), $.untrack(() => $theme().button)) ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1400
1400
|
button_3.disabled = $.get(todayDisabled);
|
|
1401
|
-
$.set_text(text, $buttonText()[$.get(button)]);
|
|
1401
|
+
$.set_text(text, ($buttonText(), $.get(button), $.untrack(() => $buttonText()[$.get(button)])));
|
|
1402
1402
|
});
|
|
1403
1403
|
$.event("click", button_3, () => $.store_set(date, cloneDate(today2)));
|
|
1404
1404
|
$.append($$anchor6, button_3);
|
|
@@ -1412,7 +1412,7 @@ function Buttons($$anchor, $$props) {
|
|
|
1412
1412
|
(_a = $customButtons()[$.get(button)].click) == null ? void 0 : _a.apply(this, $$args);
|
|
1413
1413
|
}));
|
|
1414
1414
|
$.action(button_4, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $customButtons()[$.get(button)].text);
|
|
1415
|
-
$.template_effect(() => $.set_class(button_4, 1, `${$theme().button ?? ""} ec-${$.get(button) ?? ""}${$customButtons()[$.get(button)].active ? " " + $theme().active : ""}`));
|
|
1415
|
+
$.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 : "")) ?? ""}`));
|
|
1416
1416
|
$.append($$anchor7, button_4);
|
|
1417
1417
|
};
|
|
1418
1418
|
var alternate_4 = ($$anchor7, $$elseif5) => {
|
|
@@ -1422,8 +1422,8 @@ function Buttons($$anchor, $$props) {
|
|
|
1422
1422
|
var text_1 = $.child(button_5, true);
|
|
1423
1423
|
$.reset(button_5);
|
|
1424
1424
|
$.template_effect(() => {
|
|
1425
|
-
$.set_class(button_5, 1, `${$theme().button ?? ""}${$view() === $.get(button) ? " " + $theme().active : ""} ec-${$.get(button) ?? ""}`);
|
|
1426
|
-
$.set_text(text_1, $buttonText()[$.get(button)]);
|
|
1425
|
+
$.set_class(button_5, 1, `${($theme(), $.untrack(() => $theme().button)) ?? ""}${($view(), $.get(button), $theme(), $.untrack(() => $view() === $.get(button) ? " " + $theme().active : "")) ?? ""} ec-${$.get(button) ?? ""}`);
|
|
1426
|
+
$.set_text(text_1, ($buttonText(), $.get(button), $.untrack(() => $buttonText()[$.get(button)])));
|
|
1427
1427
|
});
|
|
1428
1428
|
$.event("click", button_5, () => $.store_set(view2, $.get(button)));
|
|
1429
1429
|
$.append($$anchor8, button_5);
|
|
@@ -1440,7 +1440,7 @@ function Buttons($$anchor, $$props) {
|
|
|
1440
1440
|
$.if(
|
|
1441
1441
|
$$anchor6,
|
|
1442
1442
|
($$render) => {
|
|
1443
|
-
if ($customButtons()[$.get(button)]) $$render(consequent_4);
|
|
1443
|
+
if ($customButtons(), $.get(button), $.untrack(() => $customButtons()[$.get(button)])) $$render(consequent_4);
|
|
1444
1444
|
else $$render(alternate_4, false);
|
|
1445
1445
|
},
|
|
1446
1446
|
$$elseif4
|
|
@@ -1615,8 +1615,8 @@ function Auxiliary$1($$anchor, $$props) {
|
|
|
1615
1615
|
$.each(node, 1, $_auxiliary, $.index, ($$anchor2, Component) => {
|
|
1616
1616
|
var fragment_1 = $.comment();
|
|
1617
1617
|
var node_1 = $.first_child(fragment_1);
|
|
1618
|
-
$.component(node_1, () => $.get(Component), ($$anchor3,
|
|
1619
|
-
|
|
1618
|
+
$.component(node_1, () => $.get(Component), ($$anchor3, Component_1) => {
|
|
1619
|
+
Component_1($$anchor3, {});
|
|
1620
1620
|
});
|
|
1621
1621
|
$.append($$anchor2, fragment_1);
|
|
1622
1622
|
});
|
|
@@ -1697,7 +1697,8 @@ function Calendar($$anchor, $$props) {
|
|
|
1697
1697
|
let id = String(event.id);
|
|
1698
1698
|
let idx = $_events().findIndex((event2) => event2.id === id);
|
|
1699
1699
|
if (idx >= 0) {
|
|
1700
|
-
|
|
1700
|
+
event = createEvents([event])[0];
|
|
1701
|
+
$.store_mutate(_events, $.untrack($_events)[idx] = event, $.untrack($_events));
|
|
1701
1702
|
return toEventWithLocalDates(event);
|
|
1702
1703
|
}
|
|
1703
1704
|
return null;
|
|
@@ -1743,8 +1744,8 @@ function Calendar($$anchor, $$props) {
|
|
|
1743
1744
|
var node = $.child(div);
|
|
1744
1745
|
Toolbar(node, {});
|
|
1745
1746
|
var node_1 = $.sibling(node, 2);
|
|
1746
|
-
$.component(node_1, () => $.get(View2), ($$anchor2,
|
|
1747
|
-
|
|
1747
|
+
$.component(node_1, () => $.get(View2), ($$anchor2, View_1) => {
|
|
1748
|
+
View_1($$anchor2, {});
|
|
1748
1749
|
});
|
|
1749
1750
|
$.reset(div);
|
|
1750
1751
|
var node_2 = $.sibling(div, 2);
|
|
@@ -2003,8 +2004,8 @@ function InteractableEvent($$anchor, $$props) {
|
|
|
2003
2004
|
var consequent = ($$anchor3) => {
|
|
2004
2005
|
var fragment_2 = $.comment();
|
|
2005
2006
|
var node_1 = $.first_child(fragment_2);
|
|
2006
|
-
$.component(node_1, () => $.get(Resizer2), ($$anchor4,
|
|
2007
|
-
|
|
2007
|
+
$.component(node_1, () => $.get(Resizer2), ($$anchor4, Resizer_1) => {
|
|
2008
|
+
Resizer_1($$anchor4, {
|
|
2008
2009
|
get chunk() {
|
|
2009
2010
|
return $$props.chunk;
|
|
2010
2011
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event-calendar/core",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
4
4
|
"title": "Event Calendar Core package",
|
|
5
5
|
"description": "Full-sized drag & drop event calendar with resource & timeline views",
|
|
6
6
|
"keywords": [
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"#components": "./src/lib/components/index.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"svelte": "^5.
|
|
35
|
+
"svelte": "^5.34.8"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/src/Calendar.svelte
CHANGED
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
let id = String(event.id);
|
|
72
72
|
let idx = $_events.findIndex(event => event.id === id);
|
|
73
73
|
if (idx >= 0) {
|
|
74
|
-
|
|
74
|
+
event = createEvents([event])[0];
|
|
75
|
+
$_events[idx] = event;
|
|
75
76
|
return toEventWithLocalDates(event);
|
|
76
77
|
}
|
|
77
78
|
return null;
|