@event-calendar/resource-time-grid
Advanced tools
Comparing version 0.17.1 to 0.18.0
44
index.js
@@ -123,3 +123,3 @@ 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'; | ||
function instance$1($$self, $$props, $$invalidate) { | ||
function instance$2($$self, $$props, $$invalidate) { | ||
let $resourceLabelDidMount; | ||
@@ -194,3 +194,3 @@ let $resourceLabelContent; | ||
super(); | ||
init(this, options, instance$1, create_fragment$1, safe_not_equal, { resource: 6, date: 7 }); | ||
init(this, options, instance$2, create_fragment$1, safe_not_equal, { resource: 6, date: 7 }); | ||
} | ||
@@ -1545,3 +1545,3 @@ } | ||
function instance($$self, $$props, $$invalidate) { | ||
function instance$1($$self, $$props, $$invalidate) { | ||
let $_viewDates; | ||
@@ -1598,6 +1598,34 @@ let $_viewResources; | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, {}, null, [-1, -1]); | ||
init(this, options, instance$1, create_fragment, safe_not_equal, {}, null, [-1, -1]); | ||
} | ||
} | ||
/* packages/resource-time-grid/src/Auxiliary.svelte generated by Svelte v3.55.1 */ | ||
function instance($$self, $$props, $$invalidate) { | ||
let $resources; | ||
let $_resBgColor; | ||
let { resources, _resBgColor } = getContext('state'); | ||
component_subscribe($$self, resources, value => $$invalidate(2, $resources = value)); | ||
component_subscribe($$self, _resBgColor, value => $$invalidate(3, $_resBgColor = value)); | ||
set_store_value( | ||
_resBgColor, | ||
$_resBgColor = event => { | ||
let resource = $resources.find(res => event.resourceIds.includes(res.id)); | ||
return resource?.eventBackgroundColor; | ||
}, | ||
$_resBgColor | ||
); | ||
return [resources, _resBgColor]; | ||
} | ||
class Auxiliary extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance, null, safe_not_equal, {}); | ||
} | ||
} | ||
var index = { | ||
@@ -1625,4 +1653,9 @@ createOptions(options) { | ||
}, | ||
createParsers(parsers, options) { | ||
parsers.resources = createResources; | ||
}, | ||
createStores(state) { | ||
state._auxiliary.update($_auxiliary => [...$_auxiliary, Auxiliary]); | ||
} | ||
@@ -1635,3 +1668,4 @@ }; | ||
title: resource.title || '', | ||
titleHTML: resource.titleHTML || '' | ||
titleHTML: resource.titleHTML || '', | ||
eventBackgroundColor: resource.eventBackgroundColor, | ||
})); | ||
@@ -1638,0 +1672,0 @@ } |
{ | ||
"name": "@event-calendar/resource-time-grid", | ||
"version": "0.17.1", | ||
"version": "0.18.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.17.1", | ||
"@event-calendar/time-grid": "~0.18.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 (37kb [br](https://en.wikipedia.org/wiki/Brotli) compressed) | ||
* Lightweight (38kb [br](https://en.wikipedia.org/wiki/Brotli) compressed) | ||
* Zero-dependency (pre-built bundle) | ||
@@ -196,4 +196,4 @@ * Used on over 60,000 websites with [Bookly](https://wordpress.org/plugins/bookly-responsive-appointment-booking-tool/) | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@0.17.1/event-calendar.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@0.17.1/event-calendar.min.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@0.18.0/event-calendar.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@0.18.0/event-calendar.min.js"></script> | ||
``` | ||
@@ -2205,3 +2205,3 @@ | ||
`boolean` Determines if the event is shown in the all-day slot. Default `false` | ||
`boolean` Determines if the event is shown in the all-day slot. Defaults to `true` if `start` and `end` are both passed without a time part, `false` otherwise | ||
</td> | ||
@@ -2387,2 +2387,9 @@ </tr> | ||
</tr> | ||
<tr> | ||
<td> | ||
`eventBackgroundColor` | ||
</td> | ||
<td>Default background color for this resource's events</td> | ||
</tr> | ||
</table> | ||
@@ -2425,2 +2432,12 @@ | ||
</tr> | ||
<tr> | ||
<td> | ||
`eventBackgroundColor` | ||
</td> | ||
<td> | ||
`string` Sets the default background color for this resource's events just like the calendar-wide [eventBackgroundColor](#eventbackgroundcolor) option. Default `undefined` | ||
</td> | ||
</tr> | ||
</table> | ||
@@ -2427,0 +2444,0 @@ |
import View from './View.svelte'; | ||
import Auxiliary from './Auxiliary.svelte'; | ||
@@ -25,4 +26,9 @@ export default { | ||
}, | ||
createParsers(parsers, options) { | ||
parsers.resources = createResources; | ||
}, | ||
createStores(state) { | ||
state._auxiliary.update($_auxiliary => [...$_auxiliary, Auxiliary]); | ||
} | ||
@@ -35,4 +41,5 @@ } | ||
title: resource.title || '', | ||
titleHTML: resource.titleHTML || '' | ||
titleHTML: resource.titleHTML || '', | ||
eventBackgroundColor: resource.eventBackgroundColor, | ||
})); | ||
} | ||
} |
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
103880
9
1509
2493
+ Added@event-calendar/common@0.18.1(transitive)
+ Added@event-calendar/time-grid@0.18.1(transitive)
- Removed@event-calendar/common@0.17.1(transitive)
- Removed@event-calendar/time-grid@0.17.1(transitive)