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

@event-calendar/resource-time-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/resource-time-grid - npm Package Compare versions

Comparing version 0.19.0 to 1.0.0

180

index.js

@@ -1,4 +0,4 @@

import { SvelteComponent, init, safe_not_equal, element, attr, insert, action_destroyer, is_function, noop, detach, component_subscribe, binding_callbacks, create_component, space, mount_component, transition_in, group_outros, transition_out, check_outros, destroy_component, set_store_value, empty, destroy_each, append, text, set_data } from 'svelte/internal';
import { SvelteComponent, init, safe_not_equal, element, attr, insert, action_destroyer, is_function, noop, detach, component_subscribe, binding_callbacks, create_component, space, mount_component, append, transition_in, group_outros, transition_out, check_outros, destroy_component, set_store_value, empty, destroy_each, text, set_data } from 'svelte/internal';
import { getContext, onMount, setContext } from 'svelte';
import { State as State$1, Header, Body, Week, Day } from '@event-calendar/time-grid';
import { State as State$1, Section, Body, Week, Day } from '@event-calendar/time-grid';
import { derived } from 'svelte/store';

@@ -82,3 +82,3 @@

/* packages/resource-time-grid/src/Label.svelte generated by Svelte v3.55.1 */
/* packages/resource-time-grid/src/Label.svelte generated by Svelte v3.58.0 */

