New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@event-calendar/day-grid

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@event-calendar/day-grid - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

302

index.js

@@ -1,2 +0,2 @@

import { SvelteComponent, init, safe_not_equal, element, text, attr, insert, append, set_data, detach, space, noop, destroy_each, component_subscribe, create_slot, listen, is_function, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, run_all, set_store_value, binding_callbacks, action_destroyer, create_component, mount_component, destroy_component, stop_propagation, group_outros, check_outros, bubble, empty } from 'svelte/internal';
import { SvelteComponent, init, safe_not_equal, element, text, attr, insert, append, set_data, detach, space, noop, destroy_each, component_subscribe, create_slot, listen, is_function, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, run_all, set_store_value, binding_callbacks, create_component, mount_component, action_destroyer, group_outros, destroy_component, check_outros, stop_propagation, bubble, empty } from 'svelte/internal';
import { getContext, tick, createEventDispatcher, onMount, afterUpdate, setContext } from 'svelte';

@@ -105,3 +105,3 @@ import { derived, writable } from 'svelte/store';

attr(div2, "class", div2_class_value = "" + (/*$theme*/ ctx[0].header + " " + /*$theme*/ ctx[0].month + (/*$_scrollable*/ ctx[1]
attr(div2, "class", div2_class_value = "" + (/*$theme*/ ctx[0].header + (/*$_scrollable*/ ctx[1]
? ' ' + /*$theme*/ ctx[0].withScroll

@@ -153,3 +153,3 @@ : '')));

if (dirty & /*$theme, $_scrollable*/ 3 && div2_class_value !== (div2_class_value = "" + (/*$theme*/ ctx[0].header + " " + /*$theme*/ ctx[0].month + (/*$_scrollable*/ ctx[1]
if (dirty & /*$theme, $_scrollable*/ 3 && div2_class_value !== (div2_class_value = "" + (/*$theme*/ ctx[0].header + (/*$_scrollable*/ ctx[1]
? ' ' + /*$theme*/ ctx[0].withScroll

@@ -220,3 +220,3 @@ : '')))) {

attr(div1, "class", div1_class_value = "" + (/*$theme*/ ctx[1].body + " " + /*$theme*/ ctx[1].month + (/*$dayMaxEvents*/ ctx[2] === true
attr(div1, "class", div1_class_value = "" + (/*$theme*/ ctx[1].body + (/*$dayMaxEvents*/ ctx[2] === true
? ' ' + /*$theme*/ ctx[1].uniform

@@ -269,3 +269,3 @@ : '')));

if (!current || dirty & /*$theme, $dayMaxEvents*/ 6 && div1_class_value !== (div1_class_value = "" + (/*$theme*/ ctx[1].body + " " + /*$theme*/ ctx[1].month + (/*$dayMaxEvents*/ ctx[2] === true
if (!current || dirty & /*$theme, $dayMaxEvents*/ 6 && div1_class_value !== (div1_class_value = "" + (/*$theme*/ ctx[1].body + (/*$dayMaxEvents*/ ctx[2] === true
? ' ' + /*$theme*/ ctx[1].uniform

@@ -412,32 +412,61 @@ : '')))) {

function create_fragment$4(ctx) {
let div;
let div1;
let div0;
let setContent_action;
let t;
let switch_instance;
let current;
let mounted;
let dispose;
var switch_value = /*$_interaction*/ ctx[6].resizer;
function switch_props(ctx) {
return { props: { event: /*event*/ ctx[0] } };
}
if (switch_value) {
switch_instance = new switch_value(switch_props(ctx));
switch_instance.$on("pointerdown", /*createDragHandler*/ ctx[29](true));
}
return {
c() {
div = element("div");
attr(div, "class", /*classes*/ ctx[2]);
attr(div, "style", /*style*/ ctx[3]);
div1 = element("div");
div0 = element("div");
t = space();
if (switch_instance) create_component(switch_instance.$$.fragment);
attr(div1, "class", /*classes*/ ctx[2]);
attr(div1, "style", /*style*/ ctx[3]);
},
m(target, anchor) {
insert(target, div, anchor);
/*div_binding*/ ctx[44](div);
insert(target, div1, anchor);
append(div1, div0);
append(div1, t);
if (switch_instance) {
mount_component(switch_instance, div1, null);
}
/*div1_binding*/ ctx[45](div1);
current = true;
if (!mounted) {
dispose = [
listen(window, "resize", /*reposition*/ ctx[29]),
action_destroyer(setContent_action = setContent.call(null, div, /*content*/ ctx[4])),
listen(div, "click", function () {
if (is_function(/*createClickHandler*/ ctx[27](/*$eventClick*/ ctx[6], /*display*/ ctx[5]))) /*createClickHandler*/ ctx[27](/*$eventClick*/ ctx[6], /*display*/ ctx[5]).apply(this, arguments);
listen(window, "resize", /*reposition*/ ctx[30]),
action_destroyer(setContent_action = setContent.call(null, div0, /*content*/ ctx[4])),
listen(div1, "click", function () {
if (is_function(/*createClickHandler*/ ctx[28](/*$eventClick*/ ctx[7], /*display*/ ctx[5]))) /*createClickHandler*/ ctx[28](/*$eventClick*/ ctx[7], /*display*/ ctx[5]).apply(this, arguments);
}),
listen(div, "mouseenter", function () {
if (is_function(/*createHandler*/ ctx[26](/*$eventMouseEnter*/ ctx[7], /*display*/ ctx[5]))) /*createHandler*/ ctx[26](/*$eventMouseEnter*/ ctx[7], /*display*/ ctx[5]).apply(this, arguments);
listen(div1, "mouseenter", function () {
if (is_function(/*createHandler*/ ctx[27](/*$eventMouseEnter*/ ctx[8], /*display*/ ctx[5]))) /*createHandler*/ ctx[27](/*$eventMouseEnter*/ ctx[8], /*display*/ ctx[5]).apply(this, arguments);
}),
listen(div, "mouseleave", function () {
if (is_function(/*createHandler*/ ctx[26](/*$eventMouseLeave*/ ctx[8], /*display*/ ctx[5]))) /*createHandler*/ ctx[26](/*$eventMouseLeave*/ ctx[8], /*display*/ ctx[5]).apply(this, arguments);
listen(div1, "mouseleave", function () {
if (is_function(/*createHandler*/ ctx[27](/*$eventMouseLeave*/ ctx[9], /*display*/ ctx[5]))) /*createHandler*/ ctx[27](/*$eventMouseLeave*/ ctx[9], /*display*/ ctx[5]).apply(this, arguments);
}),
listen(div, "pointerdown", function () {
if (is_function(/*createPointerDownHandler*/ ctx[28](/*$_draggable*/ ctx[9], /*display*/ ctx[5], /*event*/ ctx[0]))) /*createPointerDownHandler*/ ctx[28](/*$_draggable*/ ctx[9], /*display*/ ctx[5], /*event*/ ctx[0]).apply(this, arguments);
listen(div1, "pointerdown", function () {
if (is_function(/*display*/ ctx[5] === 'auto' && /*$_draggable*/ ctx[10](/*event*/ ctx[0])
? /*createDragHandler*/ ctx[29]()
: undefined)) (/*display*/ ctx[5] === 'auto' && /*$_draggable*/ ctx[10](/*event*/ ctx[0])
? /*createDragHandler*/ ctx[29]()
: undefined).apply(this, arguments);
})

@@ -451,18 +480,52 @@ ];

ctx = new_ctx;
if (setContent_action && is_function(setContent_action.update) && dirty[0] & /*content*/ 16) setContent_action.update.call(null, /*content*/ ctx[4]);
const switch_instance_changes = {};
if (dirty[0] & /*event*/ 1) switch_instance_changes.event = /*event*/ ctx[0];
if (dirty[0] & /*classes*/ 4) {
attr(div, "class", /*classes*/ ctx[2]);
if (switch_value !== (switch_value = /*$_interaction*/ ctx[6].resizer)) {
if (switch_instance) {
group_outros();
const old_component = switch_instance;
transition_out(old_component.$$.fragment, 1, 0, () => {
destroy_component(old_component, 1);
});
check_outros();
}
if (switch_value) {
switch_instance = new switch_value(switch_props(ctx));
switch_instance.$on("pointerdown", /*createDragHandler*/ ctx[29](true));
create_component(switch_instance.$$.fragment);
transition_in(switch_instance.$$.fragment, 1);
mount_component(switch_instance, div1, null);
} else {
switch_instance = null;
}
} else if (switch_value) {
switch_instance.$set(switch_instance_changes);
}
if (dirty[0] & /*style*/ 8) {
attr(div, "style", /*style*/ ctx[3]);
if (!current || dirty[0] & /*classes*/ 4) {
attr(div1, "class", /*classes*/ ctx[2]);
}
if (setContent_action && is_function(setContent_action.update) && dirty[0] & /*content*/ 16) setContent_action.update.call(null, /*content*/ ctx[4]);
if (!current || dirty[0] & /*style*/ 8) {
attr(div1, "style", /*style*/ ctx[3]);
}
},
i: noop,
o: noop,
i(local) {
if (current) return;
if (switch_instance) transition_in(switch_instance.$$.fragment, local);
current = true;
},
o(local) {
if (switch_instance) transition_out(switch_instance.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) detach(div);
/*div_binding*/ ctx[44](null);
if (detaching) detach(div1);
if (switch_instance) destroy_component(switch_instance);
/*div1_binding*/ ctx[45](null);
mounted = false;

@@ -495,19 +558,19 @@ run_all(dispose);

let { dayMaxEvents, displayEventEnd, eventBackgroundColor, eventClick, eventColor, eventContent, eventDidMount, eventMouseEnter, eventMouseLeave, theme, _view, _intlEventTime, _interaction, _classes, _draggable } = getContext('state');
component_subscribe($$self, dayMaxEvents, value => $$invalidate(46, $dayMaxEvents = value));
component_subscribe($$self, displayEventEnd, value => $$invalidate(40, $displayEventEnd = value));
component_subscribe($$self, eventBackgroundColor, value => $$invalidate(43, $eventBackgroundColor = value));
component_subscribe($$self, eventClick, value => $$invalidate(6, $eventClick = value));
component_subscribe($$self, eventColor, value => $$invalidate(42, $eventColor = value));
component_subscribe($$self, eventContent, value => $$invalidate(39, $eventContent = value));
component_subscribe($$self, dayMaxEvents, value => $$invalidate(47, $dayMaxEvents = value));
component_subscribe($$self, displayEventEnd, value => $$invalidate(41, $displayEventEnd = value));
component_subscribe($$self, eventBackgroundColor, value => $$invalidate(44, $eventBackgroundColor = value));
component_subscribe($$self, eventClick, value => $$invalidate(7, $eventClick = value));
component_subscribe($$self, eventColor, value => $$invalidate(43, $eventColor = value));
component_subscribe($$self, eventContent, value => $$invalidate(40, $eventContent = value));
component_subscribe($$self, eventDidMount, value => $$invalidate(48, $eventDidMount = value));
component_subscribe($$self, eventMouseEnter, value => $$invalidate(7, $eventMouseEnter = value));
component_subscribe($$self, eventMouseLeave, value => $$invalidate(8, $eventMouseLeave = value));
component_subscribe($$self, theme, value => $$invalidate(38, $theme = value));
component_subscribe($$self, _view, value => $$invalidate(36, $_view = value));
component_subscribe($$self, _intlEventTime, value => $$invalidate(37, $_intlEventTime = value));
component_subscribe($$self, _interaction, value => $$invalidate(47, $_interaction = value));
component_subscribe($$self, _classes, value => $$invalidate(41, $_classes = value));
component_subscribe($$self, _draggable, value => $$invalidate(9, $_draggable = value));
component_subscribe($$self, eventMouseEnter, value => $$invalidate(8, $eventMouseEnter = value));
component_subscribe($$self, eventMouseLeave, value => $$invalidate(9, $eventMouseLeave = value));
component_subscribe($$self, theme, value => $$invalidate(39, $theme = value));
component_subscribe($$self, _view, value => $$invalidate(37, $_view = value));
component_subscribe($$self, _intlEventTime, value => $$invalidate(38, $_intlEventTime = value));
component_subscribe($$self, _interaction, value => $$invalidate(6, $_interaction = value));
component_subscribe($$self, _classes, value => $$invalidate(42, $_classes = value));
component_subscribe($$self, _draggable, value => $$invalidate(10, $_draggable = value));
let { _hiddenEvents } = getContext('view-state');
component_subscribe($$self, _hiddenEvents, value => $$invalidate(35, $_hiddenEvents = value));
component_subscribe($$self, _hiddenEvents, value => $$invalidate(36, $_hiddenEvents = value));
createEventDispatcher();

@@ -556,6 +619,4 @@ let el;

function createPointerDownHandler(draggable, display, event) {
return display === 'auto' && draggable(event)
? jsEvent => $_interaction.drag.startDayGrid(event, el, jsEvent, inPopup)
: undefined;
function createDragHandler(resize) {
return jsEvent => $_interaction.drag.startDayGrid(event, el, jsEvent, inPopup, resize);
}

@@ -568,3 +629,3 @@

$$invalidate(30, chunk.top = 0, chunk);
$$invalidate(31, chunk.top = 0, chunk);

@@ -579,6 +640,6 @@ if (chunk.prev) {

$$invalidate(30, chunk.top = chunk.prev.bottom + 1, chunk);
$$invalidate(31, chunk.top = chunk.prev.bottom + 1, chunk);
}
$$invalidate(30, chunk.bottom = chunk.top + height(el), chunk);
$$invalidate(31, chunk.bottom = chunk.top + height(el), chunk);
let m = 1;

@@ -599,4 +660,4 @@ let key = chunk.date.getTime();

m += offset;
$$invalidate(30, chunk.top += offset, chunk);
$$invalidate(30, chunk.bottom += offset, chunk);
$$invalidate(31, chunk.top += offset, chunk);
$$invalidate(31, chunk.bottom += offset, chunk);
}

@@ -606,6 +667,8 @@ }

$$invalidate(33, margin = m);
$$invalidate(34, margin = m);
if ($dayMaxEvents === true) {
hide();
} else {
$$invalidate(35, hidden = false);
}

@@ -621,3 +684,3 @@ }

let h = height(dayEl) - height(dayEl.firstElementChild) - footHeight(dayEl);
$$invalidate(34, hidden = chunk.bottom > h);
$$invalidate(35, hidden = chunk.bottom > h);
cloneDate(chunk.date);

@@ -665,3 +728,3 @@ let update = false;

function div_binding($$value) {
function div1_binding($$value) {
binding_callbacks[$$value ? 'unshift' : 'push'](() => {

@@ -674,13 +737,13 @@ el = $$value;

$$self.$$set = $$props => {
if ('chunk' in $$props) $$invalidate(30, chunk = $$props.chunk);
if ('longChunks' in $$props) $$invalidate(31, longChunks = $$props.longChunks);
if ('inPopup' in $$props) $$invalidate(32, inPopup = $$props.inPopup);
if ('chunk' in $$props) $$invalidate(31, chunk = $$props.chunk);
if ('longChunks' in $$props) $$invalidate(32, longChunks = $$props.longChunks);
if ('inPopup' in $$props) $$invalidate(33, inPopup = $$props.inPopup);
};
$$self.$$.update = () => {
if ($$self.$$.dirty[0] & /*chunk*/ 1073741824) {
if ($$self.$$.dirty[1] & /*chunk*/ 1) {
$$invalidate(0, event = chunk.event);
}
if ($$self.$$.dirty[0] & /*event, chunk, style*/ 1073741833 | $$self.$$.dirty[1] & /*$eventBackgroundColor, $eventColor, margin, hidden, $_classes, $theme*/ 7308) {
if ($$self.$$.dirty[0] & /*event, style*/ 9 | $$self.$$.dirty[1] & /*$eventBackgroundColor, $eventColor, chunk, margin, hidden, $_classes, $theme*/ 14617) {
{

@@ -706,3 +769,3 @@ $$invalidate(5, display = event.display);

if ($$self.$$.dirty[0] & /*chunk*/ 1073741824 | $$self.$$.dirty[1] & /*$displayEventEnd, $eventContent, $theme, $_intlEventTime, $_view*/ 992) {
if ($$self.$$.dirty[1] & /*chunk, $displayEventEnd, $eventContent, $theme, $_intlEventTime, $_view*/ 1985) {
// Content

@@ -712,3 +775,3 @@ $$invalidate(4, [timeText, content] = createEventContent(chunk, $displayEventEnd, $eventContent, $theme, $_intlEventTime, $_view), content);

if ($$self.$$.dirty[1] & /*$_hiddenEvents*/ 16) {
if ($$self.$$.dirty[1] & /*$_hiddenEvents*/ 32) {
if ($_hiddenEvents) {

@@ -727,2 +790,3 @@ tick().then(reposition);

display,
$_interaction,
$eventClick,

@@ -750,3 +814,3 @@ $eventMouseEnter,

createClickHandler,
createPointerDownHandler,
createDragHandler,
reposition,

@@ -767,3 +831,3 @@ chunk,

$eventBackgroundColor,
div_binding
div1_binding
];

@@ -775,3 +839,3 @@ }

super();
init(this, options, instance$4, create_fragment$4, safe_not_equal, { chunk: 30, longChunks: 31, inPopup: 32 }, null, [-1, -1]);
init(this, options, instance$4, create_fragment$4, safe_not_equal, { chunk: 31, longChunks: 32, inPopup: 33 }, null, [-1, -1]);
}

@@ -1081,3 +1145,3 @@ }

// (110:1) {#if interactionChunks[1] && datesEqual(interactionChunks[1].date, date)}
// (110:1) {#if iChunks[1] && datesEqual(iChunks[1].date, date)}
function create_if_block_3(ctx) {

@@ -1088,7 +1152,4 @@ let div;

let current;
event = new Event({ props: { chunk: /*iChunks*/ ctx[2][1] } });
event = new Event({
props: { chunk: /*interactionChunks*/ ctx[2][1] }
});
return {

@@ -1107,3 +1168,3 @@ c() {

const event_changes = {};
if (dirty[0] & /*interactionChunks*/ 4) event_changes.chunk = /*interactionChunks*/ ctx[2][1];
if (dirty[0] & /*iChunks*/ 4) event_changes.chunk = /*iChunks*/ ctx[2][1];
event.$set(event_changes);

@@ -1131,3 +1192,3 @@

// (115:1) {#if interactionChunks[0] && datesEqual(interactionChunks[0].date, date)}
// (115:1) {#if iChunks[0] && datesEqual(iChunks[0].date, date)}
function create_if_block_2(ctx) {

@@ -1138,7 +1199,4 @@ let div;

let current;
event = new Event({ props: { chunk: /*iChunks*/ ctx[2][0] } });
event = new Event({
props: { chunk: /*interactionChunks*/ ctx[2][0] }
});
return {

@@ -1157,3 +1215,3 @@ c() {

const event_changes = {};
if (dirty[0] & /*interactionChunks*/ 4) event_changes.chunk = /*interactionChunks*/ ctx[2][0];
if (dirty[0] & /*iChunks*/ 4) event_changes.chunk = /*iChunks*/ ctx[2][0];
event.$set(event_changes);

@@ -1292,5 +1350,5 @@

let t1;
let show_if_2 = /*interactionChunks*/ ctx[2][1] && datesEqual(/*interactionChunks*/ ctx[2][1].date, /*date*/ ctx[0]);
let show_if_2 = /*iChunks*/ ctx[2][1] && datesEqual(/*iChunks*/ ctx[2][1].date, /*date*/ ctx[0]);
let t2;
let show_if_1 = /*interactionChunks*/ ctx[2][0] && datesEqual(/*interactionChunks*/ ctx[2][0].date, /*date*/ ctx[0]);
let show_if_1 = /*iChunks*/ ctx[2][0] && datesEqual(/*iChunks*/ ctx[2][0].date, /*date*/ ctx[0]);
let t3;

@@ -1402,3 +1460,3 @@ let div1;

if (dirty[0] & /*interactionChunks, date*/ 5) show_if_2 = /*interactionChunks*/ ctx[2][1] && datesEqual(/*interactionChunks*/ ctx[2][1].date, /*date*/ ctx[0]);
if (dirty[0] & /*iChunks, date*/ 5) show_if_2 = /*iChunks*/ ctx[2][1] && datesEqual(/*iChunks*/ ctx[2][1].date, /*date*/ ctx[0]);

@@ -1409,3 +1467,3 @@ if (show_if_2) {

if (dirty[0] & /*interactionChunks, date*/ 5) {
if (dirty[0] & /*iChunks, date*/ 5) {
transition_in(if_block0, 1);

@@ -1429,3 +1487,3 @@ }

if (dirty[0] & /*interactionChunks, date*/ 5) show_if_1 = /*interactionChunks*/ ctx[2][0] && datesEqual(/*interactionChunks*/ ctx[2][0].date, /*date*/ ctx[0]);
if (dirty[0] & /*iChunks, date*/ 5) show_if_1 = /*iChunks*/ ctx[2][0] && datesEqual(/*iChunks*/ ctx[2][0].date, /*date*/ ctx[0]);

@@ -1436,3 +1494,3 @@ if (show_if_1) {

if (dirty[0] & /*interactionChunks, date*/ 5) {
if (dirty[0] & /*iChunks, date*/ 5) {
transition_in(if_block1, 1);

@@ -1592,3 +1650,3 @@ }

let { longChunks } = $$props;
let { interactionChunks = [] } = $$props;
let { iChunks = [] } = $$props;
let { date: currentDate, dateClick, dayMaxEvents, highlightedDates, moreLinkContent, theme, _view, _interaction } = getContext('state');

@@ -1655,3 +1713,3 @@ component_subscribe($$self, currentDate, value => $$invalidate(30, $currentDate = value));

if ('longChunks' in $$props) $$invalidate(1, longChunks = $$props.longChunks);
if ('interactionChunks' in $$props) $$invalidate(2, interactionChunks = $$props.interactionChunks);
if ('iChunks' in $$props) $$invalidate(2, iChunks = $$props.iChunks);
};

@@ -1716,3 +1774,3 @@

longChunks,
interactionChunks,
iChunks,
dayChunks,

@@ -1764,3 +1822,3 @@ hiddenEvents,

longChunks: 1,
interactionChunks: 2
iChunks: 2
},

@@ -1791,3 +1849,3 @@ null,

longChunks: /*longChunks*/ ctx[2],
interactionChunks: /*interactionChunks*/ ctx[3]
iChunks: /*iChunks*/ ctx[3]
}

@@ -1809,3 +1867,3 @@ });

if (dirty & /*longChunks*/ 4) day_changes.longChunks = /*longChunks*/ ctx[2];
if (dirty & /*interactionChunks*/ 8) day_changes.interactionChunks = /*interactionChunks*/ ctx[3];
if (dirty & /*iChunks*/ 8) day_changes.iChunks = /*iChunks*/ ctx[3];
day.$set(day_changes);

@@ -1863,3 +1921,3 @@ },

p(ctx, [dirty]) {
if (dirty & /*dates, chunks, longChunks, interactionChunks*/ 15) {
if (dirty & /*dates, chunks, longChunks, iChunks*/ 15) {
each_value = /*dates*/ ctx[0];

@@ -1922,12 +1980,12 @@ let i;

let $hiddenDays;
let $_interactionEvents;
let $_iEvents;
let $_events;
let $theme;
let { dates } = $$props;
let { _events, _interactionEvents, hiddenDays, theme } = getContext('state');
let { _events, _iEvents, hiddenDays, theme } = getContext('state');
component_subscribe($$self, _events, value => $$invalidate(13, $_events = value));
component_subscribe($$self, _interactionEvents, value => $$invalidate(12, $_interactionEvents = value));
component_subscribe($$self, _iEvents, value => $$invalidate(12, $_iEvents = value));
component_subscribe($$self, hiddenDays, value => $$invalidate(11, $hiddenDays = value));
component_subscribe($$self, theme, value => $$invalidate(4, $theme = value));
let chunks, longChunks, interactionChunks = [];
let chunks, longChunks, iChunks = [];
let start;

@@ -1967,4 +2025,4 @@ let end;

if ($$self.$$.dirty & /*$_interactionEvents, start, end, $hiddenDays*/ 7680) {
$$invalidate(3, interactionChunks = $_interactionEvents.map(event => {
if ($$self.$$.dirty & /*$_iEvents, start, end, $hiddenDays*/ 7680) {
$$invalidate(3, iChunks = $_iEvents.map(event => {
let chunk;

@@ -1988,6 +2046,6 @@

longChunks,
interactionChunks,
iChunks,
$theme,
_events,
_interactionEvents,
_iEvents,
hiddenDays,

@@ -1998,3 +2056,3 @@ theme,

$hiddenDays,
$_interactionEvents,
$_iEvents,
$_events

@@ -2015,11 +2073,11 @@ ];

const child_ctx = ctx.slice();
child_ctx[10] = list[i];
child_ctx[14] = list[i];
return child_ctx;
}
// (34:1) {#each weeks as dates}
// (37:1) {#each weeks as dates}
function create_each_block(ctx) {
let week;
let current;
week = new Week({ props: { dates: /*dates*/ ctx[10] } });
week = new Week({ props: { dates: /*dates*/ ctx[14] } });

@@ -2036,3 +2094,3 @@ return {

const week_changes = {};
if (dirty & /*weeks*/ 1) week_changes.dates = /*dates*/ ctx[10];
if (dirty & /*weeks*/ 1) week_changes.dates = /*dates*/ ctx[14];
week.$set(week_changes);

@@ -2055,3 +2113,3 @@ },

// (33:0) <Body>
// (36:0) <Body>
function create_default_slot(ctx) {

@@ -2169,3 +2227,3 @@ let each_1_anchor;

if (dirty & /*$$scope, weeks*/ 8193) {
if (dirty & /*$$scope, weeks*/ 131073) {
body_changes.$$scope = { dirty, ctx };

@@ -2197,11 +2255,16 @@ }

let $_viewDates;
let $dayMaxEvents;
let $_hiddenEvents;
let $hiddenDays;
let { _viewDates, hiddenDays, theme } = getContext('state');
component_subscribe($$self, _viewDates, value => $$invalidate(5, $_viewDates = value));
component_subscribe($$self, hiddenDays, value => $$invalidate(6, $hiddenDays = value));
let $_viewClass;
let { _viewDates, _viewClass, dayMaxEvents, hiddenDays, theme } = getContext('state');
component_subscribe($$self, _viewDates, value => $$invalidate(7, $_viewDates = value));
component_subscribe($$self, _viewClass, value => $$invalidate(11, $_viewClass = value));
component_subscribe($$self, dayMaxEvents, value => $$invalidate(8, $dayMaxEvents = value));
component_subscribe($$self, hiddenDays, value => $$invalidate(9, $hiddenDays = value));
let state = new State(getContext('state'));
setContext('view-state', state);
let { _hiddenEvents } = state;
component_subscribe($$self, _hiddenEvents, value => $$invalidate(7, $_hiddenEvents = value));
component_subscribe($$self, _hiddenEvents, value => $$invalidate(10, $_hiddenEvents = value));
set_store_value(_viewClass, $_viewClass = 'month', $_viewClass);
let weeks;

@@ -2211,6 +2274,6 @@ let days;

$$self.$$.update = () => {
if ($$self.$$.dirty & /*$hiddenDays, $_viewDates, days, weeks*/ 113) {
if ($$self.$$.dirty & /*$hiddenDays, $dayMaxEvents, $_viewDates, days, weeks*/ 961) {
{
$$invalidate(0, weeks = []);
$$invalidate(4, days = 7 - $hiddenDays.length);
$$invalidate(6, days = 7 - $hiddenDays.length);
set_store_value(_hiddenEvents, $_hiddenEvents = {}, $_hiddenEvents);

@@ -2231,3 +2294,14 @@

return [weeks, _viewDates, hiddenDays, _hiddenEvents, days, $_viewDates, $hiddenDays];
return [
weeks,
_viewDates,
_viewClass,
dayMaxEvents,
hiddenDays,
_hiddenEvents,
days,
$_viewDates,
$dayMaxEvents,
$hiddenDays
];
}

@@ -2234,0 +2308,0 @@

{
"name": "@event-calendar/day-grid",
"version": "0.9.0",
"version": "0.10.0",
"title": "Event Calendar DayGrid plugin",

@@ -18,2 +18,12 @@ "description": "Full-sized drag & drop event calendar with resource view",

},
"funding": [
{
"type": "paypal_$10",
"url": "https://paypal.me/vkurko/10usd"
},
{
"type": "paypal_$1",
"url": "https://paypal.me/vkurko/1usd"
}
],
"license": "MIT",

@@ -27,5 +37,5 @@ "type": "module",

"dependencies": {
"@event-calendar/common": "~0.9.0",
"@event-calendar/common": "~0.10.0",
"svelte": "^3.46.6"
}
}

@@ -1,2 +0,2 @@

# Event Calendar [![](https://data.jsdelivr.com/v1/package/npm/@event-calendar/build/badge)](https://www.jsdelivr.com/package/npm/@event-calendar/build)
# Event Calendar [![](https://data.jsdelivr.com/v1/package/npm/@event-calendar/build/badge)](https://www.jsdelivr.com/package/npm/@event-calendar/build) [![Donate](https://img.shields.io/badge/Donate_$10-PayPal-green.svg)](https://www.paypal.me/vkurko/10usd) [![Donate](https://img.shields.io/badge/Donate_$1-PayPal-green.svg)](https://www.paypal.me/vkurko/1usd)

@@ -41,9 +41,13 @@ See [demo](https://vkurko.github.io/calendar/).

- [eventDragMinDistance](#eventdragmindistance)
- [eventDragStart](#eventdragstart)
</td><td>
- [eventDragStart](#eventdragstart)
- [eventDragStop](#eventdragstop)
- [eventDrop](#eventdrop)
- [eventDurationEditable](#eventdurationeditable)
- [eventMouseEnter](#eventmouseenter)
- [eventMouseLeave](#eventmouseleave)
- [eventResize](#eventresize)
- [eventResizeStart](#eventresizestart)
- [eventResizeStop](#eventresizestop)
- [eventSources](#eventsources)

@@ -61,6 +65,6 @@ - [eventStartEditable](#eventstarteditable)

- [listDayFormat](#listdayformat)
</td><td>
- [listDaySideFormat](#listdaysideformat)
- [loading](#loading)
</td><td>
- [locale](#locale)

@@ -427,3 +431,3 @@ - [monthMode](#monthmode)

Currently, only **dragging** is supported. See [eventStartEditable](#eventstarteditable).
If you don't need both, use the more specific [eventStartEditable](#eventstarteditable) and [eventDurationEditable](#eventdurationeditable) instead.

@@ -684,3 +688,3 @@ ### events

It is triggered after the event’s information has been modified and after the [eventDragStop](#eventdrop) callback has been triggered.
It is triggered after the event’s information has been modified and after the [eventDragStop](#eventdragstop) callback has been triggered.

@@ -771,2 +775,8 @@ ```js

### eventDurationEditable
- Type `boolean`
- Default `true`
Determines whether calendar events can be resized.
### eventMouseEnter

@@ -866,2 +876,156 @@ - Type `function`

### eventResize
- Type `function`
- Default `undefined`
Callback function that is triggered when resizing stops, and the duration of the event has changed.
It is triggered after the event’s information has been modified and after the [eventResizeStop](#eventresizestop) callback has been triggered.
```js
function (info) { }
```
`info` is an object with the following properties:
<table>
<tr>
<td>
`event`
</td>
<td>
The associated [Event](#event-object) object
</td>
</tr>
<tr>
<td>
`oldEvent`
</td>
<td>
An [Event](#event-object) object that holds information about the event before the resize
</td>
</tr>
<tr>
<td>
`endDelta`
</td>
<td>
A [Duration](#duration-object) object that represents the amount of time the event’s end date was moved by
</td>
</tr>
<tr>
<td>
`revert`
</td>
<td>
A function that, if called, reverts the event’s end date to the values before the resize
</td>
</tr>
<tr>
<td>
`jsEvent`
</td>
<td>JavaScript native event object with low-level information such as click coordinates</td>
</tr>
<tr>
<td>
`view`
</td>
<td>
The current [View](#view-object) object
</td>
</tr>
</table>
### eventResizeStart
- Type `function`
- Default `undefined`
Callback function that is triggered when the event resizing begins.
```js
function (info) { }
```
`info` is an object with the following properties:
<table>
<tr>
<td>
`event`
</td>
<td>
The associated [Event](#event-object) object
</td>
</tr>
<tr>
<td>
`jsEvent`
</td>
<td>JavaScript native event object with low-level information such as click coordinates</td>
</tr>
<tr>
<td>
`view`
</td>
<td>
The current [View](#view-object) object
</td>
</tr>
</table>
### eventResizeStop
- Type `function`
- Default `undefined`
Callback function that is triggered when the event resizing stops.
It is triggered before the event’s information has been modified (if duration is changed) and before the [eventResize](#eventresize) callback is triggered.
```js
function (info) { }
```
`info` is an object with the following properties:
<table>
<tr>
<td>
`event`
</td>
<td>
The associated [Event](#event-object) object
</td>
</tr>
<tr>
<td>
`jsEvent`
</td>
<td>JavaScript native event object with low-level information such as click coordinates</td>
</tr>
<tr>
<td>
`view`
</td>
<td>
The current [View](#view-object) object
</td>
</tr>
</table>
### eventSources

@@ -1337,3 +1501,3 @@ - Type `EventSource[]`

- Type `object` or `function`
- Default `{active: 'ec-active', bgEvent: 'ec-bg-event', bgEvents: 'ec-bg-events', body: 'ec-body', button: 'ec-button', buttonGroup: 'ec-button-group', calendar: 'ec', compact: 'ec-compact', content: 'ec-content', day: 'ec-day', dayHead: 'ec-day-head', days: 'ec-days', event: 'ec-event', eventTime: 'ec-event-time', eventTitle: 'ec-event-title', events: 'ec-events', extra: 'ec-extra', handle: 'ec-handle', header: 'ec-header', hiddenScroll: 'ec-hidden-scroll', hiddenTimes: 'ec-hidden-times', highlight: 'ec-highlight', icon: 'ec-icon', line: 'ec-line', lines: 'ec-lines', nowIndicator: 'ec-now-indicator', otherMonth: 'ec-other-month', sidebar: 'ec-sidebar', today: 'ec-today', time: 'ec-time', title: 'ec-title', toolbar: 'ec-toolbar', week: 'ec-week', withScroll: 'ec-with-scroll', uniform: 'ec-uniform', dayFoot: 'ec-day-foot', month: 'ec-month', popup: 'ec-popup', daySide: 'ec-day-side', eventTag: 'ec-event-tag', list: 'ec-list', noEvents: 'ec-no-events', resource: 'ec-resource', resourceTitle: 'ec-resource-title', draggable: 'ec-draggable', ghost: 'ec-ghost', preview: 'ec-preview', pointer: 'ec-pointer'}`
- Default `{active: 'ec-active', bgEvent: 'ec-bg-event', bgEvents: 'ec-bg-events', body: 'ec-body', button: 'ec-button', buttonGroup: 'ec-button-group', calendar: 'ec', compact: 'ec-compact', content: 'ec-content', day: 'ec-day', dayHead: 'ec-day-head', days: 'ec-days', event: 'ec-event', eventBody: 'ec-event-body', eventTime: 'ec-event-time', eventTitle: 'ec-event-title', events: 'ec-events', extra: 'ec-extra', handle: 'ec-handle', header: 'ec-header', hiddenScroll: 'ec-hidden-scroll', hiddenTimes: 'ec-hidden-times', highlight: 'ec-highlight', icon: 'ec-icon', line: 'ec-line', lines: 'ec-lines', nowIndicator: 'ec-now-indicator', otherMonth: 'ec-other-month', sidebar: 'ec-sidebar', today: 'ec-today', time: 'ec-time', title: 'ec-title', toolbar: 'ec-toolbar', week: 'ec-week', withScroll: 'ec-with-scroll', uniform: 'ec-uniform', dayFoot: 'ec-day-foot', month: 'ec-month', popup: 'ec-popup', daySide: 'ec-day-side', eventTag: 'ec-event-tag', list: 'ec-list', noEvents: 'ec-no-events', resource: 'ec-resource', resourceTitle: 'ec-resource-title', draggable: 'ec-draggable', ghost: 'ec-ghost', preview: 'ec-preview', pointer: 'ec-pointer', resizer: 'ec-resizer', dragging: 'ec-dragging', resizingY: 'ec-resizing-y', resizingX: 'ec-resizing-x'}`

@@ -1578,2 +1742,12 @@ Defines the CSS classes that the Event Calendar uses to generate HTML markup.

`durationEditable`
</td>
<td>
Boolean (`true` or `false`) or `undefined`. The value overriding the [eventDurationEditable](#eventdurationeditable) setting for this specific event
</td>
</tr>
<tr>
<td>
`display`

@@ -1580,0 +1754,0 @@ </td>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc