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

@event-calendar/core

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/core - npm Package Compare versions

Comparing version 0.15.3 to 0.16.0

31

index.js
import { is_function, tick, noop, identity, SvelteComponent, init, safe_not_equal, empty, insert, destroy_each, detach, component_subscribe, set_store_value, element, text, attr, append, listen, set_data, transition_in, group_outros, check_outros, transition_out, space, create_component, mount_component, destroy_component, construct_svelte_component, set_style } from 'svelte/internal';
import { getContext, setContext } from 'svelte';
import { derived, writable, readable, get } from 'svelte/store';
import { assign, setMidnight, createDate, createDuration, createEvents, createEventSources, cloneDate, prevClosestDay, nextClosestDay, DAY_IN_SECONDS, addDuration, subtractDay, toLocalDate, toISOString, derived2, addDay, createView, writable2, intl, intlRange, subtractDuration, toEventWithLocalDates, toViewWithLocalDates, ignore } from '@event-calendar/common';
import { assign, setMidnight, createDate, createDuration, createEvents, createEventSources, cloneDate, prevClosestDay, nextClosestDay, DAY_IN_SECONDS, addDuration, subtractDay, toLocalDate, toISOString, derived2, addDay, createView, writable2, intl, intlRange, subtractDuration, toEventWithLocalDates, toViewWithLocalDates, hasFn, runFn, ignore } from '@event-calendar/common';

@@ -1405,8 +1405,8 @@ function createOptions(plugins) {

component_subscribe($$self, _viewClass, value => $$invalidate(2, $_viewClass = value));
component_subscribe($$self, _ignoreClick, value => $$invalidate(29, $_ignoreClick = value));
component_subscribe($$self, _ignoreClick, value => $$invalidate(30, $_ignoreClick = value));
component_subscribe($$self, _interaction, value => $$invalidate(0, $_interaction = value));
component_subscribe($$self, _iClass, value => $$invalidate(3, $_iClass = value));
component_subscribe($$self, _events, value => $$invalidate(31, $_events = value));
component_subscribe($$self, events, value => $$invalidate(30, $events = value));
component_subscribe($$self, eventSources, value => $$invalidate(32, $eventSources = value));
component_subscribe($$self, _events, value => $$invalidate(32, $_events = value));
component_subscribe($$self, events, value => $$invalidate(31, $events = value));
component_subscribe($$self, eventSources, value => $$invalidate(33, $eventSources = value));
component_subscribe($$self, height, value => $$invalidate(4, $height = value));

@@ -1491,2 +1491,13 @@ component_subscribe($$self, theme, value => $$invalidate(1, $theme = value));

function dateFromPoint(x, y) {
for (let el of document.elementsFromPoint(x, y)) {
if (hasFn(el)) {
let date = runFn(el, y);
return date ? toLocalDate(date) : null;
}
}
return null;
}
function updateEvents(func) {

@@ -1550,3 +1561,4 @@ if ($eventSources.length) {

getView,
unselect
unselect,
dateFromPoint
];

@@ -1577,3 +1589,4 @@ }

getView: 27,
unselect: 28
unselect: 28,
dateFromPoint: 29
},

@@ -1624,4 +1637,8 @@ null,

}
get dateFromPoint() {
return this.$$.ctx[29];
}
}
export { Calendar as default };
{
"name": "@event-calendar/core",
"version": "0.15.3",
"version": "0.16.0",
"title": "Event Calendar Core package",

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

"dependencies": {
"@event-calendar/common": "~0.15.3",
"@event-calendar/common": "~0.16.0",
"svelte": "^3.55.1"
}
}

@@ -119,5 +119,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) [![Sponsor](https://img.shields.io/badge/Sponsor-$10-blue.svg?style=flat-square&logo=paypal)](https://www.paypal.me/vkurko/10usd)

- [dateFromPoint](#datefrompoint)
- [getView](#getview)
</td><td>
- [unselect](#unselect-1)

@@ -196,4 +195,4 @@ </td></tr>

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

@@ -1993,2 +1992,16 @@

### dateFromPoint( x, y )
- Return value `Date` or `null`
Returns the date and time that would be determined if a click was made on the specified coordinates within the application's [viewport](https://developer.mozilla.org/en-US/docs/Glossary/Viewport).
Using this method, you can get the date and time for any point inside the calendar, as if it was clicked. For example, you want to know, when you click on a multi-day event, which day the click happened on. To do this, inside [eventClick](#eventclick), pass the `jsEvent.clientX` and `jsEvent.clientY` coordinates to `dateFromPoint` and get the date that corresponds to the place in the calendar where the click was.
<details>
<summary>Note</summary>
> In the `'listDay'`, `'listWeek'`, `'listMonth'` and `'listYear'` views, the events are rendered outside of the day container, so the method will return `null` for the coordinates that are inside the events.
</details>
### getView()

@@ -1995,0 +2008,0 @@ - Return value `View`

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