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// Mixins\nimport CalendarBase from './calendar-base'\n\n// Util\nimport props from '../util/props'\nimport {\n VTimestamp,\n getDayIdentifier,\n parseTime,\n} from '../util/timestamp'\nimport {\n VEventParsed,\n VEventInput,\n parseEvent,\n isEventOn,\n} from '../util/events'\n\n// Types\ntype VColorFunction = (event: VEventInput) => string\n\ntype VNameFunction = (event: VEventParsed, timedEvent: boolean) => string\n\ntype VTimeToY = (time: VTimestamp | number | string) => number\n\ntype VEventResetCheck = (date: VTimestamp) => void\n\ntype VEventVisualGetOffset = (visual: VEventVisual, visuals: VEventVisual[]) => number\n\ntype VEventGetter = (day: VTimestamp) => VEventParsed[]\n\ntype VEventVisualGetter = (events: VEventParsed[], timed: boolean) => VEventVisual[]\n\ntype VEventVisualToNode = (visual: VEventVisual, index: number, day: D) => VNode\n\ntype VDailyEventsMap = {\n [date: string]: {\n parent: HTMLElement\n more: HTMLElement | null\n events: HTMLElement[]\n }\n}\n\ninterface VEventVisual {\n offset: number\n event: VEventParsed\n columnCount: number\n column: number\n}\n\ninterface VDaySlotScope extends VTimestamp {\n outside: boolean\n index: number\n}\n\ninterface VDayBodySlotScope extends VDaySlotScope {\n timeToY: VTimeToY\n}\n\n/* @vue/component */\nexport default CalendarBase.extend({\n name: 'calendar-with-events',\n\n props: props.events,\n\n computed: {\n noEvents (): boolean {\n return this.events.length === 0\n },\n parsedEvents (): VEventParsed[] {\n return this.events.map((input, index) => parseEvent(input, index, this.eventStart, this.eventEnd))\n },\n eventColorFunction (): VColorFunction {\n return typeof this.eventColor === 'function'\n ? this.eventColor as VColorFunction\n : () => (this.eventColor as string)\n },\n eventTextColorFunction (): VColorFunction {\n return typeof this.eventTextColor === 'function'\n ? this.eventTextColor as VColorFunction\n : () => (this.eventTextColor as string)\n },\n eventNameFunction (): VNameFunction {\n return typeof this.eventName === 'function'\n ? this.eventName as VNameFunction\n : (event, timedEvent) => {\n const name = event.input[this.eventName as string] as string\n if (event.start.hasTime) {\n if (timedEvent) {\n const showStart = event.start.hour < 12 && event.end.hour >= 12\n const start = this.formatTime(event.start, showStart)\n const end = this.formatTime(event.end, true)\n return `${name}
${start} - ${end}`\n } else {\n const time = this.formatTime(event.start, true)\n return `${time} ${name}`\n }\n }\n return name\n }\n },\n },\n\n methods: {\n formatTime (withTime: VTimestamp, ampm: boolean): string {\n const suffix = ampm ? (withTime.hour < 12 ? 'a' : 'p') : ''\n const hour = withTime.hour % 12 || 12\n const minute = withTime.minute\n\n return minute > 0\n ? (minute < 10\n ? `${hour}:0${minute}${suffix}`\n : `${hour}:${minute}${suffix}`)\n : `${hour}${suffix}`\n },\n updateEventVisibility () {\n if (this.noEvents || !this.eventMore) {\n return\n }\n\n const eventHeight = this.eventHeight\n const eventsMap = this.getEventsMap()\n\n for (const date in eventsMap) {\n const { parent, events, more } = eventsMap[date]\n if (!more) {\n break\n }\n const parentBounds = parent.getBoundingClientRect()\n const last = events.length - 1\n let hide = false\n let hidden = 0\n for (let i = 0; i <= last; i++) {\n if (!hide) {\n const eventBounds = events[i].getBoundingClientRect()\n hide = eventBounds.bottom + eventHeight > parentBounds.bottom && i !== last\n }\n if (hide) {\n const id = events[i].getAttribute('data-event') as string\n this.hideEvents(id)\n hidden++\n }\n }\n\n if (hide) {\n more.style.display = ''\n more.innerHTML = this.$vuetify.lang.t(this.eventMoreText, hidden)\n } else {\n more.style.display = 'none'\n }\n }\n },\n hideEvents (id: string) {\n const elements = this.$refs.events as HTMLElement[]\n\n elements.forEach(el => {\n if (el.getAttribute('data-event') === id) {\n el.style.display = 'none'\n }\n })\n },\n getEventsMap (): VDailyEventsMap {\n const eventsMap: VDailyEventsMap = {}\n const elements = this.$refs.events as HTMLElement[]\n\n if (!elements || !elements.forEach) {\n return eventsMap\n }\n\n elements.forEach(el => {\n const date = el.getAttribute('data-date')\n if (el.parentElement && date) {\n if (!(date in eventsMap)) {\n eventsMap[date] = {\n parent: el.parentElement,\n more: null,\n events: [],\n }\n }\n if (el.getAttribute('data-more')) {\n eventsMap[date].more = el\n } else {\n eventsMap[date].events.push(el)\n el.style.display = ''\n }\n }\n })\n\n return eventsMap\n },\n genDayEvent ({ offset, event }: VEventVisual, index: number, day: VDaySlotScope): VNode {\n const eventHeight = this.eventHeight\n const eventMarginBottom = this.eventMarginBottom\n const relativeOffset = (offset - index) * (eventHeight + eventMarginBottom) // 1 = margin bottom\n const dayIdentifier = getDayIdentifier(day)\n const start = dayIdentifier === event.startIdentifier\n const end = dayIdentifier === event.endIdentifier\n const scope = { event: event.input, day, outside: day.outside, start, end, timed: false }\n\n return this.genEvent(event, scope, start || day.index === 0, false, {\n staticClass: 'v-event',\n class: {\n 'v-event-start': start,\n 'v-event-end': end,\n },\n style: {\n height: `${eventHeight}px`,\n top: `${relativeOffset}px`,\n 'margin-bottom': `${eventMarginBottom}px`,\n },\n attrs: {\n 'data-date': day.date,\n 'data-event': event.index,\n },\n key: event.index,\n ref: 'events',\n refInFor: true,\n })\n },\n genTimedEvent ({ offset, event, columnCount, column }: VEventVisual, index: number, day: VDayBodySlotScope): VNode {\n const dayIdentifier = getDayIdentifier(day)\n const start = event.startIdentifier >= dayIdentifier\n const end = event.endIdentifier > dayIdentifier\n const top = start ? day.timeToY(event.start) : 0\n const bottom = end ? day.timeToY(1440) : day.timeToY(event.end)\n const height = Math.max(this.eventHeight, bottom - top)\n const left = columnCount === -1\n ? offset * 5\n : column * 100 / columnCount\n const right = columnCount === -1\n ? 0\n : Math.max(0, (columnCount - column - 2) * 100 / columnCount + 10)\n const scope = { event: event.input, day, outside: day.outside, start, end, timed: true }\n\n return this.genEvent(event, scope, true, true, {\n staticClass: 'v-event-timed',\n style: {\n top: `${top}px`,\n height: `${height}px`,\n left: `${left}%`,\n right: `${right}%`,\n },\n })\n },\n genEvent (event: VEventParsed, scope: object, showName: boolean, timedEvent: boolean, data: VNodeData): VNode {\n const slot = this.$scopedSlots.event\n const text = this.eventTextColorFunction(event.input)\n const background = this.eventColorFunction(event.input)\n\n return this.$createElement('div',\n this.setTextColor(text,\n this.setBackgroundColor(background, {\n on: this.getDefaultMouseEventHandlers(':event', nativeEvent => ({ ...scope, nativeEvent })),\n directives: [{\n name: 'ripple',\n value: this.eventRipple != null ? this.eventRipple : true,\n }],\n ...data,\n })\n ), slot\n ? slot(scope)\n : (showName ? [this.genName(event, timedEvent)] : undefined)\n )\n },\n genName (event: VEventParsed, timedEvent: boolean): VNode {\n return this.$createElement('div', {\n staticClass: 'pl-1',\n domProps: {\n innerHTML: this.eventNameFunction(event, timedEvent),\n },\n })\n },\n genMore (day: VTimestamp): VNode {\n return this.$createElement('div', {\n staticClass: 'v-event-more pl-1',\n attrs: {\n 'data-date': day.date,\n 'data-more': 1,\n },\n directives: [{\n name: 'ripple',\n value: this.eventRipple != null ? this.eventRipple : true,\n }],\n on: {\n click: () => this.$emit('click:more', day),\n },\n style: {\n display: 'none',\n },\n ref: 'events',\n refInFor: true,\n })\n },\n getEventsForDay (day: VTimestamp): VEventParsed[] {\n const identifier = getDayIdentifier(day)\n\n return this.parsedEvents.filter(\n event => isEventOn(event, identifier)\n )\n },\n getEventsForDayAll (day: VTimestamp): VEventParsed[] {\n const identifier = getDayIdentifier(day)\n\n return this.parsedEvents.filter(\n event => event.allDay && isEventOn(event, identifier)\n )\n },\n getEventsForDayTimed (day: VTimestamp): VEventParsed[] {\n const identifier = getDayIdentifier(day)\n\n return this.parsedEvents.filter(\n event => !event.allDay && isEventOn(event, identifier)\n )\n },\n isSameColumn (a: VEventVisual, b: VEventVisual): boolean {\n const astart = parseTime(a.event.start) as number\n const bstart = parseTime(b.event.start) as number\n const diff = astart - bstart\n const abs = diff < 0 ? -diff : diff\n\n return abs < this.eventOverlapThreshold\n },\n isOverlapping (a: VEventVisual, b: VEventVisual): boolean {\n const astart = parseTime(a.event.start) as number\n const bstart = parseTime(b.event.start) as number\n\n if (a.offset < b.offset && bstart < astart) {\n const aend = astart + this.eventOverlapThreshold\n const bend = parseTime(b.event.end) as number\n return !(astart >= bend || aend <= bstart)\n }\n\n return false\n },\n getScopedSlots () {\n if (this.noEvents) {\n return this.$scopedSlots\n }\n\n /**\n * Over the span of a week (for example) we want to maintain an event in the same row (for weekly and monthly views).\n * We keep track of those rows by indexToOffset. If the value in that array is -1, then we can place an event at that spot.\n * For a daily view with timed events we arrange them based on columns and offsets. If two or more events start at around the\n * same time (eventOverlapThreshold) they go into columns. If one event starts inside another it is indented the appropriate amount.\n * If one event overlaps another after those adjustments are made those events are placed in columns together instead of any defined\n * indents.\n */\n\n const parsedEvents = this.parsedEvents\n const indexToOffset: number[] = parsedEvents.map(event => -1)\n const resetOnWeekday = this.weekdays[0]\n\n const checkReset: VEventResetCheck = day => {\n if (day.weekday === resetOnWeekday) {\n for (let i = 0; i < indexToOffset.length; i++) {\n indexToOffset[i] = -1\n }\n }\n }\n\n const getOffset: VEventVisualGetOffset = (visual, visuals) => {\n let offset = indexToOffset[visual.event.index]\n if (offset === -1) {\n let min = Number.MAX_SAFE_INTEGER\n let max = -1\n visuals.forEach(other => {\n const otherOffset = indexToOffset[other.event.index]\n if (otherOffset !== -1) {\n min = Math.min(min, otherOffset)\n max = Math.max(max, otherOffset)\n }\n })\n offset = min > 0 && max !== -1 ? min - 1 : max + 1\n indexToOffset[visual.event.index] = offset\n }\n return offset\n }\n\n const getVisuals: VEventVisualGetter = (events, timed) => {\n const visuals: VEventVisual[] = events.map(event => ({ event, offset: 0, columnCount: -1, column: -1 }))\n // sort events by start date/time\n visuals.sort((a, b) => a.event.startTimestampIdentifier - b.event.startTimestampIdentifier)\n if (timed) {\n // timed events can be organized into columns\n visuals.forEach(visual => {\n if (visual.columnCount !== -1) {\n return\n }\n const columns: VEventVisual[] = []\n visuals.forEach(other => {\n if (other.columnCount === -1 && this.isSameColumn(visual, other)) {\n columns.push(other)\n }\n })\n if (columns.length > 1) {\n columns.forEach((visual, visualIndex) => {\n visual.column = visualIndex\n visual.columnCount = columns.length\n })\n }\n })\n // for any not organized into columns, if they overlap another event\n // not in a column they are offset\n visuals.forEach(visual => {\n if (visual.columnCount === -1) {\n visuals.forEach(other => {\n const otherOffset = indexToOffset[other.event.index]\n if (otherOffset !== -1 && other.event.endTimestampIdentifier <= visual.event.startTimestampIdentifier) {\n indexToOffset[other.event.index] = -1\n }\n })\n visual.offset = getOffset(visual, visuals)\n }\n })\n // for any not organized into columns, if a previous event overlaps this event\n // join them into the columns\n visuals.forEach(visual => {\n if (visual.columnCount === -1) {\n const columns: VEventVisual[] = [visual]\n visuals.forEach(other => {\n if (other !== visual && other.columnCount === -1 && this.isOverlapping(visual, other)) {\n columns.push(other)\n }\n })\n if (columns.length > 1) {\n columns.forEach((visual, visualIndex) => {\n visual.column = visualIndex\n visual.columnCount = columns.length\n })\n }\n }\n })\n } else {\n visuals.forEach(visual => {\n visual.offset = getOffset(visual, visuals)\n })\n }\n visuals.sort((a, b) => (a.column - b.column) || (a.offset - b.offset))\n return visuals\n }\n\n const getSlotChildren = (day: D, getter: VEventGetter, mapper: VEventVisualToNode, timed: boolean) => {\n checkReset(day)\n const events = getter(day)\n return events.length === 0\n ? undefined\n : getVisuals(events, timed).map((visual, index) => mapper(visual, index, day))\n }\n\n return {\n ...this.$scopedSlots,\n day: (day: VDaySlotScope) => {\n const children = getSlotChildren(day, this.getEventsForDay, this.genDayEvent, false)\n if (children && children.length > 0 && this.eventMore) {\n children.push(this.genMore(day))\n }\n return children\n },\n 'day-header': (day: VDaySlotScope) => {\n return getSlotChildren(day, this.getEventsForDayAll, this.genDayEvent, false)\n },\n 'day-body': (day: VDayBodySlotScope) => {\n return [this.$createElement('div', {\n staticClass: 'v-event-timed-container',\n }, getSlotChildren(day, this.getEventsForDayTimed, this.genTimedEvent, true))]\n },\n }\n },\n },\n})\n"],"sourceRoot":"","file":"calendar-with-events.js"}