diff --git a/README.md b/README.md index 01aba26..1e14a2a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A FullCalendar component for Angular. ## Supported Angular Versions -`@talentia/fullcalendar` version `4.4.12` supports Angular 18. +`@talentia/fullcalendar` version `4.4.13` supports Angular 18. # FullCalendar Angular Component [![Build Status](https://travis-ci.com/fullcalendar/fullcalendar-angular.svg?branch=master)](https://travis-ci.com/fullcalendar/fullcalendar-angular) diff --git a/package-lock.json b/package-lock.json index b7cc834..48eb66c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fullcalendar", - "version": "4.4.12", + "version": "4.4.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "fullcalendar", - "version": "4.4.12", + "version": "4.4.13", "dependencies": { "@angular/animations": "19.2.15", "@angular/common": "19.2.15", diff --git a/package.json b/package.json index 980238b..fa06e0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fullcalendar", - "version": "4.4.12", + "version": "4.4.13", "scripts": { "ng": "ng", "build": "npm-run-all -s clean:build build:prod", diff --git a/projects/fullcalendar/README.md b/projects/fullcalendar/README.md index 01aba26..1e14a2a 100644 --- a/projects/fullcalendar/README.md +++ b/projects/fullcalendar/README.md @@ -5,7 +5,7 @@ A FullCalendar component for Angular. ## Supported Angular Versions -`@talentia/fullcalendar` version `4.4.12` supports Angular 18. +`@talentia/fullcalendar` version `4.4.13` supports Angular 18. # FullCalendar Angular Component [![Build Status](https://travis-ci.com/fullcalendar/fullcalendar-angular.svg?branch=master)](https://travis-ci.com/fullcalendar/fullcalendar-angular) diff --git a/projects/fullcalendar/package.json b/projects/fullcalendar/package.json index 2653b62..c66d8ca 100644 --- a/projects/fullcalendar/package.json +++ b/projects/fullcalendar/package.json @@ -1,6 +1,6 @@ { "name": "@talentia/fullcalendar", - "version": "4.4.12", + "version": "4.4.13", "title": "FullCalendar Angular Component", "description": "A FullCalendar component for Angular", "license": "MIT", diff --git a/projects/fullcalendar/src/lib/fullcalendar.component.ts b/projects/fullcalendar/src/lib/fullcalendar.component.ts index ab195ac..d69b155 100644 --- a/projects/fullcalendar/src/lib/fullcalendar.component.ts +++ b/projects/fullcalendar/src/lib/fullcalendar.component.ts @@ -1,5 +1,5 @@ import deepEqual from 'fast-deep-equal'; -import { Component, ElementRef, SimpleChanges, AfterViewInit, DoCheck, OnChanges, AfterContentChecked, OnDestroy, input, output, inject } from '@angular/core'; +import { Component, ElementRef, SimpleChanges, AfterViewInit, DoCheck, OnChanges, AfterContentChecked, OnDestroy, inject, Input, Output, EventEmitter } from '@angular/core'; import { Calendar, BusinessHoursInput, ConstraintInput, EventApi, PluginDef } from '@fullcalendar/core'; import { INPUT_NAMES, INPUT_IS_DEEP, OUTPUT_NAMES } from './fullcalendar-options'; import { deepCopy } from './utils'; @@ -31,8 +31,7 @@ type EventSourceSuccessResponseHandler = any; export class FullCalendarComponent implements AfterViewInit, DoCheck, OnChanges, AfterContentChecked, OnDestroy { private element = inject(ElementRef); - - readonly deepChangeDetection = input(); + @Input() deepChangeDetection?: boolean; private calendar: Calendar; private dirtyProps: any = {}; @@ -58,7 +57,7 @@ export class FullCalendarComponent implements AfterViewInit, DoCheck, OnChanges, if (inputVal !== undefined) { // unfortunately FC chokes when some props are set to undefined - if (this.deepChangeDetection() && INPUT_IS_DEEP[inputName]) { + if (this.deepChangeDetection && INPUT_IS_DEEP[inputName]) { inputVal = deepCopy(inputVal); this.deepCopies[inputName] = inputVal; // side effect! } @@ -75,7 +74,7 @@ export class FullCalendarComponent implements AfterViewInit, DoCheck, OnChanges, called much more often than ngOnChanges. */ ngDoCheck() { - if (this.calendar && this.deepChangeDetection()) { // not the initial render AND we do deep-mutation checks + if (this.calendar && this.deepChangeDetection) { // not the initial render AND we do deep-mutation checks const { deepCopies } = this; for (const inputName in INPUT_IS_DEEP) { @@ -139,169 +138,169 @@ export class FullCalendarComponent implements AfterViewInit, DoCheck, OnChanges, since the properties will be programmatically generated, better to put them after. */ - readonly header = input(); - readonly footer = input(); - readonly customButtons = input<{ [name: string]: CustomButtonInput }>(); - readonly buttonIcons = input(); - readonly themeSystem = input<'standard' | string>(); - readonly bootstrapFontAwesome = input(); - readonly firstDay = input(); - readonly dir = input<'ltr' | 'rtl' | 'auto'>(); - readonly weekends = input(); - readonly hiddenDays = input(); - readonly fixedWeekCount = input(); - readonly weekNumbers = input(); - readonly weekNumbersWithinDays = input(); - readonly weekNumberCalculation = input<'local' | 'ISO' | ((m: Date) => number)>(); - readonly businessHours = input(); - readonly showNonCurrentDates = input(); - readonly height = input number)>(); - readonly contentHeight = input number)>(); - readonly aspectRatio = input(); - readonly handleWindowResize = input(); - readonly windowResizeDelay = input(); - readonly eventLimit = input(); - readonly eventLimitClick = input<'popover' | 'week' | 'day' | string | ((cellinfo: CellInfo, jsevent: Event) => void)>(); - readonly timeZone = input(); - readonly now = input DateInput)>(); - readonly defaultView = input(); - readonly allDaySlot = input(); - readonly allDayText = input(); - readonly slotDuration = input(); - readonly slotLabelFormat = input(); - readonly slotLabelInterval = input(); - readonly snapDuration = input(); - readonly scrollTime = input(); - readonly minTime = input(); - readonly maxTime = input(); - readonly slotEventOverlap = input(); - readonly listDayFormat = input(); - readonly listDayAltFormat = input(); - readonly noEventsMessage = input(); - readonly defaultDate = input(); - readonly nowIndicator = input(); - readonly visibleRange = input<((currentDate: Date) => DateRangeInput) | DateRangeInput>(); - readonly validRange = input(); - readonly dateIncrement = input(); - readonly dateAlignment = input(); - readonly duration = input(); - readonly dayCount = input(); - readonly locales = input(); - readonly locale = input(); - readonly eventTimeFormat = input(); - readonly columnHeader = input(); - readonly columnHeaderFormat = input(); - readonly columnHeaderText = input string)>(); - readonly columnHeaderHtml = input string)>(); - readonly titleFormat = input(); - readonly weekLabel = input(); - readonly displayEventTime = input(); - readonly displayEventEnd = input(); - readonly eventLimitText = input string)>(); - readonly dayPopoverFormat = input(); - readonly navLinks = input(); - readonly selectable = input(); - readonly selectMirror = input(); - readonly unselectAuto = input(); - readonly unselectCancel = input(); - readonly defaultAllDayEventDuration = input(); - readonly defaultTimedEventDuration = input(); - readonly cmdFormatter = input(); - readonly defaultRangeSeparator = input(); - readonly selectConstraint = input(); - readonly selectOverlap = input(); - readonly selectAllow = input(); - readonly selectMinDistance = input(); - readonly editable = input(); - readonly eventStartEditable = input(); - readonly eventDurationEditable = input(); - readonly eventConstraint = input(); - readonly eventOverlap = input(); - readonly eventAllow = input(); - readonly eventClassName = input(); - readonly eventClassNames = input(); - readonly eventBackgroundColor = input(); - readonly eventBorderColor = input(); - readonly eventTextColor = input(); - readonly eventColor = input(); - readonly events = input(); - readonly eventSources = input(); - readonly allDayDefault = input(); - readonly startParam = input(); - readonly endParam = input(); - readonly lazyFetching = input(); - readonly nextDayThreshold = input(); - readonly eventOrder = input number) | (string | ((a: EventApi, b: EventApi) => number))[]>(); - readonly rerenderDelay = input(); - readonly dragRevertDuration = input(); - readonly dragScroll = input(); - readonly longPressDelay = input(); - readonly eventLongPressDelay = input(); - readonly droppable = input(); - readonly dropAccept = input boolean)>(); - readonly eventDataTransform = input(); - readonly allDayMaintainDuration = input(); - readonly eventResizableFromStart = input(); - readonly timeGridEventMinHeight = input(); - readonly allDayHtml = input(); - readonly eventDragMinDistance = input(); - readonly eventSourceFailure = input(); - readonly eventSourceSuccess = input(); - readonly forceEventDuration = input(); - readonly progressiveEventRendering = input(); - readonly selectLongPressDelay = input(); - readonly timeZoneParam = input(); - readonly titleRangeSeparator = input(); + @Input() header?: boolean | ToolbarInput; + @Input() footer?: boolean | ToolbarInput; + @Input() customButtons?: { [name: string]: CustomButtonInput }; + @Input() buttonIcons?: boolean | ButtonIconsInput; + @Input() themeSystem?: 'standard' | string; + @Input() bootstrapFontAwesome?: boolean | ButtonIconsInput; + @Input() firstDay?: number; + @Input() dir?: 'ltr' | 'rtl' | 'auto'; + @Input() weekends?: boolean; + @Input() hiddenDays?: number[]; + @Input() fixedWeekCount?: boolean; + @Input() weekNumbers?: boolean; + @Input() weekNumbersWithinDays?: boolean; + @Input() weekNumberCalculation?: 'local' | 'ISO' | ((m: Date) => number); + @Input() businessHours?: BusinessHoursInput; + @Input() showNonCurrentDates?: boolean; + @Input() height?: number | 'auto' | 'parent' | (() => number); + @Input() contentHeight?: number | 'auto' | (() => number); + @Input() aspectRatio?: number; + @Input() handleWindowResize?: boolean; + @Input() windowResizeDelay?: number; + @Input() eventLimit?: boolean | number; + @Input() eventLimitClick?: 'popover' | 'week' | 'day' | string | ((cellinfo: CellInfo, jsevent: Event) => void); + @Input() timeZone?: string | boolean; + @Input() now?: DateInput | (() => DateInput); + @Input() defaultView?: string; + @Input() allDaySlot?: boolean; + @Input() allDayText?: string; + @Input() slotDuration?: DurationInput; + @Input() slotLabelFormat?: FormatterInput; + @Input() slotLabelInterval?: DurationInput; + @Input() snapDuration?: DurationInput; + @Input() scrollTime?: DurationInput; + @Input() minTime?: DurationInput; + @Input() maxTime?: DurationInput; + @Input() slotEventOverlap?: boolean; + @Input() listDayFormat?: FormatterInput | boolean; + @Input() listDayAltFormat?: FormatterInput | boolean; + @Input() noEventsMessage?: string; + @Input() defaultDate?: DateInput; + @Input() nowIndicator?: boolean; + @Input() visibleRange?: ((currentDate: Date) => DateRangeInput) | DateRangeInput; + @Input() validRange?: DateRangeInput; + @Input() dateIncrement?: DurationInput; + @Input() dateAlignment?: string; + @Input() duration?: DurationInput; + @Input() dayCount?: number; + @Input() locales?: RawLocale[]; + @Input() locale?: LocaleSingularArg; + @Input() eventTimeFormat?: FormatterInput; + @Input() columnHeader?: boolean; + @Input() columnHeaderFormat?: FormatterInput; + @Input() columnHeaderText?: string | ((date: DateInput) => string); + @Input() columnHeaderHtml?: string | ((date: DateInput) => string); + @Input() titleFormat?: FormatterInput; + @Input() weekLabel?: string; + @Input() displayEventTime?: boolean; + @Input() displayEventEnd?: boolean; + @Input() eventLimitText?: string | ((eventCnt: number) => string); + @Input() dayPopoverFormat?: FormatterInput; + @Input() navLinks?: boolean; + @Input() selectable?: boolean; + @Input() selectMirror?: boolean; + @Input() unselectAuto?: boolean; + @Input() unselectCancel?: string; + @Input() defaultAllDayEventDuration?: DurationInput; + @Input() defaultTimedEventDuration?: DurationInput; + @Input() cmdFormatter?: string; + @Input() defaultRangeSeparator?: string; + @Input() selectConstraint?: ConstraintInput; + @Input() selectOverlap?: boolean | OverlapFunc; + @Input() selectAllow?: AllowFunc; + @Input() selectMinDistance?: number; + @Input() editable?: boolean; + @Input() eventStartEditable?: boolean; + @Input() eventDurationEditable?: boolean; + @Input() eventConstraint?: ConstraintInput; + @Input() eventOverlap?: boolean | OverlapFunc; + @Input() eventAllow?: AllowFunc; + @Input() eventClassName?: string[] | string; + @Input() eventClassNames?: string[] | string; + @Input() eventBackgroundColor?: string; + @Input() eventBorderColor?: string; + @Input() eventTextColor?: string; + @Input() eventColor?: string; + @Input() events?: EventSourceInput; + @Input() eventSources?: EventSourceInput[]; + @Input() allDayDefault?: boolean; + @Input() startParam?: string; + @Input() endParam?: string; + @Input() lazyFetching?: boolean; + @Input() nextDayThreshold?: DurationInput; + @Input() eventOrder?: string | ((a: EventApi, b: EventApi) => number) | (string | ((a: EventApi, b: EventApi) => number))[]; + @Input() rerenderDelay?: number | null; + @Input() dragRevertDuration?: number; + @Input() dragScroll?: boolean; + @Input() longPressDelay?: number; + @Input() eventLongPressDelay?: number; + @Input() droppable?: boolean; + @Input() dropAccept?: string | ((draggable: any) => boolean); + @Input() eventDataTransform?: EventInputTransformer; + @Input() allDayMaintainDuration?: boolean; + @Input() eventResizableFromStart?: boolean; + @Input() timeGridEventMinHeight?: number; + @Input() allDayHtml?: string; + @Input() eventDragMinDistance?: number; + @Input() eventSourceFailure?: EventSourceErrorResponseHandler; + @Input() eventSourceSuccess?: EventSourceSuccessResponseHandler; + @Input() forceEventDuration?: boolean; + @Input() progressiveEventRendering?: boolean; + @Input() selectLongPressDelay?: number; + @Input() timeZoneParam?: string; + @Input() titleRangeSeparator?: string; // compound OptionsInput... - readonly buttonText = input(); - readonly views = input<{ [viewId: string]: ViewOptionsInput }>(); - readonly plugins = input<(PluginDef | string)[]>(); + @Input() buttonText?: ButtonTextCompoundInput; + @Input() views?: { [viewId: string]: ViewOptionsInput }; + @Input() plugins?: (PluginDef | string)[]; // scheduler... - readonly schedulerLicenseKey = input(); - readonly resources = input(); - readonly resourceLabelText = input(); - readonly resourceOrder = input(); - readonly filterResourcesWithEvents = input(); - readonly resourceText = input(); - readonly resourceGroupField = input(); - readonly resourceGroupText = input(); - readonly resourceAreaWidth = input(); - readonly resourceColumns = input(); - readonly resourcesInitiallyExpanded = input(); - readonly slotWidth = input(); - readonly datesAboveResources = input(); - readonly googleCalendarApiKey = input(); - readonly refetchResourcesOnNavigate = input(); - readonly eventResourceEditable = input(); + @Input() schedulerLicenseKey?: string; + @Input() resources?: any; + @Input() resourceLabelText?: string; + @Input() resourceOrder?: any; + @Input() filterResourcesWithEvents?: any; + @Input() resourceText?: any; + @Input() resourceGroupField?: any; + @Input() resourceGroupText?: any; + @Input() resourceAreaWidth?: any; + @Input() resourceColumns?: any; + @Input() resourcesInitiallyExpanded?: any; + @Input() slotWidth?: any; + @Input() datesAboveResources?: any; + @Input() googleCalendarApiKey?: string; + @Input() refetchResourcesOnNavigate?: boolean; + @Input() eventResourceEditable?: boolean; - readonly windowResize = output(); - readonly dateClick = output(); - readonly eventClick = output(); - readonly eventMouseEnter = output(); - readonly eventMouseLeave = output(); - readonly select = output(); - readonly unselect = output(); - readonly loading = output(); - readonly eventPositioned = output(); - readonly eventDragStart = output(); - readonly eventDragStop = output(); - readonly eventDrop = output(); - readonly eventResizeStart = output(); - readonly eventResizeStop = output(); - readonly eventResize = output(); - readonly drop = output(); - readonly eventReceive = output(); - readonly eventLeave = output(); - readonly _destroyed = output(); - readonly navLinkDayClick = output(); - readonly navLinkWeekClick = output(); + @Output() windowResize = new EventEmitter(); + @Output() dateClick = new EventEmitter(); + @Output() eventClick = new EventEmitter(); + @Output() eventMouseEnter = new EventEmitter(); + @Output() eventMouseLeave = new EventEmitter(); + @Output() select = new EventEmitter(); + @Output() unselect = new EventEmitter(); + @Output() loading = new EventEmitter(); + @Output() eventPositioned = new EventEmitter(); + @Output() eventDragStart = new EventEmitter(); + @Output() eventDragStop = new EventEmitter(); + @Output() eventDrop = new EventEmitter(); + @Output() eventResizeStart = new EventEmitter(); + @Output() eventResizeStop = new EventEmitter(); + @Output() eventResize = new EventEmitter(); + @Output() drop = new EventEmitter(); + @Output() eventReceive = new EventEmitter(); + @Output() eventLeave = new EventEmitter(); + @Output() _destroyed = new EventEmitter(); + @Output() navLinkDayClick = new EventEmitter(); + @Output() navLinkWeekClick = new EventEmitter(); // TODO: make these inputs... - readonly viewSkeletonRender = output(); - readonly viewSkeletonDestroy = output(); - readonly datesRender = output(); - readonly datesDestroy = output(); - readonly dayRender = output(); - readonly eventRender = output(); - readonly eventDestroy = output(); - readonly resourceRender = output(); + @Output() viewSkeletonRender = new EventEmitter(); + @Output() viewSkeletonDestroy = new EventEmitter(); + @Output() datesRender = new EventEmitter(); + @Output() datesDestroy = new EventEmitter(); + @Output() dayRender = new EventEmitter(); + @Output() eventRender = new EventEmitter(); + @Output() eventDestroy = new EventEmitter(); + @Output() resourceRender = new EventEmitter(); }