mirror of https://github.com/nextcloud/calendar
Restructure src/fullcalendar
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
cf5c9317c3
commit
20bac588ce
|
@ -72,10 +72,10 @@ import {
|
|||
} from 'vuex'
|
||||
import { getLocale } from '@nextcloud/l10n'
|
||||
import Modal from '@nextcloud/vue/dist/Components/Modal'
|
||||
import VTimezoneNamedTimezone from '../../../fullcalendar/vtimezoneNamedTimezoneImpl.js'
|
||||
import freeBusyEventSource from '../../../fullcalendar/freeBusyEventSource.js'
|
||||
import VTimezoneNamedTimezone from '../../../fullcalendar/timezones/vtimezoneNamedTimezoneImpl.js'
|
||||
import freeBusyEventSource from '../../../fullcalendar/eventSources/freeBusyEventSource.js'
|
||||
import { getColorForFBType } from '../../../utils/freebusy.js'
|
||||
import freeBusyFakeBlockingEventSource from '../../../fullcalendar/freeBusyFakeBlockingEventSource.js'
|
||||
import freeBusyFakeBlockingEventSource from '../../../fullcalendar/eventSources/freeBusyFakeBlockingEventSource.js'
|
||||
|
||||
export default {
|
||||
name: 'FreeBusy',
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
*/
|
||||
import {
|
||||
generateTextColorForHex,
|
||||
} from '../utils/color.js'
|
||||
import getTimezoneManager from '../services/timezoneDataProviderService'
|
||||
import { getUnixTimestampFromDate } from '../utils/date.js'
|
||||
} from '../../utils/color.js'
|
||||
import getTimezoneManager from '../../services/timezoneDataProviderService'
|
||||
import { getUnixTimestampFromDate } from '../../utils/date.js'
|
||||
import { eventSourceFunction } from './eventSourceFunction.js'
|
||||
import logger from '../utils/logger.js'
|
||||
import logger from '../../utils/logger.js'
|
||||
|
||||
/**
|
||||
* Returns a function to generate a FullCalendar event-source based on the Vuex calendar model
|
|
@ -25,9 +25,9 @@ import {
|
|||
isLight,
|
||||
generateTextColorForHex,
|
||||
getHexForColorName,
|
||||
} from '../utils/color.js'
|
||||
import logger from '../utils/logger.js'
|
||||
import { getAllObjectsInTimeRange } from '../utils/calendarObject.js'
|
||||
} from '../../utils/color.js'
|
||||
import logger from '../../utils/logger.js'
|
||||
import { getAllObjectsInTimeRange } from '../../utils/calendarObject.js'
|
||||
|
||||
/**
|
||||
* convert an array of calendar-objects to events
|
|
@ -19,12 +19,12 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import getTimezoneManager from '../services/timezoneDataProviderService.js'
|
||||
import getTimezoneManager from '../../services/timezoneDataProviderService.js'
|
||||
import { createFreeBusyRequest } from 'calendar-js'
|
||||
import DateTimeValue from 'calendar-js/src/values/dateTimeValue.js'
|
||||
import { findSchedulingOutbox } from '../services/caldavService.js'
|
||||
import { findSchedulingOutbox } from '../../services/caldavService.js'
|
||||
import freeBusyEventSourceFunction from './freeBusyEventSourceFunction.js'
|
||||
import logger from '../utils/logger.js'
|
||||
import logger from '../../utils/logger.js'
|
||||
// import AttendeeProperty from 'calendar-js/src/properties/attendeeProperty.js'
|
||||
|
||||
/**
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { getColorForFBType } from '../utils/freebusy.js'
|
||||
import { getColorForFBType } from '../../utils/freebusy.js'
|
||||
import { getParserManager } from 'calendar-js'
|
||||
|
||||
/**
|
|
@ -22,7 +22,7 @@
|
|||
import {
|
||||
getPrefixedRoute,
|
||||
isPublicOrEmbeddedRoute,
|
||||
} from '../utils/router'
|
||||
} from '../../utils/router'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import { showInfo } from '@nextcloud/dialogs'
|
|
@ -19,10 +19,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import { getDurationValueFromFullCalendarDuration } from '../fullcalendar/duration'
|
||||
import getTimezoneManager from '../services/timezoneDataProviderService'
|
||||
import logger from '../utils/logger.js'
|
||||
import { getObjectAtRecurrenceId } from '../utils/calendarObject.js'
|
||||
import { getDurationValueFromFullCalendarDuration } from '../duration'
|
||||
import getTimezoneManager from '../../services/timezoneDataProviderService'
|
||||
import logger from '../../utils/logger.js'
|
||||
import { getObjectAtRecurrenceId } from '../../utils/calendarObject.js'
|
||||
|
||||
/**
|
||||
* Returns a function to drop an event at a different position
|
|
@ -19,8 +19,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import { getDurationValueFromFullCalendarDuration } from './duration'
|
||||
import { getObjectAtRecurrenceId } from '../utils/calendarObject.js'
|
||||
import { getDurationValueFromFullCalendarDuration } from '../duration'
|
||||
import { getObjectAtRecurrenceId } from '../../utils/calendarObject.js'
|
||||
|
||||
/**
|
||||
* Returns a function to resize an event
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import { getYYYYMMDDFromDate } from '../utils/date.js'
|
||||
import { getYYYYMMDDFromDate } from '../../utils/date.js'
|
||||
|
||||
/**
|
||||
* Handles a click on a day-number in the calendar-grid
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import { getYYYYMMDDFromDate } from '../utils/date.js'
|
||||
import { getYYYYMMDDFromDate } from '../../utils/date.js'
|
||||
|
||||
/**
|
||||
* Handles a click on a week-number in the calendar-grid
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
import { getLocale } from '@nextcloud/l10n'
|
||||
import { getWeekendDaysForLocale } from './localeWeekendProvider.js'
|
||||
import { getWeekendDaysForLocale } from '../localization/localeWeekendProvider.js'
|
||||
|
||||
/**
|
||||
* Adds weekend classes to the day cell
|
|
@ -23,8 +23,8 @@ import {
|
|||
NamedTimeZoneImpl,
|
||||
createPlugin,
|
||||
} from '@fullcalendar/core'
|
||||
import getTimezoneManager from '../services/timezoneDataProviderService'
|
||||
import logger from '../utils/logger.js'
|
||||
import getTimezoneManager from '../../services/timezoneDataProviderService'
|
||||
import logger from '../../utils/logger.js'
|
||||
|
||||
/**
|
||||
* Our own FullCalendar Timezone implementation based on the VTimezones we ship
|
|
@ -19,12 +19,12 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventSource from "../../../../src/fullcalendar/eventSource.js";
|
||||
import eventSource from "../../../../../src/fullcalendar/eventSources/eventSource.js";
|
||||
|
||||
import { generateTextColorForHex } from '../../../../src/utils/color.js'
|
||||
import getTimezoneManager from '../../../../src/services/timezoneDataProviderService'
|
||||
import { getUnixTimestampFromDate } from '../../../../src/utils/date.js'
|
||||
import { eventSourceFunction } from '../../../../src/fullcalendar/eventSourceFunction.js'
|
||||
import { generateTextColorForHex } from '../../../../../src/utils/color.js'
|
||||
import getTimezoneManager from '../../../../../src/services/timezoneDataProviderService'
|
||||
import { getUnixTimestampFromDate } from '../../../../../src/utils/date.js'
|
||||
import { eventSourceFunction } from '../../../../../src/fullcalendar/eventSources/eventSourceFunction.js'
|
||||
|
||||
jest.mock('../../../../src/utils/color.js')
|
||||
jest.mock('../../../../src/services/timezoneDataProviderService')
|
|
@ -19,15 +19,15 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import { eventSourceFunction } from '../../../../src/fullcalendar/eventSourceFunction.js'
|
||||
import { eventSourceFunction } from '../../../../../src/fullcalendar/eventSources/eventSourceFunction.js'
|
||||
import {
|
||||
hexToRGB,
|
||||
isLight,
|
||||
generateTextColorForHex,
|
||||
getHexForColorName,
|
||||
} from '../../../../src/utils/color.js'
|
||||
} from '../../../../../src/utils/color.js'
|
||||
import { translate } from '@nextcloud/l10n'
|
||||
import {getAllObjectsInTimeRange} from "../../../../src/utils/calendarObject.js";
|
||||
import {getAllObjectsInTimeRange} from "../../../../../src/utils/calendarObject.js";
|
||||
jest.mock('@nextcloud/l10n')
|
||||
jest.mock('../../../../src/utils/color.js')
|
||||
jest.mock("../../../../src/utils/calendarObject.js")
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventAllow from "../../../../src/fullcalendar/eventAllow.js";
|
||||
import eventAllow from "../../../../../src/fullcalendar/interaction/eventAllow.js";
|
||||
|
||||
describe('fullcalendar/eventAllow test suite', () => {
|
||||
|
|
@ -19,11 +19,11 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventClick from "../../../../src/fullcalendar/eventClick.js";
|
||||
import eventClick from "../../../../../src/fullcalendar/interaction/eventClick.js";
|
||||
import {
|
||||
getPrefixedRoute,
|
||||
isPublicOrEmbeddedRoute,
|
||||
} from '../../../../src/utils/router.js'
|
||||
} from '../../../../../src/utils/router.js'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { translate } from '@nextcloud/l10n'
|
||||
import { showInfo } from '@nextcloud/dialogs'
|
|
@ -19,10 +19,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventDrop from "../../../../src/fullcalendar/eventDrop.js";
|
||||
import { getDurationValueFromFullCalendarDuration} from "../../../../src/fullcalendar/duration.js";
|
||||
import getTimezoneManager from '../../../../src/services/timezoneDataProviderService.js'
|
||||
import {getObjectAtRecurrenceId} from "../../../../src/utils/calendarObject.js";
|
||||
import eventDrop from "../../../../../src/fullcalendar/interaction/eventDrop.js";
|
||||
import { getDurationValueFromFullCalendarDuration} from "../../../../../src/fullcalendar/duration.js";
|
||||
import getTimezoneManager from '../../../../../src/services/timezoneDataProviderService.js'
|
||||
import {getObjectAtRecurrenceId} from "../../../../../src/utils/calendarObject.js";
|
||||
|
||||
jest.mock("../../../../src/fullcalendar/duration.js")
|
||||
jest.mock('../../../../src/services/timezoneDataProviderService.js')
|
|
@ -19,10 +19,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventResize from "../../../../src/fullcalendar/eventResize.js";
|
||||
import eventResize from "../../../../../src/fullcalendar/interaction/eventResize.js";
|
||||
|
||||
import { getDurationValueFromFullCalendarDuration} from '../../../../src/fullcalendar/duration.js'
|
||||
import {getObjectAtRecurrenceId} from "../../../../src/utils/calendarObject.js";
|
||||
import { getDurationValueFromFullCalendarDuration} from '../../../../../src/fullcalendar/duration.js'
|
||||
import {getObjectAtRecurrenceId} from "../../../../../src/utils/calendarObject.js";
|
||||
jest.mock('../../../../src/fullcalendar/duration.js')
|
||||
jest.mock("../../../../src/utils/calendarObject.js")
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import navLinkDayClick from '../../../../src/fullcalendar/navLinkDayClick.js'
|
||||
import { getYYYYMMDDFromDate } from '../../../../src/utils/date.js'
|
||||
import navLinkDayClick from '../../../../../src/fullcalendar/interaction/navLinkDayClick.js'
|
||||
import { getYYYYMMDDFromDate } from '../../../../../src/utils/date.js'
|
||||
jest.mock('../../../../src/utils/date.js')
|
||||
|
||||
describe('fullcalendar/eventClick test suite', () => {
|
|
@ -19,8 +19,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import navLinkWeekClick from '../../../../src/fullcalendar/navLinkWeekClick.js'
|
||||
import { getYYYYMMDDFromDate } from '../../../../src/utils/date.js'
|
||||
import navLinkWeekClick from '../../../../../src/fullcalendar/interaction/navLinkWeekClick.js'
|
||||
import { getYYYYMMDDFromDate } from '../../../../../src/utils/date.js'
|
||||
jest.mock('../../../../src/utils/date.js')
|
||||
|
||||
describe('fullcalendar/eventClick test suite', () => {
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import select from "../../../../src/fullcalendar/select.js";
|
||||
import select from "../../../../../src/fullcalendar/interaction/select.js";
|
||||
|
||||
describe('fullcalendar/select test suite', () => {
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import {getWeekendDaysForLocale} from "../../../../src/fullcalendar/localeWeekendProvider.js";
|
||||
import {getWeekendDaysForLocale} from "../../../../../src/fullcalendar/localization/localeWeekendProvider.js";
|
||||
|
||||
describe('fullcalendar/localeWeekendProvider test suite', () => {
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import { getWeekendDaysForLocale } from '../../../../src/fullcalendar/localeWeekendProvider.js'
|
||||
import { getWeekendDaysForLocale } from '../../../../../src/fullcalendar/localization/localeWeekendProvider.js'
|
||||
import { getLocale } from '@nextcloud/l10n'
|
||||
import dayRender from '../../../../src/fullcalendar/dayRender.js'
|
||||
import dayRender from '../../../../../src/fullcalendar/rendering/dayRender.js'
|
||||
jest.mock('../../../../src/fullcalendar/localeWeekendProvider.js')
|
||||
jest.mock('@nextcloud/l10n')
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
import { translatePlural } from '@nextcloud/l10n'
|
||||
import eventLimitText from "../../../../src/fullcalendar/eventLimitText.js";
|
||||
import eventLimitText from "../../../../../src/fullcalendar/rendering/eventLimitText.js";
|
||||
jest.mock('@nextcloud/l10n')
|
||||
|
||||
describe('fullcalendar/eventSourceFunction test suite', () => {
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventOrder from "../../../../src/fullcalendar/eventOrder.js";
|
||||
import eventOrder from "../../../../../src/fullcalendar/rendering/eventOrder.js";
|
||||
|
||||
describe('fullcalendar/eventOrder test suite', () => {
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import eventRender from "../../../../src/fullcalendar/eventRender.js";
|
||||
import eventRender from "../../../../../src/fullcalendar/rendering/eventRender.js";
|
||||
|
||||
describe('fullcalendar/eventRender test suite', () => {
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import windowResize from "../../../../src/fullcalendar/windowResize.js";
|
||||
import windowResize from "../../../../../src/fullcalendar/rendering/windowResize.js";
|
||||
|
||||
describe('fullcalendar/windowResize test suite', () => {
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
import {
|
||||
createPlugin,
|
||||
} from '@fullcalendar/core'
|
||||
import getTimezoneManager from '../../../../src/services/timezoneDataProviderService.js'
|
||||
import getTimezoneManager from '../../../../../src/services/timezoneDataProviderService.js'
|
||||
jest.mock('../../../../src/services/timezoneDataProviderService.js')
|
||||
jest.mock('@fullcalendar/core')
|
||||
|
Loading…
Reference in New Issue