diff --git a/api-generator/components/fullcalendar.js b/api-generator/components/fullcalendar.js deleted file mode 100644 index 8801d40bff..0000000000 --- a/api-generator/components/fullcalendar.js +++ /dev/null @@ -1,35 +0,0 @@ -const FullCalendarProps = [ - { - name: 'id', - type: 'string', - default: 'Unique identifier of the element.', - description: 'events' - }, - { - name: 'array', - type: 'An array of events to display.', - default: 'style', - description: 'object' - }, - { - name: 'Inline style of the component.', - type: 'className', - default: 'string', - description: 'ClassName of the component.' - } -]; - -const FullCalendarEvents = []; - -const FullCalendarStyles = []; - -module.exports = { - fullcalendar: { - name: 'FullCalendar', - description: 'FullCalendar React library is fully compatible with PrimeReact themes.', - docUrl: 'https://primefaces.org/primereact/showcase/#/fullcalendar', - props: FullCalendarProps, - events: FullCalendarEvents, - styles: FullCalendarStyles - } -}; diff --git a/components/lib/fullcalendar/FullCalendar.js b/components/lib/fullcalendar/FullCalendar.js deleted file mode 100644 index dd7ee87bde..0000000000 --- a/components/lib/fullcalendar/FullCalendar.js +++ /dev/null @@ -1,89 +0,0 @@ -import * as React from 'react'; -import { useMountEffect, usePrevious, useUnmountEffect, useUpdateEffect } from '../hooks/Hooks'; -import { ObjectUtils } from '../utils/Utils'; - -export const FullCalendar = React.memo( - React.forwardRef((props, ref) => { - const elementRef = React.useRef(null); - const config = React.useRef({}); - const calendar = React.useRef(null); - const prevEvents = usePrevious(props.events); - const prevOptions = usePrevious(props.options); - - const initialize = () => { - import('@fullcalendar/core').then((module) => { - if (module && module.Calendar) { - calendar.current = new module.Calendar(elementRef.current, config.current); - calendar.current.render(); - - if (props.events) { - calendar.current.removeAllEventSources(); - calendar.current.addEventSource(props.events); - } - } - }); - }; - - React.useImperativeHandle(ref, () => ({ - props, - getElement: () => elementRef.current - })); - - useMountEffect(() => { - // eslint-disable-next-line no-console - console.warn("FullCalendar component is deprecated. Use FullCalendar component of '@fullcalendar/react' package."); - - config.current = { - theme: true - }; - - if (props.options) { - for (let prop in props.options) { - config.current[prop] = props.options[prop]; - } - } - - initialize(); - }); - - useUpdateEffect(() => { - if (!calendar.current) { - initialize(); - } else { - if (!ObjectUtils.equals(prevEvents, props.events)) { - calendar.current.removeAllEventSources(); - calendar.addEventSource(props.events); - } - - if (!ObjectUtils.equals(prevOptions, props.options)) { - for (let prop in props.options) { - let optionValue = props.options[prop]; - - config.current[prop] = optionValue; - calendar.current.setOption(prop, optionValue); - } - } - } - }); - - useUnmountEffect(() => { - if (calendar.current) { - calendar.current.destroy(); - } - }); - - const otherProps = ObjectUtils.findDiffKeys(props, FullCalendar.defaultProps); - - return
; - }) -); - -FullCalendar.displayName = 'FullCalendar'; -FullCalendar.defaultProps = { - __TYPE: 'FullCalendar', - id: null, - events: [], - style: null, - className: null, - options: null -}; diff --git a/components/lib/fullcalendar/fullcalendar.d.ts b/components/lib/fullcalendar/fullcalendar.d.ts deleted file mode 100644 index dd5892d2c8..0000000000 --- a/components/lib/fullcalendar/fullcalendar.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from 'react'; - -export interface FullCalendarProps { - id?: string; - events?: any[]; - style?: object; - className?: string; - options?: object; - children?: React.ReactNode; -} - -export declare class FullCalendar extends React.Component { - public getElement(): HTMLDivElement; -} diff --git a/components/lib/fullcalendar/package.json b/components/lib/fullcalendar/package.json deleted file mode 100644 index 9e56d8372c..0000000000 --- a/components/lib/fullcalendar/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "main": "./fullcalendar.cjs.js", - "module": "./fullcalendar.esm.js", - "unpkg": "./fullcalendar.min.js", - "types": "./fullcalendar.d.ts" -} diff --git a/components/lib/index.d.ts b/components/lib/index.d.ts index ad6ea057c0..f8c55540c4 100644 --- a/components/lib/index.d.ts +++ b/components/lib/index.d.ts @@ -34,7 +34,6 @@ export * from './dropdown/dropdown'; export * from './editor/editor'; export * from './fieldset/fieldset'; export * from './fileupload/fileupload'; -export * from './fullcalendar/fullcalendar'; export * from './galleria/galleria'; export * from './gmap/gmap'; export * from './hooks/hooks'; diff --git a/components/lib/primereact.all.js b/components/lib/primereact.all.js index 4092284f99..7518ea4d42 100644 --- a/components/lib/primereact.all.js +++ b/components/lib/primereact.all.js @@ -35,7 +35,6 @@ export * from './dropdown/Dropdown'; export * from './editor/Editor'; export * from './fieldset/Fieldset'; export * from './fileupload/FileUpload'; -export * from './fullcalendar/FullCalendar'; export * from './galleria/Galleria'; export * from './gmap/GMap'; export * from './hooks/Hooks'; diff --git a/pages/setup/index.js b/pages/setup/index.js index adf2e910d5..6b20e59686 100644 --- a/pages/setup/index.js +++ b/pages/setup/index.js @@ -260,10 +260,6 @@ dependencies: { Editor Quill.js - - FullCalendar* - FullCalendar 4.0 Alpha.2+ - DataView PrimeFlex