@event-calendar/list
Advanced tools
Comparing version 2.4.1 to 2.5.0
243
index.js
@@ -1,6 +0,6 @@ | ||
import { setContent, toEventWithLocalDates, toViewWithLocalDates, createEventClasses, createEventContent, addDay, cloneDate, bgEvent, eventIntersects, createEventChunk, sortEventChunks, datesEqual, setPayload, btnTextDay, themeView, btnTextWeek, btnTextMonth, btnTextYear, intl } from '@event-calendar/core'; | ||
import { setContent, keyEnter, toEventWithLocalDates, toViewWithLocalDates, createEventClasses, createEventContent, addDay, cloneDate, bgEvent, eventIntersects, createEventChunk, sortEventChunks, datesEqual, toISOString, setPayload, btnTextDay, themeView, btnTextWeek, btnTextMonth, btnTextYear, intl } from '@event-calendar/core'; | ||
import { SvelteComponent, init, safe_not_equal, create_slot, element, attr, insert, append, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, detach, component_subscribe, binding_callbacks, space, action_destroyer, listen, is_function, noop, run_all, empty, group_outros, check_outros, ensure_array_like, update_keyed_each, outro_and_destroy_block, create_component, mount_component, destroy_component, destroy_each } from 'svelte/internal'; | ||
import { getContext, onMount } from 'svelte'; | ||
/* packages/list/src/Body.svelte generated by Svelte v4.2.2 */ | ||
/* packages/list/src/Body.svelte generated by Svelte v4.2.8 */ | ||
@@ -108,6 +108,6 @@ function create_fragment$3(ctx) { | ||
/* packages/list/src/Event.svelte generated by Svelte v4.2.2 */ | ||
/* packages/list/src/Event.svelte generated by Svelte v4.2.8 */ | ||
function create_fragment$2(ctx) { | ||
let div2; | ||
let article; | ||
let div0; | ||
@@ -119,2 +119,4 @@ let div0_class_value; | ||
let setContent_action; | ||
let article_role_value; | ||
let article_tabindex_value; | ||
let mounted; | ||
@@ -125,3 +127,3 @@ let dispose; | ||
c() { | ||
div2 = element("div"); | ||
article = element("article"); | ||
div0 = element("div"); | ||
@@ -133,10 +135,12 @@ t = space(); | ||
attr(div1, "class", div1_class_value = /*$theme*/ ctx[0].eventBody); | ||
attr(div2, "class", /*classes*/ ctx[2]); | ||
attr(article, "class", /*classes*/ ctx[2]); | ||
attr(article, "role", article_role_value = /*onclick*/ ctx[5] ? 'button' : undefined); | ||
attr(article, "tabindex", article_tabindex_value = /*onclick*/ ctx[5] ? 0 : undefined); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div2, anchor); | ||
append(div2, div0); | ||
append(div2, t); | ||
append(div2, div1); | ||
/*div2_binding*/ ctx[36](div2); | ||
insert(target, article, anchor); | ||
append(article, div0); | ||
append(article, t); | ||
append(article, div1); | ||
/*article_binding*/ ctx[39](article); | ||
@@ -146,10 +150,16 @@ if (!mounted) { | ||
action_destroyer(setContent_action = setContent.call(null, div1, /*content*/ ctx[4])), | ||
listen(div2, "click", function () { | ||
if (is_function(/*createHandler*/ ctx[23](/*$eventClick*/ ctx[5]))) /*createHandler*/ ctx[23](/*$eventClick*/ ctx[5]).apply(this, arguments); | ||
listen(article, "click", function () { | ||
if (is_function(/*onclick*/ ctx[5])) /*onclick*/ ctx[5].apply(this, arguments); | ||
}), | ||
listen(div2, "mouseenter", function () { | ||
if (is_function(/*createHandler*/ ctx[23](/*$eventMouseEnter*/ ctx[6]))) /*createHandler*/ ctx[23](/*$eventMouseEnter*/ ctx[6]).apply(this, arguments); | ||
listen(article, "keydown", function () { | ||
if (is_function(/*onclick*/ ctx[5] && keyEnter(/*onclick*/ ctx[5]))) (/*onclick*/ ctx[5] && keyEnter(/*onclick*/ ctx[5])).apply(this, arguments); | ||
}), | ||
listen(div2, "mouseleave", function () { | ||
if (is_function(/*createHandler*/ ctx[23](/*$eventMouseLeave*/ ctx[7]))) /*createHandler*/ ctx[23](/*$eventMouseLeave*/ ctx[7]).apply(this, arguments); | ||
listen(article, "mouseenter", function () { | ||
if (is_function(/*createHandler*/ ctx[25](/*$eventMouseEnter*/ ctx[6]))) /*createHandler*/ ctx[25](/*$eventMouseEnter*/ ctx[6]).apply(this, arguments); | ||
}), | ||
listen(article, "mouseleave", function () { | ||
if (is_function(/*createHandler*/ ctx[25](/*$eventMouseLeave*/ ctx[7]))) /*createHandler*/ ctx[25](/*$eventMouseLeave*/ ctx[7]).apply(this, arguments); | ||
}), | ||
listen(article, "pointerdown", function () { | ||
if (is_function(/*$_interaction*/ ctx[8].action?.noAction)) /*$_interaction*/ ctx[8].action?.noAction.apply(this, arguments); | ||
}) | ||
@@ -179,4 +189,12 @@ ]; | ||
if (dirty[0] & /*classes*/ 4) { | ||
attr(div2, "class", /*classes*/ ctx[2]); | ||
attr(article, "class", /*classes*/ ctx[2]); | ||
} | ||
if (dirty[0] & /*onclick*/ 32 && article_role_value !== (article_role_value = /*onclick*/ ctx[5] ? 'button' : undefined)) { | ||
attr(article, "role", article_role_value); | ||
} | ||
if (dirty[0] & /*onclick*/ 32 && article_tabindex_value !== (article_tabindex_value = /*onclick*/ ctx[5] ? 0 : undefined)) { | ||
attr(article, "tabindex", article_tabindex_value); | ||
} | ||
}, | ||
@@ -187,6 +205,6 @@ i: noop, | ||
if (detaching) { | ||
detach(div2); | ||
detach(article); | ||
} | ||
/*div2_binding*/ ctx[36](null); | ||
/*article_binding*/ ctx[39](null); | ||
mounted = false; | ||
@@ -199,2 +217,3 @@ run_all(dispose); | ||
function instance$2($$self, $$props, $$invalidate) { | ||
let $eventClick; | ||
let $_view; | ||
@@ -212,22 +231,23 @@ let $eventDidMount; | ||
let $_resBgColor; | ||
let $eventClick; | ||
let $eventMouseEnter; | ||
let $eventMouseLeave; | ||
let $_interaction; | ||
let { chunk } = $$props; | ||
let { displayEventEnd, eventBackgroundColor, eventTextColor, eventColor, eventContent, eventClassNames, eventClick, eventDidMount, eventMouseEnter, eventMouseLeave, theme, _view, _intlEventTime, _resBgColor, _resTxtColor } = getContext('state'); | ||
component_subscribe($$self, displayEventEnd, value => $$invalidate(29, $displayEventEnd = value)); | ||
component_subscribe($$self, eventBackgroundColor, value => $$invalidate(34, $eventBackgroundColor = value)); | ||
component_subscribe($$self, eventTextColor, value => $$invalidate(31, $eventTextColor = value)); | ||
component_subscribe($$self, eventColor, value => $$invalidate(33, $eventColor = value)); | ||
component_subscribe($$self, eventContent, value => $$invalidate(28, $eventContent = value)); | ||
component_subscribe($$self, eventClassNames, value => $$invalidate(30, $eventClassNames = value)); | ||
component_subscribe($$self, eventClick, value => $$invalidate(5, $eventClick = value)); | ||
component_subscribe($$self, eventDidMount, value => $$invalidate(38, $eventDidMount = value)); | ||
let { displayEventEnd, eventBackgroundColor, eventTextColor, eventColor, eventContent, eventClassNames, eventClick, eventDidMount, eventMouseEnter, eventMouseLeave, theme, _view, _intlEventTime, _resBgColor, _resTxtColor, _interaction } = getContext('state'); | ||
component_subscribe($$self, displayEventEnd, value => $$invalidate(32, $displayEventEnd = value)); | ||
component_subscribe($$self, eventBackgroundColor, value => $$invalidate(37, $eventBackgroundColor = value)); | ||
component_subscribe($$self, eventTextColor, value => $$invalidate(34, $eventTextColor = value)); | ||
component_subscribe($$self, eventColor, value => $$invalidate(36, $eventColor = value)); | ||
component_subscribe($$self, eventContent, value => $$invalidate(31, $eventContent = value)); | ||
component_subscribe($$self, eventClassNames, value => $$invalidate(33, $eventClassNames = value)); | ||
component_subscribe($$self, eventClick, value => $$invalidate(28, $eventClick = value)); | ||
component_subscribe($$self, eventDidMount, value => $$invalidate(41, $eventDidMount = value)); | ||
component_subscribe($$self, eventMouseEnter, value => $$invalidate(6, $eventMouseEnter = value)); | ||
component_subscribe($$self, eventMouseLeave, value => $$invalidate(7, $eventMouseLeave = value)); | ||
component_subscribe($$self, theme, value => $$invalidate(0, $theme = value)); | ||
component_subscribe($$self, _view, value => $$invalidate(26, $_view = value)); | ||
component_subscribe($$self, _intlEventTime, value => $$invalidate(27, $_intlEventTime = value)); | ||
component_subscribe($$self, _resBgColor, value => $$invalidate(35, $_resBgColor = value)); | ||
component_subscribe($$self, _resTxtColor, value => $$invalidate(32, $_resTxtColor = value)); | ||
component_subscribe($$self, _view, value => $$invalidate(29, $_view = value)); | ||
component_subscribe($$self, _intlEventTime, value => $$invalidate(30, $_intlEventTime = value)); | ||
component_subscribe($$self, _resBgColor, value => $$invalidate(38, $_resBgColor = value)); | ||
component_subscribe($$self, _resTxtColor, value => $$invalidate(35, $_resTxtColor = value)); | ||
component_subscribe($$self, _interaction, value => $$invalidate(8, $_interaction = value)); | ||
let el; | ||
@@ -239,2 +259,3 @@ let event; | ||
let timeText; | ||
let onclick; | ||
@@ -265,3 +286,3 @@ onMount(() => { | ||
function div2_binding($$value) { | ||
function article_binding($$value) { | ||
binding_callbacks[$$value ? 'unshift' : 'push'](() => { | ||
@@ -274,11 +295,11 @@ el = $$value; | ||
$$self.$$set = $$props => { | ||
if ('chunk' in $$props) $$invalidate(24, chunk = $$props.chunk); | ||
if ('chunk' in $$props) $$invalidate(26, chunk = $$props.chunk); | ||
}; | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty[0] & /*chunk*/ 16777216) { | ||
$$invalidate(25, event = chunk.event); | ||
if ($$self.$$.dirty[0] & /*chunk*/ 67108864) { | ||
$$invalidate(27, event = chunk.event); | ||
} | ||
if ($$self.$$.dirty[0] & /*event, style, $theme, $eventClassNames, $_view*/ 1174405129 | $$self.$$.dirty[1] & /*$_resBgColor, $eventBackgroundColor, $eventColor, $_resTxtColor, $eventTextColor*/ 31) { | ||
if ($$self.$$.dirty[0] & /*event, style, $theme, $_view*/ 671088649 | $$self.$$.dirty[1] & /*$_resBgColor, $eventBackgroundColor, $eventColor, $_resTxtColor, $eventTextColor, $eventClassNames*/ 252) { | ||
{ | ||
@@ -304,3 +325,3 @@ // Class & Style | ||
if ($$self.$$.dirty[0] & /*chunk, $displayEventEnd, $eventContent, $theme, $_intlEventTime, $_view*/ 1023410177) { | ||
if ($$self.$$.dirty[0] & /*chunk, $theme, $_intlEventTime, $_view*/ 1677721601 | $$self.$$.dirty[1] & /*$displayEventEnd, $eventContent*/ 3) { | ||
{ | ||
@@ -311,2 +332,7 @@ // Content | ||
} | ||
if ($$self.$$.dirty[0] & /*$eventClick*/ 268435456) { | ||
// Onclick handler | ||
$$invalidate(5, onclick = createHandler($eventClick)); | ||
} | ||
}; | ||
@@ -320,5 +346,6 @@ | ||
content, | ||
$eventClick, | ||
onclick, | ||
$eventMouseEnter, | ||
$eventMouseLeave, | ||
$_interaction, | ||
displayEventEnd, | ||
@@ -339,5 +366,7 @@ eventBackgroundColor, | ||
_resTxtColor, | ||
_interaction, | ||
createHandler, | ||
chunk, | ||
event, | ||
$eventClick, | ||
$_view, | ||
@@ -353,3 +382,3 @@ $_intlEventTime, | ||
$_resBgColor, | ||
div2_binding | ||
article_binding | ||
]; | ||
@@ -361,28 +390,29 @@ } | ||
super(); | ||
init(this, options, instance$2, create_fragment$2, safe_not_equal, { chunk: 24 }, null, [-1, -1]); | ||
init(this, options, instance$2, create_fragment$2, safe_not_equal, { chunk: 26 }, null, [-1, -1]); | ||
} | ||
} | ||
/* packages/list/src/Day.svelte generated by Svelte v4.2.2 */ | ||
/* packages/list/src/Day.svelte generated by Svelte v4.2.8 */ | ||
function get_each_context$1(ctx, list, i) { | ||
const child_ctx = ctx.slice(); | ||
child_ctx[20] = list[i]; | ||
child_ctx[21] = list[i]; | ||
return child_ctx; | ||
} | ||
// (46:0) {#if chunks.length} | ||
// (49:0) {#if chunks.length} | ||
function create_if_block$1(ctx) { | ||
let div; | ||
let span0; | ||
let h4; | ||
let time0; | ||
let setContent_action; | ||
let t0; | ||
let span1; | ||
let span1_class_value; | ||
let time1; | ||
let time1_class_value; | ||
let setContent_action_1; | ||
let div_class_value; | ||
let h4_class_value; | ||
let t1; | ||
let each_blocks = []; | ||
let each_1_lookup = new Map(); | ||
let each_1_anchor; | ||
let div_class_value; | ||
let current; | ||
@@ -392,3 +422,3 @@ let mounted; | ||
let each_value = ensure_array_like(/*chunks*/ ctx[2]); | ||
const get_key = ctx => /*chunk*/ ctx[20].event; | ||
const get_key = ctx => /*chunk*/ ctx[21].event; | ||
@@ -404,5 +434,6 @@ for (let i = 0; i < each_value.length; i += 1) { | ||
div = element("div"); | ||
span0 = element("span"); | ||
h4 = element("h4"); | ||
time0 = element("time"); | ||
t0 = space(); | ||
span1 = element("span"); | ||
time1 = element("time"); | ||
t1 = space(); | ||
@@ -414,24 +445,28 @@ | ||
each_1_anchor = empty(); | ||
attr(span1, "class", span1_class_value = /*$theme*/ ctx[5].daySide); | ||
attr(time0, "datetime", /*datetime*/ ctx[5]); | ||
attr(time1, "class", time1_class_value = /*$theme*/ ctx[6].daySide); | ||
attr(time1, "datetime", /*datetime*/ ctx[5]); | ||
attr(h4, "class", h4_class_value = /*$theme*/ ctx[6].dayHead); | ||
attr(div, "class", div_class_value = "" + (/*$theme*/ ctx[5].day + " " + /*$theme*/ ctx[5].weekdays?.[/*date*/ ctx[0].getUTCDay()] + (/*isToday*/ ctx[3] ? ' ' + /*$theme*/ ctx[5].today : '') + (/*highlight*/ ctx[4] | ||
? ' ' + /*$theme*/ ctx[5].highlight | ||
attr(div, "class", div_class_value = "" + (/*$theme*/ ctx[6].day + " " + /*$theme*/ ctx[6].weekdays?.[/*date*/ ctx[0].getUTCDay()] + (/*isToday*/ ctx[3] ? ' ' + /*$theme*/ ctx[6].today : '') + (/*highlight*/ ctx[4] | ||
? ' ' + /*$theme*/ ctx[6].highlight | ||
: ''))); | ||
attr(div, "role", "listitem"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div, anchor); | ||
append(div, span0); | ||
append(div, t0); | ||
append(div, span1); | ||
/*div_binding*/ ctx[19](div); | ||
insert(target, t1, anchor); | ||
append(div, h4); | ||
append(h4, time0); | ||
append(h4, t0); | ||
append(h4, time1); | ||
append(div, t1); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
if (each_blocks[i]) { | ||
each_blocks[i].m(target, anchor); | ||
each_blocks[i].m(div, null); | ||
} | ||
} | ||
insert(target, each_1_anchor, anchor); | ||
/*div_binding*/ ctx[20](div); | ||
current = true; | ||
@@ -441,6 +476,6 @@ | ||
dispose = [ | ||
action_destroyer(setContent_action = setContent.call(null, span0, /*$_intlListDay*/ ctx[7].format(/*date*/ ctx[0]))), | ||
action_destroyer(setContent_action_1 = setContent.call(null, span1, /*$_intlListDaySide*/ ctx[8].format(/*date*/ ctx[0]))), | ||
action_destroyer(setContent_action = setContent.call(null, time0, /*$_intlListDay*/ ctx[8].format(/*date*/ ctx[0]))), | ||
action_destroyer(setContent_action_1 = setContent.call(null, time1, /*$_intlListDaySide*/ ctx[9].format(/*date*/ ctx[0]))), | ||
listen(div, "pointerdown", function () { | ||
if (is_function(/*$_interaction*/ ctx[6].action?.select)) /*$_interaction*/ ctx[6].action?.select.apply(this, arguments); | ||
if (is_function(/*$_interaction*/ ctx[7].action?.select)) /*$_interaction*/ ctx[7].action?.select.apply(this, arguments); | ||
}) | ||
@@ -454,22 +489,35 @@ ]; | ||
ctx = new_ctx; | ||
if (setContent_action && is_function(setContent_action.update) && dirty & /*$_intlListDay, date*/ 129) setContent_action.update.call(null, /*$_intlListDay*/ ctx[7].format(/*date*/ ctx[0])); | ||
if (!current || dirty & /*$theme*/ 32 && span1_class_value !== (span1_class_value = /*$theme*/ ctx[5].daySide)) { | ||
attr(span1, "class", span1_class_value); | ||
if (!current || dirty & /*datetime*/ 32) { | ||
attr(time0, "datetime", /*datetime*/ ctx[5]); | ||
} | ||
if (setContent_action_1 && is_function(setContent_action_1.update) && dirty & /*$_intlListDaySide, date*/ 257) setContent_action_1.update.call(null, /*$_intlListDaySide*/ ctx[8].format(/*date*/ ctx[0])); | ||
if (setContent_action && is_function(setContent_action.update) && dirty & /*$_intlListDay, date*/ 257) setContent_action.update.call(null, /*$_intlListDay*/ ctx[8].format(/*date*/ ctx[0])); | ||
if (!current || dirty & /*$theme, date, isToday, highlight*/ 57 && div_class_value !== (div_class_value = "" + (/*$theme*/ ctx[5].day + " " + /*$theme*/ ctx[5].weekdays?.[/*date*/ ctx[0].getUTCDay()] + (/*isToday*/ ctx[3] ? ' ' + /*$theme*/ ctx[5].today : '') + (/*highlight*/ ctx[4] | ||
? ' ' + /*$theme*/ ctx[5].highlight | ||
: '')))) { | ||
attr(div, "class", div_class_value); | ||
if (!current || dirty & /*$theme*/ 64 && time1_class_value !== (time1_class_value = /*$theme*/ ctx[6].daySide)) { | ||
attr(time1, "class", time1_class_value); | ||
} | ||
if (!current || dirty & /*datetime*/ 32) { | ||
attr(time1, "datetime", /*datetime*/ ctx[5]); | ||
} | ||
if (setContent_action_1 && is_function(setContent_action_1.update) && dirty & /*$_intlListDaySide, date*/ 513) setContent_action_1.update.call(null, /*$_intlListDaySide*/ ctx[9].format(/*date*/ ctx[0])); | ||
if (!current || dirty & /*$theme*/ 64 && h4_class_value !== (h4_class_value = /*$theme*/ ctx[6].dayHead)) { | ||
attr(h4, "class", h4_class_value); | ||
} | ||
if (dirty & /*chunks*/ 4) { | ||
each_value = ensure_array_like(/*chunks*/ ctx[2]); | ||
group_outros(); | ||
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, outro_and_destroy_block, create_each_block$1, each_1_anchor, get_each_context$1); | ||
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, outro_and_destroy_block, create_each_block$1, null, get_each_context$1); | ||
check_outros(); | ||
} | ||
if (!current || dirty & /*$theme, date, isToday, highlight*/ 89 && div_class_value !== (div_class_value = "" + (/*$theme*/ ctx[6].day + " " + /*$theme*/ ctx[6].weekdays?.[/*date*/ ctx[0].getUTCDay()] + (/*isToday*/ ctx[3] ? ' ' + /*$theme*/ ctx[6].today : '') + (/*highlight*/ ctx[4] | ||
? ' ' + /*$theme*/ ctx[6].highlight | ||
: '')))) { | ||
attr(div, "class", div_class_value); | ||
} | ||
}, | ||
@@ -495,12 +543,9 @@ i(local) { | ||
detach(div); | ||
detach(t1); | ||
detach(each_1_anchor); | ||
} | ||
/*div_binding*/ ctx[19](null); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].d(detaching); | ||
each_blocks[i].d(); | ||
} | ||
/*div_binding*/ ctx[20](null); | ||
mounted = false; | ||
@@ -512,3 +557,3 @@ run_all(dispose); | ||
// (55:4) {#each chunks as chunk (chunk.event)} | ||
// (60:8) {#each chunks as chunk (chunk.event)} | ||
function create_each_block$1(key_1, ctx) { | ||
@@ -518,3 +563,3 @@ let first; | ||
let current; | ||
event = new Event({ props: { chunk: /*chunk*/ ctx[20] } }); | ||
event = new Event({ props: { chunk: /*chunk*/ ctx[21] } }); | ||
@@ -537,3 +582,3 @@ return { | ||
const event_changes = {}; | ||
if (dirty & /*chunks*/ 4) event_changes.chunk = /*chunk*/ ctx[20]; | ||
if (dirty & /*chunks*/ 4) event_changes.chunk = /*chunk*/ ctx[21]; | ||
event.$set(event_changes); | ||
@@ -628,12 +673,13 @@ }, | ||
let { _events, _interaction, _intlListDay, _intlListDaySide, _today, highlightedDates, theme } = getContext('state'); | ||
component_subscribe($$self, _events, value => $$invalidate(18, $_events = value)); | ||
component_subscribe($$self, _interaction, value => $$invalidate(6, $_interaction = value)); | ||
component_subscribe($$self, _intlListDay, value => $$invalidate(7, $_intlListDay = value)); | ||
component_subscribe($$self, _intlListDaySide, value => $$invalidate(8, $_intlListDaySide = value)); | ||
component_subscribe($$self, _today, value => $$invalidate(17, $_today = value)); | ||
component_subscribe($$self, highlightedDates, value => $$invalidate(16, $highlightedDates = value)); | ||
component_subscribe($$self, theme, value => $$invalidate(5, $theme = value)); | ||
component_subscribe($$self, _events, value => $$invalidate(19, $_events = value)); | ||
component_subscribe($$self, _interaction, value => $$invalidate(7, $_interaction = value)); | ||
component_subscribe($$self, _intlListDay, value => $$invalidate(8, $_intlListDay = value)); | ||
component_subscribe($$self, _intlListDaySide, value => $$invalidate(9, $_intlListDaySide = value)); | ||
component_subscribe($$self, _today, value => $$invalidate(18, $_today = value)); | ||
component_subscribe($$self, highlightedDates, value => $$invalidate(17, $highlightedDates = value)); | ||
component_subscribe($$self, theme, value => $$invalidate(6, $theme = value)); | ||
let el; | ||
let chunks; | ||
let isToday, highlight; | ||
let datetime; | ||
@@ -652,3 +698,3 @@ function div_binding($$value) { | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty & /*date, $_events, chunks*/ 262149) { | ||
if ($$self.$$.dirty & /*date, $_events, chunks*/ 524293) { | ||
{ | ||
@@ -670,10 +716,14 @@ $$invalidate(2, chunks = []); | ||
if ($$self.$$.dirty & /*date, $_today*/ 131073) { | ||
if ($$self.$$.dirty & /*date, $_today*/ 262145) { | ||
$$invalidate(3, isToday = datesEqual(date, $_today)); | ||
} | ||
if ($$self.$$.dirty & /*$highlightedDates, date*/ 65537) { | ||
if ($$self.$$.dirty & /*$highlightedDates, date*/ 131073) { | ||
$$invalidate(4, highlight = $highlightedDates.some(d => datesEqual(d, date))); | ||
} | ||
if ($$self.$$.dirty & /*date*/ 1) { | ||
$$invalidate(5, datetime = toISOString(date, 10)); | ||
} | ||
if ($$self.$$.dirty & /*el, date*/ 3) { | ||
@@ -698,2 +748,3 @@ // dateFromPoint | ||
highlight, | ||
datetime, | ||
$theme, | ||
@@ -724,3 +775,3 @@ $_interaction, | ||
/* packages/list/src/View.svelte generated by Svelte v4.2.2 */ | ||
/* packages/list/src/View.svelte generated by Svelte v4.2.8 */ | ||
@@ -727,0 +778,0 @@ function get_each_context(ctx, list, i) { |
{ | ||
"name": "@event-calendar/list", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"title": "Event Calendar List plugin", | ||
@@ -29,5 +29,5 @@ "description": "Full-sized drag & drop event calendar with resource view", | ||
"dependencies": { | ||
"@event-calendar/core": "~2.4.1", | ||
"svelte": "^4.1.1" | ||
"@event-calendar/core": "~2.5.0", | ||
"svelte": "^4.2.8" | ||
} | ||
} |
@@ -200,4 +200,4 @@ # Event Calendar [![](https://data.jsdelivr.com/v1/package/npm/@event-calendar/build/badge)](https://www.jsdelivr.com/package/npm/@event-calendar/build) [![npm](https://img.shields.io/npm/dm/@event-calendar/core?color=red&label=npm&style=flat-square)](https://www.npmjs.com/package/@event-calendar/core) | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.5.0/event-calendar.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.5.0/event-calendar.min.js"></script> | ||
``` | ||
@@ -482,2 +482,27 @@ | ||
### dayHeaderAriaLabelFormat | ||
- Type `object` or `function` | ||
- Default `{dateStyle: 'long'}` | ||
> Views override the default value as follows: | ||
> - dayGridMonth `{weekday: 'long'}` | ||
Defines the text that is used inside the `aria-label` attribute in calendar column headings. | ||
This value can be either an object with options for the native JavaScript [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) object, or a callback function that returns formatted string: | ||
```js | ||
function (date) { | ||
// return formatted date string | ||
} | ||
``` | ||
<table> | ||
<tr> | ||
<td> | ||
`date` | ||
</td> | ||
<td>JavaScript Date object that needs to be formatted</td> | ||
</tr> | ||
</table> | ||
### dayHeaderFormat | ||
@@ -2227,9 +2252,2 @@ - Type `object` or `function` | ||
<details> | ||
<summary>Note</summary> | ||
> In the `'listDay'`, `'listWeek'`, `'listMonth'` and `'listYear'` views, the events are rendered outside the day container, so the method will return `null` for the coordinates that are inside the events. | ||
</details> | ||
### destroy() | ||
@@ -2306,3 +2324,3 @@ - Return value `undefined` | ||
The text appearing on the event. See [Content](#content)</td> | ||
`Content` The text appearing on the event. See [Content](#content)</td> | ||
</tr> | ||
@@ -2597,10 +2615,6 @@ <tr> | ||
</td> | ||
<td>The title of the resource</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
`titleHTML` | ||
The title of the resource. See [Content](#content). | ||
</td> | ||
<td>The HTML version of the title</td> | ||
</tr> | ||
@@ -2645,3 +2659,3 @@ <tr> | ||
`string` Text that will be displayed on the resource when it is rendered. Default `''` | ||
`Content` Text that will be displayed on the resource when it is rendered. See [Content](#content). Default `''` | ||
</td> | ||
@@ -2652,12 +2666,2 @@ </tr> | ||
`titleHTML` | ||
</td> | ||
<td> | ||
`string` The HTML version of the title to be displayed instead of the text version. Default `''` | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
`eventBackgroundColor` | ||
@@ -2664,0 +2668,0 @@ </td> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102992
1071
2749
+ Added@event-calendar/core@2.5.1(transitive)
- Removed@event-calendar/core@2.4.1(transitive)
Updated@event-calendar/core@~2.5.0
Updatedsvelte@^4.2.8