@schedule-x/current-time
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -235,3 +235,3 @@ import { Signal, ReadonlySignal } from "@preact/signals"; | ||
} | ||
interface DragAndDropPlugin extends PluginBase { | ||
interface DragAndDropPlugin extends PluginBase<string> { | ||
createTimeGridDragHandler(dependencies: DragHandlerDependencies, dayBoundariesDateTime: DayBoundariesDateTime): TimeGridDragHandler; | ||
@@ -244,3 +244,3 @@ createDateGridDragHandler(dependencies: DragHandlerDependencies): DateGridDragHandler; | ||
}; | ||
interface EventModalPlugin extends PluginBase { | ||
interface EventModalPlugin extends PluginBase<string> { | ||
calendarEvent: Signal<CalendarEventInternal | null>; | ||
@@ -288,3 +288,3 @@ calendarEventDOMRect: Signal<DOMRect | null>; | ||
} | ||
interface EventRecurrencePlugin extends PluginBase { | ||
interface EventRecurrencePlugin extends PluginBase<string> { | ||
updateRecurrenceDND(eventId: EventId, oldEventStart: string, newEventStart: string): void; | ||
@@ -294,3 +294,3 @@ updateRecurrenceOnResize(eventId: EventId, oldEventEnd: string, newEventEnd: string): void; | ||
} | ||
interface ResizePlugin extends PluginBase { | ||
interface ResizePlugin extends PluginBase<string> { | ||
createTimeGridEventResizer(calendarEvent: CalendarEventInternal, updateCopy: (newCopy: CalendarEventInternal | undefined) => void, mouseDownEvent: MouseEvent, dayBoundariesDateTime: { | ||
@@ -325,6 +325,6 @@ start: string; | ||
eventModal?: EventModalPlugin; | ||
scrollController?: PluginBase; | ||
scrollController?: PluginBase<string>; | ||
eventRecurrence?: EventRecurrencePlugin; | ||
resize?: ResizePlugin; | ||
[key: string]: PluginBase | undefined; | ||
[key: string]: PluginBase<string> | undefined; | ||
}; | ||
@@ -373,4 +373,4 @@ type CustomComponentFn = (wrapperElement: HTMLElement, props: Record<string, unknown>) => void; | ||
} | ||
interface PluginBase { | ||
name: string; | ||
interface PluginBase<Name extends string> { | ||
name: Name; | ||
/** | ||
@@ -398,3 +398,3 @@ * Allow implementers to dynamically add any properties to the global app object as they see fit. | ||
} | ||
interface CurrentTimePlugin extends PluginBase { | ||
interface CurrentTimePlugin extends PluginBase<string> { | ||
} | ||
@@ -416,3 +416,5 @@ type CurrentTimePluginConfig = { | ||
} | ||
declare const createCurrentTimePlugin: (config?: CurrentTimePluginConfig) => CurrentTimePluginImpl; | ||
declare const createCurrentTimePlugin: (config?: CurrentTimePluginConfig) => CurrentTimePluginImpl & { | ||
name: "currentTime"; | ||
}; | ||
export { createCurrentTimePlugin }; |
@@ -88,2 +88,7 @@ 'use strict'; | ||
const definePlugin = (name, definition) => { | ||
definition.name = name; | ||
return definition; | ||
}; | ||
var WeekDay; | ||
@@ -125,3 +130,3 @@ (function (WeekDay) { | ||
writable: true, | ||
value: 'current-time-plugin' | ||
value: 'currentTime' | ||
}); | ||
@@ -207,4 +212,6 @@ Object.defineProperty(this, "$app", { | ||
} | ||
const createCurrentTimePlugin = (config) => new CurrentTimePluginImpl(config); | ||
const createCurrentTimePlugin = (config) => { | ||
return definePlugin('currentTime', new CurrentTimePluginImpl(config)); | ||
}; | ||
exports.createCurrentTimePlugin = createCurrentTimePlugin; |
@@ -235,3 +235,3 @@ import { Signal, ReadonlySignal } from "@preact/signals"; | ||
} | ||
interface DragAndDropPlugin extends PluginBase { | ||
interface DragAndDropPlugin extends PluginBase<string> { | ||
createTimeGridDragHandler(dependencies: DragHandlerDependencies, dayBoundariesDateTime: DayBoundariesDateTime): TimeGridDragHandler; | ||
@@ -244,3 +244,3 @@ createDateGridDragHandler(dependencies: DragHandlerDependencies): DateGridDragHandler; | ||
}; | ||
interface EventModalPlugin extends PluginBase { | ||
interface EventModalPlugin extends PluginBase<string> { | ||
calendarEvent: Signal<CalendarEventInternal | null>; | ||
@@ -288,3 +288,3 @@ calendarEventDOMRect: Signal<DOMRect | null>; | ||
} | ||
interface EventRecurrencePlugin extends PluginBase { | ||
interface EventRecurrencePlugin extends PluginBase<string> { | ||
updateRecurrenceDND(eventId: EventId, oldEventStart: string, newEventStart: string): void; | ||
@@ -294,3 +294,3 @@ updateRecurrenceOnResize(eventId: EventId, oldEventEnd: string, newEventEnd: string): void; | ||
} | ||
interface ResizePlugin extends PluginBase { | ||
interface ResizePlugin extends PluginBase<string> { | ||
createTimeGridEventResizer(calendarEvent: CalendarEventInternal, updateCopy: (newCopy: CalendarEventInternal | undefined) => void, mouseDownEvent: MouseEvent, dayBoundariesDateTime: { | ||
@@ -325,6 +325,6 @@ start: string; | ||
eventModal?: EventModalPlugin; | ||
scrollController?: PluginBase; | ||
scrollController?: PluginBase<string>; | ||
eventRecurrence?: EventRecurrencePlugin; | ||
resize?: ResizePlugin; | ||
[key: string]: PluginBase | undefined; | ||
[key: string]: PluginBase<string> | undefined; | ||
}; | ||
@@ -373,4 +373,4 @@ type CustomComponentFn = (wrapperElement: HTMLElement, props: Record<string, unknown>) => void; | ||
} | ||
interface PluginBase { | ||
name: string; | ||
interface PluginBase<Name extends string> { | ||
name: Name; | ||
/** | ||
@@ -398,3 +398,3 @@ * Allow implementers to dynamically add any properties to the global app object as they see fit. | ||
} | ||
interface CurrentTimePlugin extends PluginBase { | ||
interface CurrentTimePlugin extends PluginBase<string> { | ||
} | ||
@@ -416,3 +416,5 @@ type CurrentTimePluginConfig = { | ||
} | ||
declare const createCurrentTimePlugin: (config?: CurrentTimePluginConfig) => CurrentTimePluginImpl; | ||
declare const createCurrentTimePlugin: (config?: CurrentTimePluginConfig) => CurrentTimePluginImpl & { | ||
name: "currentTime"; | ||
}; | ||
export { createCurrentTimePlugin }; |
@@ -86,2 +86,7 @@ import 'preact/jsx-runtime'; | ||
const definePlugin = (name, definition) => { | ||
definition.name = name; | ||
return definition; | ||
}; | ||
var WeekDay; | ||
@@ -123,3 +128,3 @@ (function (WeekDay) { | ||
writable: true, | ||
value: 'current-time-plugin' | ||
value: 'currentTime' | ||
}); | ||
@@ -205,4 +210,6 @@ Object.defineProperty(this, "$app", { | ||
} | ||
const createCurrentTimePlugin = (config) => new CurrentTimePluginImpl(config); | ||
const createCurrentTimePlugin = (config) => { | ||
return definePlugin('currentTime', new CurrentTimePluginImpl(config)); | ||
}; | ||
export { createCurrentTimePlugin }; |
@@ -235,3 +235,3 @@ import { Signal, ReadonlySignal } from "@preact/signals"; | ||
} | ||
interface DragAndDropPlugin extends PluginBase { | ||
interface DragAndDropPlugin extends PluginBase<string> { | ||
createTimeGridDragHandler(dependencies: DragHandlerDependencies, dayBoundariesDateTime: DayBoundariesDateTime): TimeGridDragHandler; | ||
@@ -244,3 +244,3 @@ createDateGridDragHandler(dependencies: DragHandlerDependencies): DateGridDragHandler; | ||
}; | ||
interface EventModalPlugin extends PluginBase { | ||
interface EventModalPlugin extends PluginBase<string> { | ||
calendarEvent: Signal<CalendarEventInternal | null>; | ||
@@ -288,3 +288,3 @@ calendarEventDOMRect: Signal<DOMRect | null>; | ||
} | ||
interface EventRecurrencePlugin extends PluginBase { | ||
interface EventRecurrencePlugin extends PluginBase<string> { | ||
updateRecurrenceDND(eventId: EventId, oldEventStart: string, newEventStart: string): void; | ||
@@ -294,3 +294,3 @@ updateRecurrenceOnResize(eventId: EventId, oldEventEnd: string, newEventEnd: string): void; | ||
} | ||
interface ResizePlugin extends PluginBase { | ||
interface ResizePlugin extends PluginBase<string> { | ||
createTimeGridEventResizer(calendarEvent: CalendarEventInternal, updateCopy: (newCopy: CalendarEventInternal | undefined) => void, mouseDownEvent: MouseEvent, dayBoundariesDateTime: { | ||
@@ -325,6 +325,6 @@ start: string; | ||
eventModal?: EventModalPlugin; | ||
scrollController?: PluginBase; | ||
scrollController?: PluginBase<string>; | ||
eventRecurrence?: EventRecurrencePlugin; | ||
resize?: ResizePlugin; | ||
[key: string]: PluginBase | undefined; | ||
[key: string]: PluginBase<string> | undefined; | ||
}; | ||
@@ -373,4 +373,4 @@ type CustomComponentFn = (wrapperElement: HTMLElement, props: Record<string, unknown>) => void; | ||
} | ||
interface PluginBase { | ||
name: string; | ||
interface PluginBase<Name extends string> { | ||
name: Name; | ||
/** | ||
@@ -398,3 +398,3 @@ * Allow implementers to dynamically add any properties to the global app object as they see fit. | ||
} | ||
interface CurrentTimePlugin extends PluginBase { | ||
interface CurrentTimePlugin extends PluginBase<string> { | ||
} | ||
@@ -416,3 +416,5 @@ type CurrentTimePluginConfig = { | ||
} | ||
declare const createCurrentTimePlugin: (config?: CurrentTimePluginConfig) => CurrentTimePluginImpl; | ||
declare const createCurrentTimePlugin: (config?: CurrentTimePluginConfig) => CurrentTimePluginImpl & { | ||
name: "currentTime"; | ||
}; | ||
export { createCurrentTimePlugin }; |
@@ -90,2 +90,7 @@ (function (global, factory) { | ||
const definePlugin = (name, definition) => { | ||
definition.name = name; | ||
return definition; | ||
}; | ||
var WeekDay; | ||
@@ -127,3 +132,3 @@ (function (WeekDay) { | ||
writable: true, | ||
value: 'current-time-plugin' | ||
value: 'currentTime' | ||
}); | ||
@@ -209,3 +214,5 @@ Object.defineProperty(this, "$app", { | ||
} | ||
const createCurrentTimePlugin = (config) => new CurrentTimePluginImpl(config); | ||
const createCurrentTimePlugin = (config) => { | ||
return definePlugin('currentTime', new CurrentTimePluginImpl(config)); | ||
}; | ||
@@ -212,0 +219,0 @@ exports.createCurrentTimePlugin = createCurrentTimePlugin; |
{ | ||
"name": "@schedule-x/current-time", | ||
"umdName": "SXCurrentTime", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Schedule-X plugin for displaying an indicator for the current time", | ||
@@ -37,3 +37,3 @@ "author": { | ||
"homepage": "https://schedule-x.dev", | ||
"gitHead": "8c8df9d6329567163cffc9f744cf2efba173c7f9" | ||
"gitHead": "33db04bc41ed4f015efd93f12ecd65f72801038e" | ||
} |
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
68763
1830
1185
10