@@ -198,3 +198,3 @@ function create_fragment$1(ctx) {

/* packages/resource-time-grid/src/View.svelte generated by Svelte v3.55.1 */
/* packages/resource-time-grid/src/View.svelte generated by Svelte v3.58.0 */

@@ -243,3 +243,3 @@ function get_each_context(ctx, list, i) {

// (26:12) {:else}
// (27:16) {:else}
function create_else_block_2(ctx) {

@@ -278,3 +278,3 @@ let label;

// (24:12) {#if $datesAboveResources}
// (25:16) {#if $datesAboveResources}
function create_if_block_4(ctx) {

@@ -311,3 +311,3 @@ let div;

// (29:12) {#if loops[1].length > 1}
// (30:16) {#if loops[1].length > 1}
function create_if_block_2(ctx) {

@@ -342,3 +342,5 @@ let div;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
if (each_blocks[i]) {
each_blocks[i].m(div, null);
}
}

@@ -405,3 +407,3 @@

// (34:24) {:else}
// (35:28) {:else}
function create_else_block_1(ctx) {

@@ -438,3 +440,3 @@ let div;

// (32:24) {#if $datesAboveResources}
// (33:28) {#if $datesAboveResources}
function create_if_block_3(ctx) {

@@ -480,3 +482,3 @@ let label;

// (31:20) {#each loops[1] as item1}
// (32:24) {#each loops[1] as item1}
function create_each_block_6(ctx) {

@@ -551,3 +553,3 @@ let current_block_type_index;

// (22:4) {#each loops[0] as item0}
// (23:8) {#each loops[0] as item0}
function create_each_block_5(ctx) {

@@ -663,3 +665,3 @@ let div;

// (21:0) <Header>
// (22:4) <Section>
function create_default_slot_2(ctx) {

@@ -689,3 +691,5 @@ let each_1_anchor;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}

@@ -749,10 +753,16 @@

// (43:0) {#if $allDaySlot}
// (46:0) {#if $allDaySlot}
function create_if_block(ctx) {
let header;
let div2;
let div1;
let section;
let t;
let div0;
let div0_class_value;
let div1_class_value;
let div2_class_value;
let current;
header = new Header({
section = new Section({
props: {
allDay: true,
$$slots: { default: [create_default_slot_1] },

@@ -765,28 +775,52 @@ $$scope: { ctx }

c() {
create_component(header.$$.fragment);
div2 = element("div");
div1 = element("div");
create_component(section.$$.fragment);
t = space();
div0 = element("div");
attr(div0, "class", div0_class_value = /*$theme*/ ctx[4].hiddenScroll);
attr(div1, "class", div1_class_value = /*$theme*/ ctx[4].content);
attr(div2, "class", div2_class_value = /*$theme*/ ctx[4].allDay);
},
m(target, anchor) {
mount_component(header, target, anchor);
insert(target, div2, anchor);
append(div2, div1);
mount_component(section, div1, null);
append(div1, t);
append(div1, div0);
current = true;
},
p(ctx, dirty) {
const header_changes = {};
const section_changes = {};
if (dirty[0] & /*$_viewDates, $theme, $_viewResources, $datesAboveResources*/ 23 | dirty[1] & /*$$scope*/ 16) {
header_changes.$$scope = { dirty, ctx };
section_changes.$$scope = { dirty, ctx };
}
header.$set(header_changes);
section.$set(section_changes);
if (!current || dirty[0] & /*$theme*/ 16 && div0_class_value !== (div0_class_value = /*$theme*/ ctx[4].hiddenScroll)) {
attr(div0, "class", div0_class_value);
}
if (!current || dirty[0] & /*$theme*/ 16 && div1_class_value !== (div1_class_value = /*$theme*/ ctx[4].content)) {
attr(div1, "class", div1_class_value);
}
if (!current || dirty[0] & /*$theme*/ 16 && div2_class_value !== (div2_class_value = /*$theme*/ ctx[4].allDay)) {
attr(div2, "class", div2_class_value);
}
},
i(local) {
if (current) return;
transition_in(header.$$.fragment, local);
transition_in(section.$$.fragment, local);
current = true;
},
o(local) {
transition_out(header.$$.fragment, local);
transition_out(section.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(header, detaching);
if (detaching) detach(div2);
destroy_component(section);
}

@@ -796,3 +830,3 @@ };

// (53:8) {:else}
// (58:16) {:else}
function create_else_block(ctx) {

@@ -822,3 +856,5 @@ let each_1_anchor;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}

@@ -882,3 +918,3 @@

// (45:8) {#if $datesAboveResources}
// (50:16) {#if $datesAboveResources}
function create_if_block_1(ctx) {

@@ -908,3 +944,5 @@ let each_1_anchor;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}

@@ -968,3 +1006,3 @@

// (54:12) {#each $_viewResources as resource}
// (59:20) {#each $_viewResources as resource}
function create_each_block_4(ctx) {

@@ -1023,3 +1061,3 @@ let div;

// (48:20) {#each $_viewResources as resource}
// (53:28) {#each $_viewResources as resource}
function create_each_block_3(ctx) {

@@ -1065,3 +1103,3 @@ let week;

// (46:12) {#each $_viewDates as date}
// (51:20) {#each $_viewDates as date}
function create_each_block_2(ctx) {

@@ -1098,3 +1136,5 @@ let div;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
if (each_blocks[i]) {
each_blocks[i].m(div, null);
}
}

@@ -1162,3 +1202,3 @@

// (44:4) <Header allDay>
// (49:12) <Section>
function create_default_slot_1(ctx) {

@@ -1233,3 +1273,3 @@ let current_block_type_index;

// (65:8) {#each loops[1] as item1}
// (73:8) {#each loops[1] as item1}
function create_each_block_1(ctx) {

@@ -1286,3 +1326,3 @@ let day;

// (63:0) {#each loops[0] as item0}
// (71:0) {#each loops[0] as item0}
function create_each_block(ctx) {

@@ -1319,3 +1359,5 @@ let div;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
if (each_blocks[i]) {
each_blocks[i].m(div, null);
}
}

@@ -1383,3 +1425,3 @@

// (62:0) <Body>
// (70:0) <Body>
function create_default_slot(ctx) {

@@ -1409,3 +1451,5 @@ let each_1_anchor;

for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}

@@ -1470,9 +1514,14 @@

function create_fragment(ctx) {
let header;
let div1;
let section;
let t0;
let div0;
let div0_class_value;
let div1_class_value;
let t1;
let t2;
let body;
let current;
header = new Header({
section = new Section({
props: {

@@ -1495,13 +1544,21 @@ $$slots: { default: [create_default_slot_2] },

c() {
create_component(header.$$.fragment);
div1 = element("div");
create_component(section.$$.fragment);
t0 = space();
div0 = element("div");
t1 = space();
if (if_block) if_block.c();
t1 = space();
t2 = space();
create_component(body.$$.fragment);
attr(div0, "class", div0_class_value = /*$theme*/ ctx[4].hiddenScroll);
attr(div1, "class", div1_class_value = /*$theme*/ ctx[4].header);
},
m(target, anchor) {
mount_component(header, target, anchor);
insert(target, t0, anchor);
insert(target, div1, anchor);
mount_component(section, div1, null);
append(div1, t0);
append(div1, div0);
insert(target, t1, anchor);
if (if_block) if_block.m(target, anchor);
insert(target, t1, anchor);
insert(target, t2, anchor);
mount_component(body, target, anchor);

@@ -1511,10 +1568,18 @@ current = true;

p(ctx, dirty) {
const header_changes = {};
const section_changes = {};
if (dirty[0] & /*loops, $theme, $datesAboveResources, $_intlDayHeader*/ 60 | dirty[1] & /*$$scope*/ 16) {
header_changes.$$scope = { dirty, ctx };
section_changes.$$scope = { dirty, ctx };
}
header.$set(header_changes);
section.$set(section_changes);
if (!current || dirty[0] & /*$theme*/ 16 && div0_class_value !== (div0_class_value = /*$theme*/ ctx[4].hiddenScroll)) {
attr(div0, "class", div0_class_value);
}
if (!current || dirty[0] & /*$theme*/ 16 && div1_class_value !== (div1_class_value = /*$theme*/ ctx[4].header)) {
attr(div1, "class", div1_class_value);
}
if (/*$allDaySlot*/ ctx[6]) {

@@ -1531,3 +1596,3 @@ if (if_block) {

transition_in(if_block, 1);
if_block.m(t1.parentNode, t1);
if_block.m(t2.parentNode, t2);
}

@@ -1554,3 +1619,3 @@ } else if (if_block) {

if (current) return;
transition_in(header.$$.fragment, local);
transition_in(section.$$.fragment, local);
transition_in(if_block);

@@ -1561,3 +1626,3 @@ transition_in(body.$$.fragment, local);

o(local) {
transition_out(header.$$.fragment, local);
transition_out(section.$$.fragment, local);
transition_out(if_block);

@@ -1568,6 +1633,7 @@ transition_out(body.$$.fragment, local);

d(detaching) {
destroy_component(header, detaching);
if (detaching) detach(t0);
if (detaching) detach(div1);
destroy_component(section);
if (detaching) detach(t1);
if (if_block) if_block.d(detaching);
if (detaching) detach(t1);
if (detaching) detach(t2);
destroy_component(body, detaching);

@@ -1634,3 +1700,3 @@ }

/* packages/resource-time-grid/src/Auxiliary.svelte generated by Svelte v3.55.1 */
/* packages/resource-time-grid/src/Auxiliary.svelte generated by Svelte v3.58.0 */

@@ -1637,0 +1703,0 @@ function instance($$self, $$props, $$invalidate) {

{
"name": "@event-calendar/resource-time-grid",
"version": "0.19.0",
"version": "1.0.0",
"title": "Event Calendar ResourceTimeGrid plugin",

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

"dependencies": {
"@event-calendar/time-grid": "~0.19.0",
"@event-calendar/time-grid": "~1.0.0",
"svelte": "^3.55.1"
}
}

@@ -7,3 +7,3 @@ # 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)

* Lightweight (38kb [br](https://en.wikipedia.org/wiki/Brotli) compressed)
* Lightweight (34kb [br](https://en.wikipedia.org/wiki/Brotli) compressed)
* Zero-dependency (pre-built bundle)

@@ -72,8 +72,7 @@ * Used on over 60,000 websites with [Bookly](https://wordpress.org/plugins/bookly-responsive-appointment-booking-tool/)

- [longPressDelay](#longpressdelay)
- [monthMode](#monthmode)
- [moreLinkContent](#morelinkcontent)
- [noEventsClick](#noeventsclick)
- [noEventsContent](#noeventscontent)
</td><td>
- [noEventsContent](#noeventscontent)
- [nowIndicator](#nowindicator)

@@ -198,4 +197,4 @@ - [pointer](#pointer)

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@0.19.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@0.19.0/event-calendar.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.0.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.0.0/event-calendar.min.js"></script>
```

@@ -304,2 +303,3 @@

- Default `undefined`
- Requires `Interaction` plugin

@@ -334,3 +334,3 @@ Callback function that is triggered when the user clicks on a date or a time.

`true` or `false`. Determines if the click has occurred in the `all-day` slot. Clicks in month and list views are treated as all-day too</td>
`true` or `false`. Determines if the click has occurred in the `all-day` slot. Month and list views are also considered as all-day slots</td>
</tr>

@@ -1433,10 +1433,2 @@ <tr>

### monthMode
- Type `boolean`
- Default `false`
> Views override the default value as follows:
> - dayGridMonth `true`
Tells the calendar that visible dates should start from the [firstDay](#firstday) of the week, even if it will display days outside the current range (this is a common case for a month calendar when you can see days from adjacent months).
### moreLinkContent

@@ -1797,3 +1789,3 @@ - Type `string`, `object`or `function`

- Type `object` or `function`
- Default `{active: 'ec-active', allDay: 'ec-all-day', 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', dayFoot: 'ec-day-foot', dayHead: 'ec-day-head', daySide: 'ec-day-side', days: 'ec-days', draggable: 'ec-draggable', dragging: 'ec-dragging', event: 'ec-event', eventBody: 'ec-event-body', eventTag: 'ec-event-tag', eventTime: 'ec-event-time', eventTitle: 'ec-event-title', events: 'ec-events', extra: 'ec-extra', ghost: 'ec-ghost', 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', list: 'ec-list', month: 'ec-month', noEvents: 'ec-no-events', nowIndicator: 'ec-now-indicator', otherMonth: 'ec-other-month', pointer: 'ec-pointer', popup: 'ec-popup', preview: 'ec-preview', resizer: 'ec-resizer', resizingX: 'ec-resizing-x', resizingY: 'ec-resizing-y', resource: 'ec-resource', resourceTitle: 'ec-resource-title', selecting: 'ec-selecting', sidebar: 'ec-sidebar', sidebarTitle: 'ec-sidebar-title', time: 'ec-time', title: 'ec-title', today: 'ec-today', toolbar: 'ec-toolbar', uniform: 'ec-uniform', week: 'ec-week', withScroll: 'ec-with-scroll'}`
- Default `{active: 'ec-active', allDay: 'ec-all-day', 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', dayFoot: 'ec-day-foot', dayHead: 'ec-day-head', daySide: 'ec-day-side', days: 'ec-days', draggable: 'ec-draggable', dragging: 'ec-dragging', event: 'ec-event', eventBody: 'ec-event-body', eventTag: 'ec-event-tag', eventTime: 'ec-event-time', eventTitle: 'ec-event-title', events: 'ec-events', extra: 'ec-extra', ghost: 'ec-ghost', handle: 'ec-handle', header: 'ec-header', hiddenScroll: 'ec-hidden-scroll', highlight: 'ec-highlight', icon: 'ec-icon', line: 'ec-line', lines: 'ec-lines', list: 'ec-list', month: 'ec-month', noEvents: 'ec-no-events', nowIndicator: 'ec-now-indicator', otherMonth: 'ec-other-month', pointer: 'ec-pointer', popup: 'ec-popup', preview: 'ec-preview', resizer: 'ec-resizer', resizingX: 'ec-resizing-x', resizingY: 'ec-resizing-y', resource: 'ec-resource', resourceTitle: 'ec-resource-title', selecting: 'ec-selecting', sidebar: 'ec-sidebar', sidebarTitle: 'ec-sidebar-title', time: 'ec-time', title: 'ec-title', today: 'ec-today', toolbar: 'ec-toolbar', uniform: 'ec-uniform', week: 'ec-week', withScroll: 'ec-with-scroll'}`

@@ -2029,6 +2021,43 @@ Defines the CSS classes that the Event Calendar uses to generate HTML markup.

### dateFromPoint( x, y )
- Return value `Date` or `null`
- Return value `object` or `null`
Returns the date and time as if the [dateClick](#dateclick) event had fired for that point.
Returns an `info` object with data as if the [dateClick](#dateclick) event had fired for that point.
`info` object contains the following properties:
<table>
<tr>
<td>
`date`
</td>
<td>JavaScript Date object for the date and time</td>
</tr>
<tr>
<td>
`allDay`
</td>
<td>
`true` or `false`. Determines if the point is in the `all-day` slot. Month and list views are also considered as all-day slots</td>
</tr>
<tr>
<td>
`dayEl`
</td>
<td>HTML element that represents the whole-day that contains the point</td>
</tr>
<tr>
<td>
`resource`
</td>
<td>
If the current view is a resource view, the [Resource](#resource-object) object that owns this date
</td>
</tr>
</table>
Using this method, you can, for example, find out on which day a click occurred inside a multi-day event. To do this, inside [eventClick](#eventclick), pass the `jsEvent.clientX` and `jsEvent.clientY` coordinates to `dateFromPoint` and get the desired date.

@@ -2035,0 +2064,0 @@

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