Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@event-calendar/time-grid

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.5.0 to 0.6.0

355

index.js

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

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

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

const child_ctx = ctx.slice();
child_ctx[28] = list[i];
child_ctx[27] = list[i];
return child_ctx;

@@ -309,10 +309,10 @@ }

const child_ctx = ctx.slice();
child_ctx[31] = list[i];
child_ctx[30] = list[i];
return child_ctx;
}
// (42:3) {#each $_times as time}
// (40:3) {#each $_times as time}
function create_each_block_1$2(ctx) {
let div;
let t_value = /*time*/ ctx[31] + "";
let t_value = /*time*/ ctx[30] + "";
let t;

@@ -332,3 +332,3 @@ let div_class_value;

p(ctx, dirty) {
if (dirty[0] & /*$_times*/ 2 && t_value !== (t_value = /*time*/ ctx[31] + "")) set_data(t, t_value);
if (dirty[0] & /*$_times*/ 2 && t_value !== (t_value = /*time*/ ctx[30] + "")) set_data(t, t_value);

@@ -345,3 +345,3 @@ if (dirty[0] & /*$theme*/ 16 && div_class_value !== (div_class_value = /*$theme*/ ctx[4].time)) {

// (48:4) {#each lines as line}
// (46:4) {#each lines as line}
function create_each_block$2(ctx) {

@@ -460,4 +460,6 @@ let div;

dispose = [
listen(window, "resize", /*recheckScrollable*/ ctx[14]),
listen(div4, "scroll", /*handleScroll*/ ctx[15])
listen(window, "resize", /*recheckScrollable*/ ctx[15]),
listen(div4, "scroll", function () {
if (is_function(/*$_scroll*/ ctx[5])) /*$_scroll*/ ctx[5].apply(this, arguments);
})
];

@@ -468,3 +470,5 @@

},
p(ctx, dirty) {
p(new_ctx, dirty) {
ctx = new_ctx;
if (dirty[0] & /*$theme, $_times*/ 18) {

@@ -575,3 +579,2 @@ each_value_1 = /*$_times*/ ctx[1];

function instance$3($$self, $$props, $$invalidate) {
let $_interaction;
let $_scrollable;

@@ -585,4 +588,5 @@ let $slotDuration;

let $theme;
let $_scroll;
let { $$slots: slots = {}, $$scope } = $$props;
let { slotDuration, slotHeight, _intlSlotLabel, _viewDates, scrollTime, _scrollable, theme, _interaction } = getContext('state');
let { slotDuration, slotHeight, _intlSlotLabel, _viewDates, scrollTime, _scrollable, _scroll, theme } = getContext('state');
component_subscribe($$self, slotDuration, value => $$invalidate(17, $slotDuration = value));

@@ -592,5 +596,5 @@ component_subscribe($$self, slotHeight, value => $$invalidate(18, $slotHeight = value));

component_subscribe($$self, scrollTime, value => $$invalidate(19, $scrollTime = value));
component_subscribe($$self, _scrollable, value => $$invalidate(26, $_scrollable = value));
component_subscribe($$self, _scrollable, value => $$invalidate(25, $_scrollable = value));
component_subscribe($$self, _scroll, value => $$invalidate(5, $_scroll = value));
component_subscribe($$self, theme, value => $$invalidate(4, $theme = value));
component_subscribe($$self, _interaction, value => $$invalidate(25, $_interaction = value));
let { _slotTimeLimits, _times } = getContext('view-state');

@@ -608,8 +612,2 @@ component_subscribe($$self, _slotTimeLimits, value => $$invalidate(21, $_slotTimeLimits = value));

function handleScroll() {
if ($_interaction.drag) {
$_interaction.drag.handleScroll();
}
}
function div4_binding($$value) {

@@ -656,2 +654,3 @@ binding_callbacks[$$value ? 'unshift' : 'push'](() => {

$theme,
$_scroll,
slotDuration,

@@ -662,8 +661,7 @@ slotHeight,

_scrollable,
_scroll,
theme,
_interaction,
_slotTimeLimits,
_times,
recheckScrollable,
handleScroll,
timeLimitMin,

@@ -744,3 +742,3 @@ $slotDuration,

insert(target, div, anchor);
/*div_binding*/ ctx[38](div);
/*div_binding*/ ctx[42](div);

@@ -751,12 +749,12 @@ if (!mounted) {

listen(div, "click", function () {
if (is_function(/*createHandler*/ ctx[24](/*$eventClick*/ ctx[6], /*display*/ ctx[0]))) /*createHandler*/ ctx[24](/*$eventClick*/ ctx[6], /*display*/ ctx[0]).apply(this, arguments);
if (is_function(/*createHandler*/ ctx[27](/*$eventClick*/ ctx[6], /*display*/ ctx[1]))) /*createHandler*/ ctx[27](/*$eventClick*/ ctx[6], /*display*/ ctx[1]).apply(this, arguments);
}),
listen(div, "mouseenter", function () {
if (is_function(/*createHandler*/ ctx[24](/*$eventMouseEnter*/ ctx[7], /*display*/ ctx[0]))) /*createHandler*/ ctx[24](/*$eventMouseEnter*/ ctx[7], /*display*/ ctx[0]).apply(this, arguments);
if (is_function(/*createHandler*/ ctx[27](/*$eventMouseEnter*/ ctx[7], /*display*/ ctx[1]))) /*createHandler*/ ctx[27](/*$eventMouseEnter*/ ctx[7], /*display*/ ctx[1]).apply(this, arguments);
}),
listen(div, "mouseleave", function () {
if (is_function(/*createHandler*/ ctx[24](/*$eventMouseLeave*/ ctx[8], /*display*/ ctx[0]))) /*createHandler*/ ctx[24](/*$eventMouseLeave*/ ctx[8], /*display*/ ctx[0]).apply(this, arguments);
if (is_function(/*createHandler*/ ctx[27](/*$eventMouseLeave*/ ctx[8], /*display*/ ctx[1]))) /*createHandler*/ ctx[27](/*$eventMouseLeave*/ ctx[8], /*display*/ ctx[1]).apply(this, arguments);
}),
listen(div, "pointerdown", function () {
if (is_function(/*createDragStartHandler*/ ctx[25](/*$_interaction*/ ctx[1], /*display*/ ctx[0]))) /*createDragStartHandler*/ ctx[25](/*$_interaction*/ ctx[1], /*display*/ ctx[0]).apply(this, arguments);
if (is_function(/*createPointerDownHandler*/ ctx[28](/*$_draggable*/ ctx[9], /*display*/ ctx[1], /*event*/ ctx[0]))) /*createPointerDownHandler*/ ctx[28](/*$_draggable*/ ctx[9], /*display*/ ctx[1], /*event*/ ctx[0]).apply(this, arguments);
})

@@ -785,3 +783,3 @@ ];

if (detaching) detach(div);
/*div_binding*/ ctx[38](null);
/*div_binding*/ ctx[42](null);
mounted = false;

@@ -794,2 +792,3 @@ run_all(dispose);

function instance$2($$self, $$props, $$invalidate) {
let $_interaction;
let $_view;

@@ -801,3 +800,3 @@ let $eventDidMount;

let $displayEventEnd;
let $_interaction;
let $_classes;
let $eventColor;

@@ -811,22 +810,26 @@ let $eventBackgroundColor;

let $eventMouseLeave;
let $_draggable;
let { date } = $$props;
let { chunk } = $$props;
let { displayEventEnd, eventBackgroundColor, eventColor, eventContent, eventClick, eventDidMount, eventMouseEnter, eventMouseLeave, slotDuration, slotHeight, theme, _view, _intlEventTime, _interaction } = getContext('state');
component_subscribe($$self, displayEventEnd, value => $$invalidate(32, $displayEventEnd = value));
component_subscribe($$self, eventBackgroundColor, value => $$invalidate(34, $eventBackgroundColor = value));
component_subscribe($$self, eventColor, value => $$invalidate(33, $eventColor = value));
component_subscribe($$self, eventContent, value => $$invalidate(31, $eventContent = value));
let { displayEventEnd, eventBackgroundColor, eventColor, eventContent, eventClick, eventDidMount, eventMouseEnter, eventMouseLeave, slotDuration, slotHeight, theme, _view, _intlEventTime, _interaction, _classes, _draggable } = getContext('state');
component_subscribe($$self, displayEventEnd, value => $$invalidate(35, $displayEventEnd = value));
component_subscribe($$self, eventBackgroundColor, value => $$invalidate(38, $eventBackgroundColor = value));
component_subscribe($$self, eventColor, value => $$invalidate(37, $eventColor = value));
component_subscribe($$self, eventContent, value => $$invalidate(34, $eventContent = value));
component_subscribe($$self, eventClick, value => $$invalidate(6, $eventClick = value));
component_subscribe($$self, eventDidMount, value => $$invalidate(40, $eventDidMount = value));
component_subscribe($$self, eventDidMount, value => $$invalidate(45, $eventDidMount = value));
component_subscribe($$self, eventMouseEnter, value => $$invalidate(7, $eventMouseEnter = value));
component_subscribe($$self, eventMouseLeave, value => $$invalidate(8, $eventMouseLeave = value));
component_subscribe($$self, slotDuration, value => $$invalidate(37, $slotDuration = value));
component_subscribe($$self, slotHeight, value => $$invalidate(35, $slotHeight = value));
component_subscribe($$self, theme, value => $$invalidate(30, $theme = value));
component_subscribe($$self, _view, value => $$invalidate(28, $_view = value));
component_subscribe($$self, _intlEventTime, value => $$invalidate(29, $_intlEventTime = value));
component_subscribe($$self, _interaction, value => $$invalidate(1, $_interaction = value));
component_subscribe($$self, slotDuration, value => $$invalidate(41, $slotDuration = value));
component_subscribe($$self, slotHeight, value => $$invalidate(39, $slotHeight = value));
component_subscribe($$self, theme, value => $$invalidate(33, $theme = value));
component_subscribe($$self, _view, value => $$invalidate(31, $_view = value));
component_subscribe($$self, _intlEventTime, value => $$invalidate(32, $_intlEventTime = value));
component_subscribe($$self, _interaction, value => $$invalidate(44, $_interaction = value));
component_subscribe($$self, _classes, value => $$invalidate(36, $_classes = value));
component_subscribe($$self, _draggable, value => $$invalidate(9, $_draggable = value));
let { _slotTimeLimits, _viewResources } = getContext('view-state');
component_subscribe($$self, _slotTimeLimits, value => $$invalidate(36, $_slotTimeLimits = value));
component_subscribe($$self, _slotTimeLimits, value => $$invalidate(40, $_slotTimeLimits = value));
let el;
let event;
let display;

@@ -841,3 +844,3 @@ let classes;

$eventDidMount({
event: toEventWithLocalDates(chunk.event),
event: toEventWithLocalDates(event),
timeText,

@@ -853,3 +856,3 @@ el,

? jsEvent => fn({
event: toEventWithLocalDates(chunk.event),
event: toEventWithLocalDates(event),
el,

@@ -862,5 +865,5 @@ jsEvent,

function createDragStartHandler(interaction, display) {
return display === 'auto' && interaction.drag && interaction.drag.draggable(chunk.event)
? jsEvent => interaction.drag.startTimeGrid(chunk.event, el, jsEvent, _viewResources)
function createPointerDownHandler(draggable, display, event) {
return display === 'auto' && draggable(event)
? jsEvent => $_interaction.drag.startTimeGrid(event, el, jsEvent, _viewResources)
: undefined;

@@ -877,10 +880,14 @@ }

$$self.$$set = $$props => {
if ('date' in $$props) $$invalidate(26, date = $$props.date);
if ('chunk' in $$props) $$invalidate(27, chunk = $$props.chunk);
if ('date' in $$props) $$invalidate(29, date = $$props.date);
if ('chunk' in $$props) $$invalidate(30, chunk = $$props.chunk);
};
$$self.$$.update = () => {
if ($$self.$$.dirty[0] & /*chunk, date, style, display, $theme, $_interaction*/ 1275068435 | $$self.$$.dirty[1] & /*$slotDuration, $_slotTimeLimits, $slotHeight, $eventBackgroundColor, $eventColor*/ 124) {
if ($$self.$$.dirty[0] & /*chunk*/ 1073741824) {
$$invalidate(0, event = chunk.event);
}
if ($$self.$$.dirty[0] & /*event, chunk, date, style, display*/ 1610612755 | $$self.$$.dirty[1] & /*$slotDuration, $_slotTimeLimits, $slotHeight, $eventBackgroundColor, $eventColor, $_classes, $theme*/ 2020) {
{
$$invalidate(0, display = chunk.event.display);
$$invalidate(1, display = event.display);

@@ -896,3 +903,3 @@ // Style

let maxHeight = ($_slotTimeLimits.max.seconds / 60 - start) / step * $slotHeight;
let bgColor = chunk.event.backgroundColor || $eventBackgroundColor || $eventColor;
let bgColor = event.backgroundColor || $eventBackgroundColor || $eventColor;
$$invalidate(4, style = `top:${top}px;` + `min-height:${height}px;` + `height:${height}px;` + `max-height:${maxHeight}px;`);

@@ -909,11 +916,7 @@

// Class
let className = display === 'background' ? $theme.bgEvent : $theme.event;
$$invalidate(3, classes = $_interaction.drag && $_interaction.drag.draggable(chunk.event)
? $_interaction.drag.classes(display, className)
: className);
$$invalidate(3, classes = $_classes(display === 'background' ? $theme.bgEvent : $theme.event, event));
}
}
if ($$self.$$.dirty[0] & /*chunk, $theme, $_intlEventTime, $_view*/ 2013265920 | $$self.$$.dirty[1] & /*$displayEventEnd, $eventContent*/ 3) {
if ($$self.$$.dirty[0] & /*chunk*/ 1073741824 | $$self.$$.dirty[1] & /*$displayEventEnd, $eventContent, $theme, $_intlEventTime, $_view*/ 31) {
// Content

@@ -925,4 +928,4 @@ $$invalidate(5, [timeText, content] = createEventContent(chunk, $displayEventEnd, $eventContent, $theme, $_intlEventTime, $_view), content);

return [
event,
display,
$_interaction,
el,

@@ -935,2 +938,3 @@ classes,

$eventMouseLeave,
$_draggable,
displayEventEnd,

@@ -950,5 +954,7 @@ eventBackgroundColor,

_interaction,
_classes,
_draggable,
_slotTimeLimits,
createHandler,
createDragStartHandler,
createPointerDownHandler,
date,

@@ -961,2 +967,3 @@ chunk,

$displayEventEnd,
$_classes,
$eventColor,

@@ -974,3 +981,3 @@ $eventBackgroundColor,

super();
init(this, options, instance$2, create_fragment$2, safe_not_equal, { date: 26, chunk: 27 }, null, [-1, -1]);
init(this, options, instance$2, create_fragment$2, safe_not_equal, { date: 29, chunk: 30 }, null, [-1, -1]);
}

@@ -983,3 +990,3 @@ }

const child_ctx = ctx.slice();
child_ctx[32] = list[i];
child_ctx[35] = list[i];
return child_ctx;

@@ -990,7 +997,7 @@ }

const child_ctx = ctx.slice();
child_ctx[32] = list[i];
child_ctx[35] = list[i];
return child_ctx;
}
// (96:2) {#each bgChunks as chunk}
// (105:2) {#each bgChunks as chunk}
function create_each_block_1$1(ctx) {

@@ -1003,3 +1010,3 @@ let event;

date: /*date*/ ctx[0],
chunk: /*chunk*/ ctx[32]
chunk: /*chunk*/ ctx[35]
}

@@ -1019,3 +1026,3 @@ });

if (dirty[0] & /*date*/ 1) event_changes.date = /*date*/ ctx[0];
if (dirty[0] & /*bgChunks*/ 4) event_changes.chunk = /*chunk*/ ctx[32];
if (dirty[0] & /*bgChunks*/ 4) event_changes.chunk = /*chunk*/ ctx[35];
event.$set(event_changes);

@@ -1038,3 +1045,44 @@ },

// (101:2) {#each chunks as chunk}
// (111:2) {#if interactionChunks[1]}
function create_if_block_1(ctx) {
let event;
let current;
event = new Event({
props: {
date: /*date*/ ctx[0],
chunk: /*interactionChunks*/ ctx[4][1]
}
});
return {
c() {
create_component(event.$$.fragment);
},
m(target, anchor) {
mount_component(event, target, anchor);
current = true;
},
p(ctx, dirty) {
const event_changes = {};
if (dirty[0] & /*date*/ 1) event_changes.date = /*date*/ ctx[0];
if (dirty[0] & /*interactionChunks*/ 16) event_changes.chunk = /*interactionChunks*/ ctx[4][1];
event.$set(event_changes);
},
i(local) {
if (current) return;
transition_in(event.$$.fragment, local);
current = true;
},
o(local) {
transition_out(event.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(event, detaching);
}
};
}
// (114:2) {#each chunks as chunk}
function create_each_block$1(ctx) {

@@ -1047,3 +1095,3 @@ let event;

date: /*date*/ ctx[0],
chunk: /*chunk*/ ctx[32]
chunk: /*chunk*/ ctx[35]
}

@@ -1063,3 +1111,3 @@ });

if (dirty[0] & /*date*/ 1) event_changes.date = /*date*/ ctx[0];
if (dirty[0] & /*chunks*/ 2) event_changes.chunk = /*chunk*/ ctx[32];
if (dirty[0] & /*chunks*/ 2) event_changes.chunk = /*chunk*/ ctx[35];
event.$set(event_changes);

@@ -1082,3 +1130,3 @@ },

// (104:2) {#if dragChunk}
// (118:2) {#if interactionChunks[0]}
function create_if_block(ctx) {

@@ -1091,3 +1139,3 @@ let event;

date: /*date*/ ctx[0],
chunk: /*dragChunk*/ ctx[4]
chunk: /*interactionChunks*/ ctx[4][0]
}

@@ -1107,3 +1155,3 @@ });

if (dirty[0] & /*date*/ 1) event_changes.date = /*date*/ ctx[0];
if (dirty[0] & /*dragChunk*/ 16) event_changes.chunk = /*dragChunk*/ ctx[4];
if (dirty[0] & /*interactionChunks*/ 16) event_changes.chunk = /*interactionChunks*/ ctx[4][0];
event.$set(event_changes);

@@ -1133,2 +1181,3 @@ },

let t1;
let t2;
let div1_class_value;

@@ -1150,2 +1199,3 @@ let div2_class_value;

let if_block0 = /*interactionChunks*/ ctx[4][1] && create_if_block_1(ctx);
let each_value = /*chunks*/ ctx[1];

@@ -1162,3 +1212,3 @@ let each_blocks = [];

let if_block = /*dragChunk*/ ctx[4] && create_if_block(ctx);
let if_block1 = /*interactionChunks*/ ctx[4][0] && create_if_block(ctx);

@@ -1176,2 +1226,4 @@ return {

div1 = element("div");
if (if_block0) if_block0.c();
t1 = space();

@@ -1182,4 +1234,4 @@ for (let i = 0; i < each_blocks.length; i += 1) {

t1 = space();
if (if_block) if_block.c();
t2 = space();
if (if_block1) if_block1.c();
attr(div0, "class", div0_class_value = /*$theme*/ ctx[7].bgEvents);

@@ -1202,2 +1254,4 @@ attr(div1, "class", div1_class_value = /*$theme*/ ctx[7].events);

append(div2, div1);
if (if_block0) if_block0.m(div1, null);
append(div1, t1);

@@ -1208,11 +1262,19 @@ for (let i = 0; i < each_blocks.length; i += 1) {

append(div1, t1);
if (if_block) if_block.m(div1, null);
/*div2_binding*/ ctx[26](div2);
append(div1, t2);
if (if_block1) if_block1.m(div1, null);
/*div2_binding*/ ctx[29](div2);
current = true;
if (!mounted) {
dispose = listen(div2, "click", function () {
if (is_function(/*createClickHandler*/ ctx[18](/*$dateClick*/ ctx[8]))) /*createClickHandler*/ ctx[18](/*$dateClick*/ ctx[8]).apply(this, arguments);
});
dispose = [
listen(div2, "click", function () {
if (is_function(/*createClickHandler*/ ctx[20](/*$dateClick*/ ctx[8]))) /*createClickHandler*/ ctx[20](/*$dateClick*/ ctx[8]).apply(this, arguments);
}),
listen(div2, "pointerenter", function () {
if (is_function(/*createPointerEnterHandler*/ ctx[21](/*$_interaction*/ ctx[9]))) /*createPointerEnterHandler*/ ctx[21](/*$_interaction*/ ctx[9]).apply(this, arguments);
}),
listen(div2, "pointerleave", function () {
if (is_function(createPointerLeaveHandler(/*$_interaction*/ ctx[9]))) createPointerLeaveHandler(/*$_interaction*/ ctx[9]).apply(this, arguments);
})
];

@@ -1256,2 +1318,25 @@ mounted = true;

if (/*interactionChunks*/ ctx[4][1]) {
if (if_block0) {
if_block0.p(ctx, dirty);
if (dirty[0] & /*interactionChunks*/ 16) {
transition_in(if_block0, 1);
}
} else {
if_block0 = create_if_block_1(ctx);
if_block0.c();
transition_in(if_block0, 1);
if_block0.m(div1, t1);
}
} else if (if_block0) {
group_outros();
transition_out(if_block0, 1, 1, () => {
if_block0 = null;
});
check_outros();
}
if (dirty[0] & /*date, chunks*/ 3) {

@@ -1271,3 +1356,3 @@ each_value = /*chunks*/ ctx[1];

transition_in(each_blocks[i], 1);
each_blocks[i].m(div1, t1);
each_blocks[i].m(div1, t2);
}

@@ -1285,20 +1370,20 @@ }

if (/*dragChunk*/ ctx[4]) {
if (if_block) {
if_block.p(ctx, dirty);
if (/*interactionChunks*/ ctx[4][0]) {
if (if_block1) {
if_block1.p(ctx, dirty);
if (dirty[0] & /*dragChunk*/ 16) {
transition_in(if_block, 1);
if (dirty[0] & /*interactionChunks*/ 16) {
transition_in(if_block1, 1);
}
} else {
if_block = create_if_block(ctx);
if_block.c();
transition_in(if_block, 1);
if_block.m(div1, null);
if_block1 = create_if_block(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div1, null);
}
} else if (if_block) {
} else if (if_block1) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});

@@ -1326,2 +1411,4 @@

transition_in(if_block0);
for (let i = 0; i < each_value.length; i += 1) {

@@ -1331,3 +1418,3 @@ transition_in(each_blocks[i]);

transition_in(if_block);
transition_in(if_block1);
current = true;

@@ -1342,2 +1429,3 @@ },

transition_out(if_block0);
each_blocks = each_blocks.filter(Boolean);

@@ -1349,3 +1437,3 @@

transition_out(if_block);
transition_out(if_block1);
current = false;

@@ -1356,7 +1444,8 @@ },

destroy_each(each_blocks_1, detaching);
if (if_block0) if_block0.d();
destroy_each(each_blocks, detaching);
if (if_block) if_block.d();
/*div2_binding*/ ctx[26](null);
if (if_block1) if_block1.d();
/*div2_binding*/ ctx[29](null);
mounted = false;
dispose();
run_all(dispose);
}

@@ -1366,2 +1455,8 @@ };

function createPointerLeaveHandler(interaction) {
return interaction.pointer
? interaction.pointer.leave
: undefined;
}
function instance$1($$self, $$props, $$invalidate) {

@@ -1373,21 +1468,23 @@ let $_view;

let $highlightedDates;
let $_dragEvent;
let $_interactionEvents;
let $_events;
let $theme;
let $dateClick;
let $_interaction;
let { date } = $$props;
let { resource = undefined } = $$props;
let { _events, _dragEvent, dateClick, highlightedDates, slotDuration, slotHeight, _view, theme } = getContext('state');
component_subscribe($$self, _events, value => $$invalidate(25, $_events = value));
component_subscribe($$self, _dragEvent, value => $$invalidate(24, $_dragEvent = value));
let { _events, _interactionEvents, dateClick, highlightedDates, slotDuration, slotHeight, _view, theme, _interaction } = getContext('state');
component_subscribe($$self, _events, value => $$invalidate(28, $_events = value));
component_subscribe($$self, _interactionEvents, value => $$invalidate(27, $_interactionEvents = value));
component_subscribe($$self, dateClick, value => $$invalidate(8, $dateClick = value));
component_subscribe($$self, highlightedDates, value => $$invalidate(23, $highlightedDates = value));
component_subscribe($$self, slotDuration, value => $$invalidate(28, $slotDuration = value));
component_subscribe($$self, slotHeight, value => $$invalidate(29, $slotHeight = value));
component_subscribe($$self, _view, value => $$invalidate(27, $_view = value));
component_subscribe($$self, highlightedDates, value => $$invalidate(26, $highlightedDates = value));
component_subscribe($$self, slotDuration, value => $$invalidate(31, $slotDuration = value));
component_subscribe($$self, slotHeight, value => $$invalidate(32, $slotHeight = value));
component_subscribe($$self, _view, value => $$invalidate(30, $_view = value));
component_subscribe($$self, theme, value => $$invalidate(7, $theme = value));
component_subscribe($$self, _interaction, value => $$invalidate(9, $_interaction = value));
let { _slotTimeLimits } = getContext('view-state');
component_subscribe($$self, _slotTimeLimits, value => $$invalidate(22, $_slotTimeLimits = value));
component_subscribe($$self, _slotTimeLimits, value => $$invalidate(25, $_slotTimeLimits = value));
let el;
let chunks, bgChunks, dragChunk;
let chunks, bgChunks, interactionChunks = [];
let today = setMidnight(createDate()), isToday, highlight;

@@ -1415,2 +1512,8 @@ let start, end;

function createPointerEnterHandler(interaction) {
return interaction.pointer
? jsEvent => interaction.pointer.enterTimeGrid(date, el, jsEvent, _slotTimeLimits, resource)
: undefined;
}
function intersects(event) {

@@ -1429,14 +1532,14 @@ return event.start < end && event.end > start && (resource === undefined || event.resourceIds.includes(resource.id));

if ('date' in $$props) $$invalidate(0, date = $$props.date);
if ('resource' in $$props) $$invalidate(19, resource = $$props.resource);
if ('resource' in $$props) $$invalidate(22, resource = $$props.resource);
};
$$self.$$.update = () => {
if ($$self.$$.dirty[0] & /*date, $_slotTimeLimits*/ 4194305) {
if ($$self.$$.dirty[0] & /*date, $_slotTimeLimits*/ 33554433) {
{
$$invalidate(20, start = addDuration(cloneDate(date), $_slotTimeLimits.min));
$$invalidate(21, end = addDuration(cloneDate(date), $_slotTimeLimits.max));
$$invalidate(23, start = addDuration(cloneDate(date), $_slotTimeLimits.min));
$$invalidate(24, end = addDuration(cloneDate(date), $_slotTimeLimits.max));
}
}
if ($$self.$$.dirty[0] & /*$_events, start, end, bgChunks, chunks*/ 36700166) {
if ($$self.$$.dirty[0] & /*$_events, start, end, bgChunks, chunks*/ 293601286) {
{

@@ -1464,12 +1567,9 @@ $$invalidate(1, chunks = []);

if ($$self.$$.dirty[0] & /*$_dragEvent, start, end*/ 19922944) {
// Drag & drop
if ($_dragEvent && intersects($_dragEvent)) {
$$invalidate(4, dragChunk = createEventChunk($_dragEvent, start, end));
} else {
$$invalidate(4, dragChunk = null);
}
if ($$self.$$.dirty[0] & /*$_interactionEvents, start, end*/ 159383552) {
$$invalidate(4, interactionChunks = $_interactionEvents.map(event => event && intersects(event)
? createEventChunk(event, start, end)
: null));
}
if ($$self.$$.dirty[0] & /*date, $highlightedDates*/ 8388609) {
if ($$self.$$.dirty[0] & /*date, $highlightedDates*/ 67108865) {
{

@@ -1487,3 +1587,3 @@ $$invalidate(5, isToday = datesEqual(date, today));

el,
dragChunk,
interactionChunks,
isToday,

@@ -1493,4 +1593,5 @@ highlight,

$dateClick,
$_interaction,
_events,
_dragEvent,
_interactionEvents,
dateClick,

@@ -1502,4 +1603,6 @@ highlightedDates,

theme,
_interaction,
_slotTimeLimits,
createClickHandler,
createPointerEnterHandler,
resource,

@@ -1510,3 +1613,3 @@ start,

$highlightedDates,
$_dragEvent,
$_interactionEvents,
$_events,

@@ -1520,3 +1623,3 @@ div2_binding

super();
init(this, options, instance$1, create_fragment$1, safe_not_equal, { date: 0, resource: 19 }, null, [-1, -1]);
init(this, options, instance$1, create_fragment$1, safe_not_equal, { date: 0, resource: 22 }, null, [-1, -1]);
}

@@ -1523,0 +1626,0 @@ }

{
"name": "@event-calendar/time-grid",
"version": "0.5.0",
"version": "0.6.0",
"title": "Event Calendar TimeGrid plugin",

@@ -20,5 +20,5 @@ "description": "Full-sized drag & drop event calendar with resource view",

"dependencies": {
"@event-calendar/common": "~0.5.0",
"@event-calendar/common": "~0.6.0",
"svelte": "^3.42.4"
}
}

@@ -66,2 +66,3 @@ # Event Calendar [![](https://data.jsdelivr.com/v1/package/npm/@event-calendar/build/badge)](https://www.jsdelivr.com/package/npm/@event-calendar/build)

- [noEventsContent](#noeventscontent)
- [pointer](#pointer)
- [resources](#resources)

@@ -1187,2 +1188,8 @@ - [scrollTime](#scrolltime)

### pointer
- Type `boolean`
- Default `false`
Enables mouse cursor pointer in `timeGrid`/`resourceTimeGrid` views.
### resources

@@ -1611,3 +1618,3 @@ - Type `Array`

`boolean` Overrides the master [eventDurationEditable](#eventstarteditable) option for this single event. Default `undefined`
`boolean` Overrides the master [eventStartEditable](#eventstarteditable) option for this single event. Default `undefined`
</td>

@@ -1614,0 +1621,0 @@ </tr>

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